Computer Science EngineeringVery hard

Which of the following languages requires a nondeterministic pushdown automaton (cannot be accepted by a deterministic PDA)?

  1. A. {a^n b^n | n >= 0}
  2. B. {w w^R | w in {a,b}*}
  3. C. {w c w^R | w in {a,b}*}
  4. D. {a^n b^m | n, m >= 0}

Correct answer: B. {w w^R | w in {a,b}*}

Without a middle marker a PDA must guess where the string midpoint lies, which needs nondeterminism.

More Theory of Computation, Compilers & Digital Logic (ISRO CS) questions

Exams that ask this topic