The Greibach normal form grammar for the language L = {aⁿ bⁿ⁺¹ | n ≥ 0} is

2013

The Greibach normal form grammar for the language L = {aⁿ bⁿ⁺¹ | n ≥ 0} is

  1. A.

    S → aSB
    B → bB / λ

  2. B.

    S → aSB
    B → bB / b

  3. C.

    S → aSB / b
    B → b

  4. D.

    S → aSb / b

Attempted by 38 students.

Show answer & explanation

Correct answer: C

Greibach Normal Form requires every production to start with a terminal followed by variables.

For L = {a^n b^{n+1}}, the grammar must generate n 'a's and n+1 'b's correctly.

Option 2 satisfies GNF by ensuring terminals start productions and avoiding terminals in variable suffixes.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor