Additional 9-13 Prove that the language {w#w|w is a string over the alphabet {a,b,c}} is not regular
Tip: here are some strings in that language:
Additional 9-13 Prove that the language {w#w|w is a string over the alphabet {a,b,c}} is not...
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...
1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the following regular expression. 6* (ab U bc)(aa)* ccb* Which of the following strings are in the language: bccc, babbcaacc, cbcaaaaccbb, and bbbbaaaaccccbbb (Give reasons for why the string are or are not in the language). 2. Let G be a context free grammar in Chomsky normal form. Let w be a string produced by that grammar with W = n 1. Prove that the...
Additional 9-14 Prove that the language {a"b" n, k ε N and n S k} is not regular Hint: I go over this proof in the lecture. You can watch it again to make sure you follow it before doing it. 2 Additional 9-15 Prove that the language (a"b n, k E N and n Hint: a little different... 2 k Is not regular 3 Additional 9-16 Prove that the language (w w (a, b and w has an equal...
4. A regular expression for the language over the alphabet fa, b) with each string having an even number of a's is (b*ab*ab*)*b*. Use this result to find regular expressions for the following languages a language over the same alphabet but with each string having odd number of a's. (3 points) a. b. a language over the same alphabet but with each string having 4n (n >- 0) a's. (3 points)
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.
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...
Suppose alphabet Σ = {a} and consider the following regular language A, A = {w | |w| ≥ 4}, i.e., strings whose length is at least 4 (equivalently, unary numbers x ≥ 4). a) Construct a DFA that recognizes A with as few states as possible (draw a state diagram). b) Construct a PDA that recognizes A with as few states as possible (draw a state diagram). Note that the stack alphabet may include additional symbols.
1. (Decidable languages) (c) (Prefix of a generated string) A string w is called a prefix of string s if s starts with w. i. Give a regular expression for all strings over alphabet Σ for which w is a prefix. ii. Let L = {(G, w) | G is a CFG, w is a string, and w is a prefix of some string s generated by G}.
Find a regular expression for the following language over the alphabet Σ = {a,b}. L = {strings that begin and end with a and contain bb}.
4. (Non-CFLs) Prove that the following languages are not context-free. (b) The following language over the alphabet {a, b, c}: B = {aix | i ≥ 0, x ∈ {b, c}* , and if i = 1 then x = ww for some string w}. (Careful: B satisfies the pumping lemma for CFLs! Make sure you understand why, but you don’t need to write it down.)