Correct Answer: Eliminating Immediate Left Recursion (A \rightarrow A\alpha / \beta)

Correct Answer: Eliminating Immediate Left Recursion (A \rightarrow A\alpha / \beta)

Verified Sources
Sep 12, 2026

To remove immediate left recursion of the form
AAαβA \rightarrow A\alpha \mid \beta
(where (\beta) does not start with (A)), the standard transformation introduces a new nonterminal (A') and rewrites the grammar as:
AβAA \rightarrow \beta A'
AαAϵA' \rightarrow \alpha A' \mid \epsilon

This directly matches option (i).

Therefore, the correct choice is (i) (A \rightarrow \beta A').

Key learning terms: immediate left recursion , elimination transformation , new nonterminal , epsilon.

Knowledge Check

Question 1 of 3
Q1Single choice

After removing immediate left recursion from grammar AAαβA \rightarrow A\alpha \mid \beta, which production is created for AA?