2

If a $PDA$ can be constructed to check whether a string is not a computation history for a Turing Machine. Like in the proof of $ALL_{CFG}$ is not decidable.

Then we can construct a $PDA$ that accepts all computation histories of a Turing machine $A_{TM}$ on a string $\omega$. This $PDA$ can then be converted into a CFG (Context-Free Grammar). We can use the decider for $E_{CFG}$ to determine whether the language of this CFG is empty.

If $A_{TM}$ does not accept the string $\omega$, there will be no valid computation histories, and thus $L(CFG)$ will be empty. Conversely, if $A_{TM}$ accepts the string $\omega$, there will be valid computation histories, and $L(CFG)$ will not be empty.

My question is: If we can decide whether $L(CFG)$ is empty based on the above construction, does this mean we can decide $A_{TM}$?

Air Homely
  • 21
  • 2

1 Answers1

0

Where your reasoning went awry was the sentence "Then we can construct a PDA that accepts all computation histories..."

Context-free languages are not closed under complement. A language $L$ can be context-free, but its complement ($\overline{L}=\{x \mid x \notin L\}$) need not be context-free.

The set of all strings that are not valid computation histories (call it $L$) is context-free. The set of all strings that are valid computation histories (i.e., $\overline{L}$) is not context-free. Therefore, there is no PDA for it, no context-free grammar for it, no way to test whether it is empty.

You can test whether $L$ is empty. But we have no way to test whether $\overline{L}$ is empty.

D.W.
  • 167,959
  • 22
  • 232
  • 500