The grammar ‘G1’ S → 0S0 | 1S1 | 0 | 1 | ε and the grammar ‘G2’ is S → aS |…

PYQ UGC NET 2012

The grammar ‘G1’

S → 0S0 | 1S1 | 0 | 1 | ε and the grammar ‘G2’ is S → aS | aSb | X, X → Xa | a.

Which is the correct statement ?

  1. A.

    G1 is ambiguous, G2 is unambiguous

  2. B.

    G1 is unambiguous, G2 is ambiguous

  3. C.

    Both G1 and G2 are ambiguous

  4. D.

    Both G1 and G2 are unambiguous

Attempted by 19 students.

Sign up free to check your answer

Sign up free

Explore the full course: Nta Ugc Net Paper 2

Loading lesson…