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

ISRO Scientist/Engineer SC · 2016 · Computer ScienceGATE · 2006 · CS

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 145 students.

Show answer

Correct answer: B

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…