GATE Computer ScienceHardGATE CSE · UGC NET
Consider these problems: (a) Given a DFA M, is L(M) empty? (b) Given two CFGs G₁, G₂, is L(G₁) ∩ L(G₂) = ∅? (c) Given a TM M and input w, does M halt on w within 10⁶ steps? (d) Given a CFG G and a regular expression R, is L(G) ⊆ L(R)? (e) Given a PDA P, is L(P) regular? (f) Given a TM M, does L(M) contain at least 3 strings? How many of these are undecidable?
- A. 2
- B. 4
- C. 5
- D. 3
Correct answer: D. 3
(b) intersection emptiness of CFGs, (e) regularity of a CFL and (f) a non-trivial property of L(M) (Rice) are undecidable; (a), (c) and (d) (L(G) ∩ complement(R) is a CFL, test emptiness) are decidable.
More Theory of Computation questions
- How many of the following statements are true? (i) DCFLs are closed under complement. (ii) CFLs are closed under intersection with a…
- 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 →…