GATE Computer ScienceHardGATE CSE
Consider these statements. I. Deterministic context-free languages are closed under complementation. II. Deterministic context-free languages are closed under union. III. The intersection of a context-free language with a regular language is context-free. IV. Deterministic context-free languages are closed under reversal. Which statements are true?
- A. I and III only
- B. I, II and III only
- C. II and IV only
- D. III and IV only
Correct answer: A. I and III only
DCFLs are closed under complement but not union or reversal; CFL ∩ regular is always CFL.
More Theory of Computation questions
- For a Turing machine M given as input, how many of these properties are undecidable? (a) L(M) = ∅ (b) M has at least 5 states (c) L(M)…
- Which of the following languages over {0, 1} is regular?
- A single-tape TM (blank B) starts in q0 at the leftmost symbol of a binary string. Rules: δ(q0,0) = (q0,0,R); δ(q0,1) = (q0,1,R); δ(q0,B)…
- How many strings of length 10 over {a, b} have no three consecutive equal symbols (neither aaa nor bbb)?
- Over {a, b}, L = { w : w contains aab as a substring and |w| is odd }. What is the number of states in the minimal complete DFA for L?
- Decimal numerals are read most significant digit first (empty string = 0, leading zeros allowed). What is the number of states in the…