Back to the 2021 paper

Module 2: Context-Free Languages (CFL) and PDA

20212m

Which of the following does not have left recursion?

(i) Chomsky Normal Form
(ii) Greibach Normal Form
(iii) Backus–Naur Form
(iv) All of the above

Worked SolutionAI Assisted

Answer

Correct Option: (i) Chomsky Normal Form and (ii) Greibach Normal Form — both have no left recursion; if single choice required, (i) CNF is the textbook answer, and BNF may contain left recursion.

Explanation

Left recursion: Production A→AαA \rightarrow A\alpha.

  • Chomsky Normal Form (CNF): A→BCA \rightarrow BC or A→aA \rightarrow a, where B,C∈VB,C\in V, a∈Ta\in T. No AA on RHS leftmost as non-terminal with same AA, and no A→AαA\rightarrow A\alpha. No left recursion.
  • Greibach Normal Form (GNF): A→aαA \rightarrow a\alpha, where a∈Ta\in T, α∈V∗\alpha\in V^*. Starts with terminal → no left recursion by definition.
  • Backus-Naur Form (BNF): General notation for CFG, e.g., A::=A+B∣BA ::= A + B \mid B. May contain left recursion (common in expression grammars).

Options:

  • (i) CNF → no left recursion ✓
  • (ii) GNF → no left recursion ✓
  • (iii) BNF → can have left recursion ✗
  • (iv) All of above → false because BNF can have it.

If exam expects single answer, CNF (and GNF) are correct; many keys mark (i) Chomsky Normal Form.

Final Answer

CNF / GNF have no left recursion → Option (i) (and (ii)). BNF can have left recursion.

Similar questions

Official AppAndroid App

PYQDeck for Android

Solve BEU previous-year exam papers anywhere, anytime. Fast search, offline paper viewing, and step-by-step solutions designed specifically for your phone.