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 L = {ab, aa, baa}. Which of the following strings is NOT in L*?

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

Show answer & explanation

Correct answer: C. baaaaabaaaab

Explanation

A = ab|aa|baa|ab|aa, B = aa|aa|baa|aa and D = baa|aa|ab|aa are all in L*. In C the final 'b' can only come from 'ab' or start a 'baa'. Every way of splitting the preceding a's leaves a single unmatched symbol, so C cannot be formed.

More Theory of Computation and Compilers questions