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
- A.
S → aSB
B → bB / λ - B.
S → aSB
B → bB / b - C.
S → aSB / b
B → b - 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.