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

Consider the regular expressions r = a(b + a)*, s = a(a + b)⁺, t = aa*b. Which relation holds between the languages they generate?

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

Show answer & explanation

Correct answer: B. L(r) ⊇ L(s) ⊇ L(t)

Explanation

r is every string starting with a; s is those of length at least 2; t (a⁺b) is a subset of those. So L(r) ⊇ L(s) ⊇ L(t).

More Theory of Computation and Compilers questions