1.

The grammar G: S → SS | a | b is ambiguous. Check all and only the strings that have exactly two leftmost derivations in G.(a) bbb(b) ab(c) All of the mentioned(d) None of the mentioned

Answer» Correct choice is (c) All of the mentioned

To elaborate: S => a. A string of length 2 has only one derivation, e.g., S => SS => aS => ab.


Discussion

No Comment Found

Related InterviewSolutions