← RGPV CD-501 Theory of Computation November 2023 Solved Paper
Question
Simplify the grammar S→aA|aBB, A→Aaa|ε, B→bB|bbC, C→b.
Asked in: CD-501 | November 2023 | 4(b)
Answer
A is the only nullable variable. Add S→a and A→aa when eliminating ε. The resulting rules are S→aA|aBB|a; A→Aaa|aa; B→bB|bbC; C→b. All variables are productive and reachable; no unit rules remain. Optionally eliminate left recursion using A→aaA|aa. The language is unchanged.
← RGPV CD-501 Theory of Computation November 2023 Solved Paper
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion