3

After the total silence in response to my last question, I am rethinking my assumptions. DPDAs are, of course, solvable, and I believe that their loops can be found in the manner I described in my prior question:

  1. arrive at the same state as you were in previously
  2. with the same top symbol as you had last time
  3. without consuming anything on the stack, and
  4. without consuming any input.

But is my last question actually unanswerable because we cannot, in fact, determine whether a NPDA will halt? Is the halting problem even solvable for NPDAs?

Ben I.
  • 1,730
  • 14
  • 26

1 Answers1

1

There is no "minimal normal form" or the like for PDAs. If there was, a first step would be to minimize the PDA. This minimal type of machine would certainly not allow pathological examples like the one in your other post. We can, however, do something similar.

You can convert any NPDA to an equivalent context-free grammar. For these there are ways to remove useless rules and simplify them, and there are normal forms (Greibach and Chomsky). Definitely GNF allows answering the "halting problem", because a word of length n is generated in n steps. Going from GNF back to a PDA you get one with a similar property.

Maybe this method is not satisfactory for you, because you would like a more direct analysis of the given NPDA. But as you have observed, this can be very hard, because of possible very complex epsilon-loops.

To summarize: it is decidable whether for a given NPDA, there exists an equivalent one that always halts. But probably this is always true, because there is (e.g. Greibach NF for all context-free languages).

But you ask about a given PDA, not about whether a halting one exists for the same language. Thus for an answer to your question, one might have to analyze which kind of thing the mentioned grammar transformations eliminate and what that means in terms of PDAs.

Therefore, there is strong evidence that the question is decidable, but I have no definite method. In the transformations, one does not detect whether "useless" loops in the PDA/grammar would halt or not - they are simply eliminated, all of them.

Ben I.
  • 1,730
  • 14
  • 26
Peter Leupold
  • 777
  • 4
  • 9