Monday 22 June 2015

Q 73,p3,j14. Given the following two grammars :



G1: S→AB | aaB
A →a | Aa
B →b

G2: S →a S b S | b S a S | λ

Which statement is correct ?
(A) G1is unambiguous and G2 is unambiguous.
(B) G1 is unambiguous and G2 is ambiguous.
(C) G1 is ambiguous and G2 is unambiguous.
(D) G1 is ambiguous and G2 is  ambiguous.

Answer D.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.