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

Let A={a, b} and L=A*. Let X={anbn, n>0}. The languages L U X and X are respectively :

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

Show answer & explanation

Correct answer: C. Regular, Not regular

Explanation

L ∪ X = A* ∪ X = A*, which is regular. X = {aⁿbⁿ | n > 0} is the classic non-regular language.

More Theory of Computation and Compilers questions