All mock tests are FREE till 31 December — register to save your progress
Unit 8 · Theory of Computation and Compilers Paper 2 CS · November 2021

Which of the following languages are not regular? A. L = {(01)ⁿ0ᵏ | n > k, k ≥ 0} B. L = {cⁿbᵏaⁿ⁺ᵏ | n ≥ 0, k ≥ 0} C. L = {0ⁿ1ᵏ | n ≠ k}

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

Show answer & explanation

Correct answer: D. A, B and C

Explanation

Each needs an unbounded counter to compare two quantities (n > k; matching the a's to n + k; n ≠ k), which a finite automaton cannot do. All three are non-regular.

More Theory of Computation and Compilers questions