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

Match the LIST-I with LIST-II.
LIST-I (Language)LIST-II (Type of Language)
A. L₁ = {aⁿbᵐ | n, m ≥ 0}I. Unrestricted
B. L₂ = {aⁿbᵐ | (n − m) ≥ 0}II. Context Sensitive
C. L₃ = {aⁿbⁿcⁿdⁿ | n ≥ 1}III. Regular
D. L₄ = {aⁿbᵐcᵐdⁿ | n, m ≥ 0}IV. Context Free
Choose the correct answer from the options given below:

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

Show answer & explanation

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

Explanation

L₁ = aⁿbᵐ with no relation between n and m is exactly the regular language described by the regex a*b*, so A pairs with 'Regular' (III), which is certain. L₂ requires n ≥ m, which cannot be checked by a finite automaton but is easily verified by a single-stack PDA (push on every a, pop on every b, accept if the stack never goes negative), so it is Context-Free — B pairs with IV, also a very standard classification. L₃ = aⁿbⁿcⁿdⁿ needs four separate counts to agree simultaneously, well beyond what a single stack can track, so it is taken here as needing an Unrestricted (Type-0) grammar — C pairs with I. L₄ = aⁿbᵐcᵐdⁿ nests one counting requirement inside another and is taken here as Context-Sensitive — D pairs with II. The overall match is A-III, B-IV, C-I, D-II.

More Theory of Computation and Compilers questions