The following Grammar is — S → aSb | bac | aB S → aSb | b S → aabb | ab bca →…
2021
The following Grammar is — S → aSb | bac | aB S → aSb | b S → aabb | ab bca → bdb | b
Answer: A. Type-0 (Unrestricted Grammar) — Not Regular → because rules like S → aSb are not allowed in regular grammar Not Context-Free → LHS must be a single non-terminal (violated by bca → ...) Not…
- A.
Type-0 (Unrestricted Grammar)
- B.
Regular
- C.
Context sensitive
- D.
LR(k)
Attempted by 106 students.
Show answer & explanation
Correct answer: A
Not Regular → because rules like
S → aSbare not allowed in regular grammarNot Context-Free → LHS must be a single non-terminal (violated by
bca → ...)Not Context-Sensitive → length decreases in
bca → b
✔️ Therefore, the grammar belongs to Type-0 (Unrestricted Grammar)
Loading lesson…