The following Grammar is — S → aSb | bac | aB S → aSb | b S → aabb | ab bca →…

2022

The following Grammar is — S → aSb | bac | aB S → aSb | b S → aabb | ab bca → bdb | b

  1. A.

    Type-0 (Unrestricted Grammar)

  2. B.

    Regular

  3. C.

    Context sensitive

  4. D.

    LR(k)

Attempted by 78 students.

Show answer & explanation

Correct answer: A

  • 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 Context-Sensitive → length decreases in bca → b

✔️ Therefore, the grammar belongs to Type-0 (Unrestricted Grammar)

Explore the full course: Bpsc