Consider the languages:
- , where is a special symbol
Which one of the following is TRUE?
View worked solution
Answer: B
Let's analyze each language individually:
- : This is the language of even-length palindromes. Because there is no marker to indicate the boundary between and , a pushdown automaton (PDA) must non-deterministically guess the midpoint to start popping from the stack. Therefore, is a Context-Free Language (CFL) but not a Deterministic CFL (DCFL).
- : The presence of the special marker clearly separates from . A Deterministic PDA (DPDA) can push the symbols of onto the stack, transition on reading without changing the stack, and then match the remaining input with the popped symbols of the stack. Since it can be recognized by a DPDA, is a Deterministic CFL (DCFL).
- : This is the copy language. To recognize , we need to match the first half of the string with the second half in the exact same order (FIFO). Since a PDA uses a LIFO stack, it cannot recognize this language. Using the pumping lemma, it can be proven that is not a CFL at all.
Comparing these findings with the options:
- Option A is false because is non-deterministic.
- Option B is true because is a DCFL.
- Options C and D are false because is not a CFL.
Free practice · Your answers on this page are not saved.
