construct a push down automata that recognises each of the following languages. D = {0m1rom+n |...
1. Show that the following languages are context-free. You can do this by writing a context free grammar or a PDA, or you can use the closure theorems for context-free languages. For example, you could show that L is the union of two simpler context-free languages. (b) L {0, 1}* - {0"1" :n z 0}
Theory of Computation - Push Down Automata (PDA) and Context Free Grammars (CFG) Problem 1. From a language description to a PDA Show state diagrams of PDAs for the following languages: a. The set of strings over the alphabet fa, b) with twice as many a's as b's. Hint: in class, we showed a PDA when the number of as is the same as the number of bs, based on the idea of a counter. + Can we use a...
Exercise 7.3.2: Consider the following two languages: Li = {a"b2ncm n,m >0} L2 = {a" mc2m | n,m >0} a) Show that each of these languages is context-free by giving grammars for each. ! b) Is L; n L, a CFL? Justify your answer.
Construct context-free grammars that generate each of these languages: A. tw E 10, 1 l w contains at least three 1s B. Hw E 10, 1 the length of w is odd and the middle symbol is 0 C. f0, 1 L fx l x xR (x is not a palindrome) m n. F. w E ta, b)* w has twice as many b's as a s G. a b ch 1, J, k20, and 1 or i k
6)a) Given Σ {a,b,c), construct a singlefinite automata (recognizer) which can recognize words from either of two languages Li and L2 where L words are of the form abc and L2 words are in the form ac b where n e counting numbers. Assume the existence terminator symbol # where needed. Hint: Using a the easiest approach. - state diagram may be b) Create a generator that generates words of L only. Be sure to define the set of terminals...
Question 3 Give a context-free grammar for each of the following languages over = {a,b,c}. 1. {a^jen: n >0}. 2. {animck : k=n+m} 3. Strings of a's and b's that contain twice as many a's as b's (for example, aba).
4) For the alphabet S={a, b}, construct an FA that accepts the following languages. (d) L= {all strings with at least one a and exactly two b's} (e) L= {all strings with b as the third letter} (f) L={w, |w| mod 4 = 0} // the cardinality of the word is a multiple of 4
Use the pumping lemma to show that the following languages are not context free: a)0^n0^2n0^3n;n>=0 b) {w#x \ where w.x e {a,b) * and w is a substring of x} c) (a^ib^ja^ib^j|i,j>0) answer should be very clear .otherwise I will down vote .
4. Construct a pushdown automaton for each of the following langauges – by giving its 6-tuple formal defintion and brief/precise interpretations of its states and transitions: (a) {a" x | n > 0, and x € {a,b}* and (x) <n}. (b) {W € {a,b}* | w has twice as many a's as b’s}. (c) (0+1)* — {ww | W € {0, 1}*}