GATE Computer ScienceVery hardGATE CS (PYQ pattern)
For a language L, the derivative u⁻¹L is { w : uw ∈ L }. Let L be the language of the regular expression (a + b)*a(a + b)(a + b). Which expression denotes (ab)⁻¹L?
- A. (a + b)*a(a + b)(a + b)
- B. (a + b)*a(a + b)(a + b) + a + b
- C. (a + b)*a(a + b)(a + b) + a + b + ε
- D. (a + b)(a + b)
Correct answer: B. (a + b)*a(a + b)(a + b) + a + b
abw has its 3rd symbol from the right equal to a when w is a single symbol (then the a of 'ab' is third from the end), and for |w| ≥ 3 w must itself be in L. Hence L + a + b; ε is not included because ab is too short.
More Theory of Computation questions
- For a language L, the derivative u⁻¹L is { w : uw ∈ L }. Let L be the language of the regular expression (a + ba)b. Which expression…
- For a language L, the derivative u⁻¹L is { w : uw ∈ L }. Let L be the language of the regular expression (aa + b). Which expression…
- How many strings of length 20 over {a, b} do not contain aaa as a substring?
- How many binary strings of length exactly 16 (leading zeros allowed) represent a number divisible by 5?
- How many binary strings of length 12 contain no two consecutive 1s and, read as a binary number (leading zeros allowed), are divisible by 3?
- How many binary strings of length 12 have the number of occurrences of 01 equal to the number of occurrences of 10?