简体   繁体   中英

Pushdown Automata for the Language {wwR | w∈{0,1}*}

I am currently enrolled in the undergraduate version of Theory of Computation at my university and we are discussing Pushdown Automata, Turing Machines, and the Church-Turing Thesis.

In our homework problem sets, my professor asked the following question:

Construct a PDA for the language {wwR | w∈{0,1}*}.

However, in our class lecture slides, he wrote the following

Not every nondeterministic PDA has an equivalent deterministic PDA. For example, there does exist a nondeterministic PDA recognizing the following language, but no deterministic PDA can recognize this language: 在此处输入图像描述

So, my question is whether or not it is possible to write this deterministic PDA or not? I have tried researching it online for the past two hours, but have found no problems which discuss this problem specifically.

There is no deterministic PDA for this language. Which is the same as to say that there is no deterministic context-free grammar for it. The non-deterministic one in ABNF meta-syntax is:

a = ["0" a "0" | "1" a "1"]

The inability to create a deterministic PDA comes from the fact that the decision to accept/reject the input is based on the length of the input (a palindrome in this case). The PDA have no machinery that enables it to make decisions based on the length (you cannot use that "half of the input was accepted by now").

Imagine that at every input character "0"/"1" you push into the PDA's stack "0"/"1" and remain in the same state. Then for the input character that is the same as the previous you are facing a decision, should you push it into the stack and remain in the same state, or you have to start to recognize the reverse of the previously found input characters. There is no way to know what decision to make, based on the input character itself, the last pushed character into the PDA's stack (that is the same as the input character at this moment of time) and the current state of the PDA. You need to know the length of the input, and if you are in the middle of it, you can start to accept the reverse, else you remain in the same state.

There is nothing you can re-arrange, so that a deterministic decision become possible. The only way that remains is to explore both of the decision paths, every time that is needed, and to experience non-linearity.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM