GATE Computer ScienceHardGATE CSE · NIELIT
How many of the following statements are true? (i) DCFLs are closed under complement. (ii) CFLs are closed under intersection with a regular language. (iii) CFLs are closed under set difference. (iv) Recursive languages are closed under union. (v) Recursively enumerable languages are closed under complement. (vi) Context-sensitive languages are closed under complement. (vii) DCFLs are closed under union. (viii) Regular languages are closed under infinite union.
- A. 4
- B. 3
- C. 5
- D. 6
Correct answer: A. 4
True: (i), (ii), (iv), (vi). False: (iii) (complement would follow), (v) (L and L̄ both RE implies recursive), (vii) and (viii) (e.g. the union of the singletons {aⁿbⁿ} is non-regular).
More Theory of Computation questions
- Among the six languages L₁ = {aⁱbʲcᵏdˡ : i = k and j = l}, L₂ = {aⁱbʲcᵏ : i = j or j = k}, L₃ = {wwᴿ : w ∈ {a,b}}, L₄ = complement of…
- A DFA reads a binary string least-significant bit first (so the first symbol read is the 2⁰ bit) and must accept exactly the strings whose…
- How many strings of length at most 6 (the empty string included) over {a, b} belong to L(aba)?
- An ε-NFA over {a, b} has states 0–4, start 0, accepting state 4. Moves: 0 –ε→ 1; 0 –a→ {0,1}; 1 –b→ 2; 2 –ε→ 3; 3 –a→ {3,4}; 4 –b→ 2. How…
- A Mealy machine starts in S0. Transitions (state, input → next state / output): (S0,0 → S0/0), (S0,1 → S1/1), (S1,0 → S2/1), (S1,1 →…
- How many strings of length at most 5 over {0, 1} (the empty string included) contain the substring 00 and also have an even number of 1s?