a) Construct a context free grammar for the language L = {anbn|n>=1}U{amb2m| m>=1} and hence a PDA accepting L by empty stack. b) Construct a PDA equivalent to the following grammar: S -> aAA A -> aS|bS|a (5+5) 5. a) Construct a CFG for the regular expression (011+1)*(01)*. b) Prove the following grammar is ambiguous. S -> a|abSb|aAb A -> bS|aAAb

a) Construct a context free grammar for the language

L = {anbn|n>=1}U{amb2m| m>=1} and hence a PDA accepting L by empty stack.

b) Construct a PDA equivalent to the following grammar:

S -> aAA

A -> aS|bS|a (5+5) 5. a) Construct a CFG for the regular expression (011+1)*(01)*.

b) Prove the following grammar is ambiguous.

S -> a|abSb|aAb

A -> bS|aAAb


Buy plagiarism free, original and professional custom paper online now at a cheaper price. Submit your order proudly with us



Essay Hope