Correct Answer: Eliminating Immediate Left Recursion (A \rightarrow A\alpha / \beta)
To remove immediate left recursion of the form
(where (\beta) does not start with (A)), the standard transformation introduces a new nonterminal (A') and rewrites the grammar as:
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
After removing immediate left recursion from grammar , which production is created for ?
Explore Related Topics
Which Automaton Accepts Regular Languages? The Correct Answer Is DFA
The deterministic finite automaton (DFA) is the canonical model that exactly accepts regular languages, whereas PDA, LBA, and Turing machines recognize strictly larger language families.
- A language is regular iff some DFA accepts it: .
- DFA ↔ regular languages; PDA ↔ context‑free; LBA ↔ context‑sensitive; Turing machine ↔ recursively enumerable.
- Regular languages form the base of the hierarchy: .
- DFA’s finite memory limits it to patterns like “ends with 01” or “even number of 1’s”, but it cannot handle unbounded counting such as .
Ambiguity in Context-Free Grammars, Disambiguation Techniques, and Analysis of the Grammar $S \rightarrow aS/Sa/a$
Regular Expression Equivalence: Which Pairs Generate the Same Language?