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

Consider L = {ab, aa, baa}. Which string is NOT in L*?

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

Show answer & explanation

Correct answer: A. baaaabaaaaa

Explanation

In baaaabaaaaa the first b must start 'baa'; then 'aa'; the second b can start 'baa' (leaving 'aaa', odd) or end 'ab' (leaving a single 'a' before it). Neither splits completely, so it is not in L*. The others split, e.g. ab·aa·baa·ab·aa.

More Theory of Computation and Compilers questions