0

It is well-known that the language over $T$ with at least 2 symbols is nondeterministic. for simplicity, the language $\{ww^R: w\in\{a,b\}\}$ (even-length palindroms of $a$, $b$) is context-free, but cannot be accepted by any deterministic PDA. The idea of proof is desribed, e.g., by Hopcroft, Ulman, Motwan in 'Introduction to Automata Theory, Languages. and Computation', but I cannot find complete proof. I saw reference for variation of pumping lemma for deterministic CFL, but now cannot find it too. So. the question: does anyone know where is the proof that the language $\{ww^R: w\in\{a,b\}\}$ is not deterministic?

Thanks in advance

Spectorsky
  • 103
  • 2
  • Yes, now I see reference to Sheng Yu article: A pumping lemma for deterministic context-free languages. It can solve my question. – Spectorsky Apr 27 '18 at 14:40
  • The original book by Hopcroft and Ullman has a solution of this question using closure properties instead of a special pumping property. The closure property used is one that is valid for DCFL and not for CFL: $\min(L) = {x ∈ L \mid \text{ no proper prefix of $x$ is in $L$} }$. – Hendrik Jan Apr 27 '18 at 16:16
  • Hendrik Jan, thanks for reply. Indeed, the book 'Formal Languages and Their Relation to Automata' states that the language $L={ww^R:w\in\Sigma}$ is not deterministic: Excersice12.6b, with hint to Theorem 12.5 (clousness of dcfl with respect to min and max). However, there is confusing about what is it 'prefix'. I couldn't find definition of prefix in the book, proper prefix of w is defined as prefix not equal to w. So, with intuitive notion, $\varepsilon$ is prefix of any w, $\varepsilon\in L$. So, $\min L={\varepsilon}$ is deterministic, and no contradictory is found. – Spectorsky Apr 29 '18 at 08:50
  • Your argument is right, but only works if $\varepsilon\in L$. In general $\min L \subseteq L$, words are thrown out if one of their prefixes is also in $L$, see the definition above. So $\min a^b = a^b$ as the language contains none of its prefixes. Also $\min {a^ib^j \mid i\le j} = {a^nb^n \mid n\ge 0 } $. – Hendrik Jan Apr 29 '18 at 12:03
  • Thanks for reply. And what about $L={ww^R:w∈{a,b}^∗}$? (By the way, previously ${}^∗$ was errorneously missed.) I see that $\min L={ε}$, because $ε\in L$. So, , $\min L={ε}$ is obviously deterministic. Maybe, Hopcroft and Ulman meant that proper prefix of w is prefix that neigther equal to w nor empty.... – Spectorsky Apr 29 '18 at 19:59
  • No, H&U do not apply the operation to the $ww^R$ language directly. They first intersect with a well-chosen regular language (which I guess does not contain $\varepsilon$). – Hendrik Jan May 01 '18 at 23:41
  • 1
    Yep, and it should be something like $a^bba^+a^bba^bba^*$ (via regular expression). Intersection of dcfl and regular language is dcfl, its min is (hope that I haven't mistaken) $L_0={a^nbba^n: n\ge0}\cup{a^nbba^mbba^n: n> m\ge0,}$. Obviously, $L_0$ is not cfl at all (pupmping lemma). So, $ L={ww^R:w∈{a,b}^∗}$ is not dcfl. Moreover, we have a counter-example for a fact that cfl class is not closed with respect to min. – Spectorsky May 05 '18 at 20:21

0 Answers0