Question: 1 . Give context - free grammars that generate the following languages. In all parts, the alphabet Sigma is { 0 , 1 }
Give contextfree grammars that generate the following languages. In all parts, the alphabet Sigma is
aw w starts and ends with the same symbol
bw w wR that is w is a palindrome
Give a contextfree grammar that generates the language
A aibjck i j or j k where i j k Is your grammar ambiguous? Why or why not?
Convert the following CFG into an equivalent CFG in Chomsky normal form. A BAB B epsi B epsi
Design a pushdown automaton that accepts the language nn n In other words, the language consists of all strings that start with zero, followed by an equal number of ones.
a Draw the transition diagram for the PDA.
b Show the stack changes for each input symbol.
c Test your PDA on at least five sample strings and show the stepbystep process of accepting or rejecting each of them.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
