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

Let r = a(a + b)*, s = aa*b and t = a*b be three regular expressions. Consider:

(i) L(s) ⊆ L(r) and L(s) ⊆ L(t)

(ii) L(r) ⊆ L(s) and L(s) ⊆ L(t)

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

Show answer & explanation

Correct answer: A. Only (i) is correct.

Explanation

s = a⁺b starts with a (so it is in r) and is a run of a's followed by b (so it is in t). But r contains 'a', which is not in s, so (ii) fails.

More Theory of Computation and Compilers questions