All mock tests are FREE till 31 December — register to save your progress

Match List I with List II. List I: A. Type 3 Grammar, B. Type 2 Grammar, C. Type 1 Grammar, D. Type 0 Grammar. List II: I. V → (V ∪ Σ)*; II. λVβ → λ(V ∪ Σ)*β, where λ, β ∈ (V ∪ Σ)*; III. (V ∪ Σ)* → (V ∪ Σ)*; IV. V → VΣ | Σ

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. A → IV, B → I, C → II, D → III

Explanation

Type 3 (regular) rules have one terminal with at most one non-terminal: V → VΣ | Σ. Type 2 (context-free): single variable on the left. Type 1 (context-sensitive): a variable rewritten in context λ_β. Type 0: any string on either side.

More Theory of Computation and Compilers questions