b) Let G=(V,T,P,S) be a Context free Grammar then prove that if S=> athen there is a
derivation tree in G with yield a.
3. Let G be a grammar s->OB/1A, A->O/OS/1AA, B->1/1S/OBB. For the string
00110101 find its leftmost derivation and derivation tree.
3) a) If G is the grammar S->Sbs/a, Show that G is ambiguous.
b) Give a detailed description of ambiguity in Context free grammar
4. a) Show that E->E+E/E*E/(E)/id is ambiguous. (6) b)Construct a Context free grammar
G which accepts N(M), where M=({q0, q1},{a,b},{z0,z},d,q0,z0,F) and where dis
given by
d(q0,b,z0)={(q0,zz0)}
d(q0, e,z0)={(q0, e)}
d(q0,b,z)={(q0,zz)}
d(q0,a,z)={(q1,z)}
d(q1,b,z)={(q1, e)}
d(q1,a,z0)={(q0,z0)}