GATE / CS ARCHIVE

GATE CSE 1997 / QUESTION 6.6

Deterministic recognition with a middle marker

Theory of Computation · Pushdown Automata · Full GATE CSE 1997 paper

GATE 1997, Q6.6 2 marks · MCQ
Report issue

Pushdown Automata

Question 6.6, GATE 1997: Which language is deterministic context-free: {wcwR:w∈{a, b}*}, unmarked even palindromes over{a, b, c}, {a^n b^n c^n}, or all palindromes over{a, b, c}?
Question 6.6, GATE 1997: Which language is deterministic context-free: {wcwR:w∈{a, b}*}, unmarked even palindromes over{a, b, c}, {a^n b^n c^n}, or all palindromes over{a, b, c}?
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

For A, the symbol c uniquely marks the midpoint because w uses only a, b. A DPDA pushes symbols before c, then deterministically switches to popping and comparing symbols after c, accepting when they match exactly and input ends. Unmarked palindrome languages require finding an unspecified midpoint and are not deterministic context-free over a multi-symbol alphabet. The equal-three-block language is not even context-free. Hence A. The delimiter’s exclusion from w is essential; without it, the same deterministic switch is unavailable.

Original paper, page 5