What is the highest type number that can be assigned to the following grammar?…
2016
What is the highest type number that can be assigned to the following grammar?
S → Aa
A → Ba
B → abcAnswer: D. Type 3 — This grammar is classified as Type 3 (Regular). The productions S → Aa and A → Ba are left-linear, meaning non-terminals appear on the left side of terminals.…
- A.
Type 0
- B.
Type 1
- C.
Type 2
- D.
Type 3
Attempted by 188 students.
Show answer & explanation
Correct answer: D
This grammar is classified as Type 3 (Regular). The productions S → Aa and A → Ba are left-linear, meaning non-terminals appear on the left side of terminals. Although B → abc has multiple terminals, finite regular languages often permit terminal strings in base cases under standard educational conventions. Since the grammar generates a finite language using left-linear rules, it fits Type 3.
Explore the full course: Iocl Engineers Officers Grade A Paper 2