Chomsky and Greibach normal forms

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

Share on WhatsApp

← RGPV CD-501 Theory of Computation December 2024 Solved Question Paper

← RGPV CS-501 Theory of Computation May 2023 Solved Paper

Question

Discuss Chomsky and Greibach normal forms with examples.

Asked in: CD-501 | December 2024 | 3(a)

Write a short note on Chomsky normal form (any three of Q8).

Asked in: CS-501 | May 2023 | 8(iii)

Answer

A context-free grammar is in Chomsky normal form (CNF) if every production is A→BC or A→a, where A,B,C are variables and a is a terminal. A fresh start may produce ε if ε belongs to the language and that start does not occur on a right-hand side.

To convert to CNF, introduce a fresh start, eliminate ε productions (except the permitted start rule), unit productions and useless symbols, replace terminals in long right-hand sides by variables, and split right-hand sides longer than two. Example: S→AB, A→a, B→b generates ab and is in CNF.

Greibach normal form (GNF) requires A→aA₁⋯Aₖ, k≥0, with one leading terminal followed by variables. The analogous start ε exception applies. For ab, S→aB, B→b is in GNF. Conversion generally removes left recursion and substitutes productions until each begins with a terminal.

CNF supports binary parse trees and the CYK membership algorithm. GNF ensures each leftmost derivation step emits one terminal and is useful for constructing pushdown automata. For a nonempty word of length n, a CNF derivation uses 2n−1 productions, while a GNF derivation uses n productions.

← RGPV CD-501 Theory of Computation December 2024 Solved Question Paper

← RGPV CS-501 Theory of Computation May 2023 Solved Paper

Discussion

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

Sign in to participate in the discussion.

Join the discussion