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

Match List I with List II
List IList II
A. Type 3 GrammarI. V → (V ∪ Σ)*
B. Type 2 GrammarII. αVβ → α(V ∪ Σ)⁺β, where α, β ∈ (V ∪ Σ)*
C. Type 1 GrammarIII. (V ∪ Σ)* → (V ∪ Σ)*
D. Type 0 GrammarIV. 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): V → VΣ | Σ (A-IV). Type 2 (context-free): V → (V ∪ Σ)* (B-I). Type 1 (context-sensitive): αVβ → α(V ∪ Σ)⁺β (C-II). Type 0 (unrestricted): (V ∪ Σ)* → (V ∪ Σ)* (D-III).

More Theory of Computation and Compilers questions