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

Consider the following statements with respect L = {anbn ∣ n ≥ 0} to the language

S : L2 1 is context free language

S : Lk 2 is conext-free language for any given k ≥ 1 ¯¯¯

S : L L∗ 3 and are context free languages Which one of the following is correct? S S

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

Show answer & explanation

Correct answer: D. 1 2 and 3

Explanation

For L = {aⁿbⁿ}, L² and Lᵏ are CFL (concatenation), L* is CFL (star), and L's complement is CFL since L is a deterministic CFL. All three statements hold.

More Theory of Computation and Compilers questions