Teaching UGC NET Mock Test Series 2025 (Paper 1 & 2) Theory of Computation Context Free Languages and Pushdown Automata Ambiguity
Consider the following two Grammars:
G1 : S → SbS|a
G2 : S → aB|ab, A → AB|a, B → ABb|b
Which of the following option is correct?1
Only G1 is ambiguous
2
Only G2 is ambiguous
3
Both G1 and G2 are ambiguous
4
Both G1 and G2 are not ambiguous