Consider the following statements about the context-free grammar: G = {S → SS,…

PYQ GATE 2006

Consider the following statements about the context-free grammar: G = {S → SS, S → ab, S → ba, S → ε}. I. G is ambiguous. II. G produces all strings with equal number of a’s and b’s. III. G can be accepted by a deterministic PDA. Which combinations below expresses all the true statements about G?

  1. A.

    I only

  2. B.

    I and III only

  3. C.

    II and III only

  4. D.

    I, II and III

Attempted by 208 students.

Sign up free to check your answer

Sign up free

Explore the full course: Zero To Hero

Loading lesson…