Consider the following language on the alphabet Σ = (a L = {aaab, aab) Describe the...
************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...
Can you please thoroughly explain part B? Let Σ {0,1} be an alphabet. Suppose the language Ly is the set of all strings that start with a 1 and L2 is the set of all strings that end in a 1. Describe Lj U L2 and (L1 UL2)* using English. b) Decide if the given strings belong to the language defined by the given regular expression. If it does not belong, then explain why. 0(1|€)10(e|0)*11 , strings: 0110011, 0100011001111
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...
1(a)Draw the state diagram for a DFA for accepting the following language over alphabet {0,1}: {w | the length of w is at least 2 and has the same symbol in its 2nd and last positions} (b)Draw the state diagram for an NFA for accepting the following language over alphabet {0,1} (Use as few states as possible): {w | w is of the form 1*(01 ∪ 10*)*} (c)If A is a language with alphabet Σ, the complement of A is...
Find a regular expression for the following language over the alphabet Σ = {a,b}. L = {strings that begin and end with a and contain bb}.
Build deterministic finite automata that accepts the following language over the alphabet Σ = {a, b} L= {all strings that end with b}
John Doe claims that the language L, of all strings over the alphabet Σ = { a, b } that contain an even number of occurrences of the letter ‘a’, is not a regular language. He offers the following “pumping lemma proof”. Explain what is wrong with the “proof” given below. “Pumping Lemma Proof” We assume that L is regular. Then, according to the pumping lemma, every long string in L (of length m or more) must be “pumpable”. We...
(3) Consider the following three languages over the alphabet Σ default i,j, k, are non-negative integers (can be 0): (a,b,c,d), where by One of these is not a CFL; the other two are CFLs. Give context-free grammars for the two that are CFLs, and a CFL Pumping Lemma proof for the one that is not a CFL. (You need not prove your grammars correct, but their plan should be clear. (6+6+18 30 pts., for 74 total on the set) (3)...
Consider the language defined over the alphabet Σ (0, 1): [10] 2nin i. Show that L1 is context-free by specifying a CFG Gi for L1 ii. Convert the CFG Gi to a pushdown automaton Pv that accepts L1 by empty 12 stack iii. Give a pushdown automaton PF that accepts L by final state
Question 1. Let Σ = {a, b}, and consider the language L = {w ∈ Σ ∗ : w contains at least one b and an even number of a’s}. Draw a graph representing a DFA (not NFA) that accepts this language. Question 2. Let L be the language given below. L = {a n b 2n : n ≥ 0} = {λ, abb, aabbbb, aaabbbbbb, . . .} Find production rules for a grammar that generates L.