Foundations — Chomsky Normal Form (CNF) — conversion
This page assumes you have seen none of the notation in the parent note. We build every symbol from the ground up, in the order you need them. Each block: plain words → the picture → why the topic needs it.
Before the symbols, here is the destination we are heading toward — the conditions a grammar must satisfy to be in CNF. Every definition below exists to make one of these precise. (A few terms below — terminal, variable, unit rule, start symbol — are defined properly in the numbered sections; here they are just previewed.)
1. Terminal — the actual letters of the string
Plain words. Think of the final output word, like aabb. Every character you can see in that word is a terminal. It is "terminal" because the building process terminates there — nothing more happens to it.
The picture. In Figure 1 (below), the letters at the very bottom (the leaves of the branching diagram) are terminals. They are the only things that survive into the printed string. (This diagram is a parse tree — formally defined in §9; for now just read it as "the picture of one string being built.")

aabb. The red bottom row are the terminals — the only symbols that survive into the printed word.
Why the topic needs it. A type-2 CNF rule is : "this name becomes exactly one terminal." Terminals are the only things that make it into the output, so every string ultimately comes from these one-letter rules. See Context-Free Grammars for where terminals first appear.
2. Variable (non-terminal) — a temporary placeholder name
Plain words. A variable is like a labelled box: " = whatever goes here, to be decided by a rule." It must eventually be replaced by terminals; it can never remain in the final string.
The picture. In Figure 1, the internal nodes (everything above the bottom row) are variables. They are placeholders that got expanded downward until only terminals remained.
Why the topic needs it. A type-1 CNF rule is : "this name becomes exactly two other names." Variables are the branching machinery. The whole conversion is about reshaping how variables expand.
3. Production / rule — one legal replacement, written with
Plain words. A production is a permission slip: "wherever you see , you are allowed to swap it out for ." The left side is always a single variable; the right side (the body, ) is any mix of variables and terminals.
Why and not ? An equals sign would mean two things are the same. But is a name and is what it turns into — a one-way action, done during building only. That directionality is the entire point, so we use an arrow.
Why the topic needs it. CNF is a rule about the shape of every production's right side. To restrict rules you must first name them: (type-1), (type-2), (illegal — mixes a terminal with a variable), and so on.
4. Grammar — the whole machine, as a 4-tuple
Plain words. A grammar is just these four lists bundled together: which names exist (), which letters exist (), which swaps are allowed (), and where you begin (). Every symbol in this whole page belongs to one of these four slots.
Why the topic needs it. CNF is a statement about (the shapes of the rules) and about (only may vanish). Naming the container lets us say precisely which part each conversion step touches: START edits and ; DEL, UNIT, TERM, BIN all rewrite . See Context-Free Grammars.
5. The pipe — shorthand for "or"
Plain words. When one variable has several possible replacements, we stack them on one line separated by instead of rewriting A → each time. So is just together with .
6. Epsilon — the empty string
Plain words. Imagine an empty text box: you typed nothing. That "nothing" still counts as a valid string, and we give it the name so we can talk about it. A rule is called an ==-production== and says " may simply vanish."
The picture. In Figure 2 (below), an -production is drawn as a node whose only child is a hollow red dot — it contributes no leaf to the final word.

Why the topic needs it. The no- condition of CNF forbids for every variable except the start symbol. The whole DEL step (short for delete -productions) exists to hunt down variables that can vanish (called nullable) and rewrite around them. Without understanding , DEL is meaningless.
7. Start symbol — where every derivation begins
Plain words. is the root of every parse tree — the single box you begin with before any rule fires. A grammar's language is exactly the set of all terminal-strings you can reach from .
Why the topic needs it. CNF's optional rule, , is allowed only for the start symbol. The START step (short for new start symbol) even invents a brand-new start symbol so the original can be tidied without special-casing it.
8. Unit (rename) production — a variable that just renames another
Plain words. does no real work: no letter appears, the diagram does not branch. It only says "an can be re-labelled a ." A unit step is one single application of such a rule. A rule like is not a unit production (its body is a terminal), and is not one (its body has two variables).
Why the topic needs it. The no-unit condition of CNF forbids every rename rule. The UNIT step (short for eliminate unit productions) walks all unit pairs and replaces each rename by the real bodies it could eventually reach, then deletes the renames.
9. Derivation and , — building a string step by step
Plain words. A derivation is the sequence of swaps that turns into a finished word. Each single swap is one ; the whole chain, however long, is one .
Why two different arrows?
- names a rule you own (a fixed replacement you're allowed to use).
- names a single move you actually made using one of those rules.
- names many moves collapsed together — "reachable eventually." (The restricted cousin from §8 is the same idea but limited to rename moves.)
The picture. Figure 3 (below) is a derivation: reading top-to-bottom, each level is one step; the whole tree is the from root to leaves.

Why the topic needs it. " is nullable" is defined as (A can eventually vanish). "Unit pair " is defined as (§8). Both DEL and UNIT are stated entirely in this notation.
10. Parse tree — the picture of a derivation
Plain words. Same information as a derivation, but as a shape instead of a list. If a rule was , node gets two children and .
Why the topic needs it — the whole payoff. Look only at the variable nodes of a CNF parse tree (ignore the terminal leaves that hang off type-2 rules):
- a type-1 rule gives a variable node exactly 2 variable-children,
- a type-2 rule gives a variable node exactly 1 terminal leaf and no further branching.
So the tree of variable nodes is a binary tree (each has two children or is a leaf-parent). Counting precisely, for a non-empty string of length : there are exactly type-2 nodes (one variable per output letter) and exactly type-1 nodes (the branch points that join pieces into one), giving variable nodes in total. If you also count the terminal leaves themselves, the grand total is nodes. The key fact is that all these counts are fixed by alone — that predictability is what powers the CYK Algorithm ( membership) and the Pumping Lemma for CFLs.
11. Subset — the DEL patching notation
Plain words. If is a bag of positions, a subset is any handful you scoop out.
The picture. In Figure 4 (below), the body has nullable positions (the and the can vanish). Each red-boxed selection — drop nothing, drop , drop , drop both — yields one new rule. Four subsets → four candidate rules (the "drop everything" one is discarded if it empties the body).

Why the topic needs it. DEL cannot just add one rule per nullable symbol; it must try every subset of the nullable positions at once. The notation is exactly how the parent's "general patching rule" ranges over all these combinations — so understanding is what makes DEL correct rather than a common under-counting mistake.
12. The five pipeline steps: what START, DEL, UNIT, TERM, BIN each do
The parent conversion runs five named steps in order. Several were explained above; here are all five in one place so the mnemonic is not hollow.
Prerequisite map
How to read the map: the leaves at the top are the raw symbols (§1–§7); they assemble into a grammar, which supports derivations and their picture the parse tree; the unit-rule and epsilon strands feed the UNIT and DEL cleanup steps; all strands converge on the CNF conversion goal — the parent note.