GATE Computer ScienceHardGATE CS (PYQ pattern)
Which of the following languages cannot be accepted by any deterministic pushdown automaton?
- A. { aⁿbⁿ : n ≥ 0 } ∪ { aⁿcⁿ : n ≥ 0 }
- B. { aⁿbᵐ : n ≠ m }
- C. { aⁱbʲcᵏ : i = j or j = k }
- D. { w ∈ {a, b}* : n_a(w) = n_b(w) }
Correct answer: C. { aⁱbʲcᵏ : i = j or j = k }
aⁿbⁿ ∪ aⁿcⁿ is deterministic: push the a's and let the first non-a symbol decide which letter to match. aⁿbᵐ with n ≠ m and the equal-count language are DCFLs (counter on the stack). { aⁱbʲcᵏ : i = j or j = k } is inherently ambiguous, and every DCFL has an unambiguous grammar, so no DPDA accepts it.
More Theory of Computation questions
- Which of the following languages is context-free?
- Which of the following unary languages is NOT regular?
- Which one of the following statements is FALSE?
- Which regular expression denotes exactly the set of strings over {a, b} with an EVEN number of a's (zero included)?
- A DFA has 8 states. To decide whether the language it accepts is infinite, it suffices to check whether it accepts some string whose…
- Which of the following statements are correct? I. The reversal of a deterministic context-free language is always deterministic…