(a) Design a PDA P that recognizes the language L = {x#y : x, y ∈{1}∗∧ |x| > |y|} over the alphabet Σ = {1, #}. Draw a state diagram according to the format of the textbook and the slides,i.e., start with an empty stack. Furthermore, ensure that every move either pushes or pops, but not both. (b) Obviously, you can easily create a CFG for such a trivial language like L. Here, you are asked to not just produce any CFG for L, but follow the procedure PDA-to-CFG to obtain such a grammar. Even for such a simple PDA, the grammar would be a bit lengthy. Therefore, we make one modification. You don’t have to write any rules that involve variables that generate the empty language. Such rules would have no effect anyway.
(a) Design a PDA P that recognizes the language L = {x#y : x, y ∈{1}∗∧ |x| > |y|} over the alphabet Σ = {1, #}. Draw a state diagram according to the format of the textbook and the slides,i.e., start with an empty stack. Furthermore, ensure that every move either pushes or pops, but not both.
(b) Obviously, you can easily create a CFG for such a trivial language like L. Here, you are asked to not just produce any CFG for L, but follow the procedure PDA-to-CFG to obtain such a grammar. Even for such a simple PDA, the grammar would be a bit lengthy. Therefore, we make one modification. You don’t have to write any rules that involve variables that generate the empty language. Such rules would have no effect anyway.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images