Similar questions 2 more → · asked again: GATE 1994, Q20
Context-Free Grammars & Languages


Answer & solution
Answer: C: 2ℓ−1 (no official key was published)
A CNF parse tree uses binary nonterminal productions A→BC and terminal productions A→a. There are ℓ terminal-producing leaves. A full binary tree with ℓ leaves has ℓ−1 binary internal nodes, so the total applications are ℓ+(ℓ−1)=2ℓ−1. The order of expanding variables does not change that count. The special ε-production sometimes allowed for the start symbol is outside this nonempty-word case; substituting ℓ=0 into the formula would not count its derivation correctly.