Chomsky normal form: December 2025 grammar

December 4, 2026 · Team EasyExamNotes · 1 min read (est.) · 0 comments

Share on WhatsApp

← RGPV CS-501 Theory of Computation December 2025 Solved Question Paper

Question

Convert the grammar S→AB | a, A→a, B→b into Chomsky normal form.

Asked in: CS-501 | December 2025 | 5(b)

Answer

In Chomsky normal form (CNF), each production has the form X→YZ, where Y and Z are variables, or X→t, where t is a terminal. A special start production S→ε may be permitted if the language contains ε and S does not occur on a right-hand side.

Production CNF type
S→AB Two variables
S→a One terminal
A→a One terminal
B→b One terminal

There are no epsilon productions, unit productions, useless variables, mixed terminal-variable right-hand sides or right-hand sides longer than two. S never appears on a right-hand side. Thus every production already satisfies CNF and the grammar remains unchanged.

The language is {a,ab}: S⇒a or S⇒AB⇒aB⇒ab. Introducing extra variables or deleting S→a would be unnecessary or incorrect. In general CNF conversion removes epsilon and unit productions, removes useless symbols, replaces terminals in longer productions and binarizes long right-hand sides; none of those transformations is needed here.

← RGPV CS-501 Theory of Computation December 2025 Solved Question Paper

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion