1. Construct a DFA that recognizes each of the following languages: a. L1 = {w €...
Construct DFA's that recognize the following languages over the alphabet {a,b}: 1. {w|w is any string except abba or aba}. Prove that your DFA recognizes exactly the specified language. 2. {w|w contains a substring either ababb or bbb}. Write the formal description for this DFA too.
1. (a) Give state diagrams of DFA’s recognizing the following languages. That alphabet is Σ = {a,b} L1 = {w | w any string that does not contain the substring aab} L2 = {w | w ∈ A where A = Σ*− {a, aa, b}} 2. (a) Give state diagrams of DFA’s recognizing the following languages. The alphabet is {0, 1}. L3 = {w | w begins with 0 ends with 1} (b) Write the formal definition of the DFA...
= {a,b}: 1. (9 pts) Consider the following three languages, all subsets of S* where • L = {w w is a word such that we is divisible by 3). . L2 = {w w is a word whose length is divisible by 4 }. • L3 = {w w is a word such that wla >3}. (a) For each language construct a DFA that recognizes that language. (b) Construct an automaton that recognizes Lin L2. If the constructed automaton...
Give context-free grammars that generate the following languages (E = {a,b}). (a) (1 point) L1 = {w | W contains at least two b's} (b) (1 point) L2 = {w/w = wf, w is a palindrome} (c) (1 point) L3 = {w w contains less a's than b's}. (d) (1 point) LA = {w w = ayn+1, n > 2} (e) (1 points) Ls = {w w = a";2(m+n)cm, m, n >0}; (S = {a,b,c}).
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...
Let L1 = {ω|ω begins with a 1 and ends with a 0}, L2 = {ω|ω has length at least 3 and its third symbol is a 0}, and L3 = {ω| every odd position of ω is a 1} where L1, L2, and L3 are all languages over the alphabet {0, 1}. Draw finite automata (may be NFA) for L1, L2, and L3 and for each of the following (note: L means complement of L): Let L w begins...
1. Give a DFA for each of the following languages defined over the alphabet Σ (0, i): a) (3 points) L={ w | w contains the substring 101 } b) (3 points) L-wl w ends in 001)
Give the regular expressions of the following languages (alphabet is ab): a. {w | w has a length of at least three and its second symbol is a b} b. {w | w begins with an a and ends with a b} c. {w | w contains a single b} d. {w | w contains at least three a's} e. {w | w contains the substring baba} d. {w | w is a string of even length} e. The empty...
1) Assume ∑ = {a, b}, construct a DFA to recognize: {w | number of a's in w ≥ 2 and number of b's in w ≤ 1}. (seven states) 2) Assume ∑ = {a, b}, construct a DFA to recognize: {w || w | ≥ 2, second to the last symbol of w is b}. (four states) 3) Write a regular expression for: All bit strings that contain at least three 1's.
disprove that the given lan 4. [20 Points For each of the following languages, prove or guage is regular (a) L1www e {a,b}*} {w w E {a, b}* and no two b's in w have odd number of a's in between}. (b) L2 (c) L3 a" (d) L4 vw n = 3k, for k > 0}. a, b}*} disprove that the given lan 4. [20 Points For each of the following languages, prove or guage is regular (a) L1www e...