3 votes 3 votes The grammar ‘GI’ $S \rightarrow OSO \mid ISI \mid 0 \mid 1 \mid \in$ and the grammar G2 is $ S \rightarrow as \mid asb \mid X, X \rightarrow Xa \mid a$. Which is the correct statement? G1 is ambiguous, G2 is unambiguous G1 is unambiguous, G2 is ambiguous Both G1 and G2 are ambiguous Both G1 and G2 are unambiguous Theory of Computation ugcnetcse-dec2012-paper3 theory-of-computation grammar + – go_editor asked Jul 13, 2016 recategorized Oct 10, 2018 by Pooja Khatri go_editor 4.0k views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 4 votes 4 votes G2 IS AMBIGUOUS: TAKE STRING aaa IN WHICH WE HAVE TWO LEFT MOST DERIVATION S-->aS-->aX-->aXa-->aaa AND S-->aS-->aaS-->aaX-->aaa SO AMBIGUOUS G1 IS NOT AMBIGIOUS COZ WE CANT HAVE TWO DERIVATION TREE FOR A SINGLE SAME STRING SO OPTION B IS CORRECT asu answered Jul 13, 2016 selected Jul 13, 2016 by srestha asu comment Share Follow See all 0 reply Please log in or register to add a comment.
1 votes 1 votes G2 is Ambiguous grammar G1 is Unambiguous grammar from which we can generate {O0O,O1O,I0I,I1I,OO0OO,OO1OO,II0II,II1II,OI0IO,OI1IO......} Answer :B Prateek kumar answered Nov 15, 2016 Prateek kumar comment Share Follow See all 0 reply Please log in or register to add a comment.