Find the highest type number, specified by following grammar. S → 0SBA | 01A…
2025
Find the highest type number, specified by following grammar.
S → 0SBA | 01A
AB → BA
1B → 11
1A → 10
0A → 00
- A.
Type – 3 (Regular)
- B.
Type – 1 (Context sensitive)
- C.
Type – 2 (Context free)
- D.
None of the above
Attempted by 13 students.
Show answer & explanation
Correct answer: B
The production rule AB → BA contains two non-terminals on the left-hand side. Type 2 and Type 3 grammars require exactly one non-terminal, so this violates those constraints. Therefore, the grammar is classified as Type 1 (Context-sensitive) under the Chomsky hierarchy.