Group 1
Types of words that should be generated:
a(a* + bb b* aa )*baa*
Group 2
Types of words that should be generated:
bb…ab defined by the regular expression: bb*ab.
babbbb… defined by the regular expression: babb*.
a(aa)a…(bb)ab - note that the aa-substring and the bb-substring prevent words not belonging to the language from being generated. These words can be generated by the regular expression: a(aa)a*(bb)ab.
If all of these types of words are combined then we have:
b(b* + aa a* bb )*abb*
Thus a regular expression that generates all the words in the required language is:
a(a* + bbb*aa)*baa* + b(b* + aaa*bb)*abb*
Construct a regular expression that defines the language L (say) containing all the words with either...
L = {w|w contains the substring bab} give the regular expression that describes L are the 2 languages L and L* the same language? Is L(aba)* a regular language?
I need to construct a deterministic finite automata, DFA M, such that language of M, L(M), is the set of all strings over the alphabet {a,b} in which every substring of length four has at least one b. Note: every substring with length less than four is in this language. For example, aba is in L(M) because there are no substrings of at least 4 so every substring of at least 4 contains at least one b. abaaab is in...
3) Construct a regular expression defining each of the following languages over the alphabet {a, b}. (a) L = {aab, ba, bb, baab}; (b) The language of all strings containing exactly two b's. (c) The language of all strings containing at least one a and at least one b. (d) The language of all strings that do not end with ba. (e) The language of all strings that do not containing the substring bb. (f) The language of all strings...
given ∑ = {a,b}: 1. describe in English the languages denoted by the regular expression: (a+b)*b(a+b)* 2. Write a regular expression: L(w) = {w | w has exactly a single substring abaa or exactly a single substring babb} 3. Write a regular expression for the following language: L(w) = {w | w ends in bb and does contain the substring aba}
• Build an FA that accepts the language of all words with only a’s or only b’s in them. For example, a, aa, aaa, b, bb, bbb, etc are in the language, while null string, ab, ba, aab, aba, bab, bba, baa, etc are not in the language. • Give a regular expression for this language.
************Theory of Computing ***************** 1. Generate a regular expression of “all words over the alphabet Σ = {a b} that either begin with a and end with b OR begin with b and end in a.” Thus, the first few shortest words in this language are “ab” “ba” “aab” “baa” “abb” “bba” “aaab” etc. So, if a word begins with a it must in end b, and if it begins with b it must end in a. 2. Consider the...
1. Design an NFA (Not DFA) of the following languages. a) Lw E a, b) lw contain substring abbaab) b) L- [w E 10,1,2) lsum of digits in w are divisible by three) c) L-(w E {0,1,2)' |The number is divisible by three} d) The language of all strings in which every a (if there are any) is followed immediately by bb. e) The language of all strings containing both aba and bab as substrings. f L w E 0,1every...
construct an finite automata that accepts all strings of {a,b} that contains either ab or bba, or both as substrings. give a regular expression as well.
(a) (5 Points) Construct an equivalent NFA for the language L given by the regular expression ((a Ub) ab)*. Please show the entire construction, step-by-step, to receive full points.
roblem 18 [15 points Consider the Turing M (Q,E, T,6,4, F), such that 16 g transition set (d) Write a regular expresion that defitves L. fsuch a regular expression does mot exist, prove it Answer: E, N,t,1, R (M has an one-way infinite tape (infinite to the right only.) B is the designated blank symbol. M accepts by final state.) Let L be the set of strings which M accepts Let LR be the set of strings which M rejects....