2

Is there an efficient algorithm for minimizing a deterministic PDA in terms of states? Is it even computable?

I know that it is not possible to minimize a PDA in general, but my question is about deterministic PDA.

For tools like lexer generators, where occasionally a counter or a stack would be needed to lex languages with string interpolation or other constructs, the question for DPDAs would be interesting as well. The answer - and the algorithm - is well known for deterministic finite automata and to my knowledge, some lexer generator tools do utilize that.

Peter Lenkefi
  • 208
  • 1
  • 8
  • There seems to be a misunderstanding. If you care about minimizing the number of states, it is possible to minimize a PDA: you can always translate the PDA into a PDA with a single state. See https://cs.stackexchange.com/q/37461/755. Do you really mean, minimize the number of states? – D.W. Sep 12 '22 at 20:48
  • Depending on the exact definition of "minimize", minimization seems like it might be decidable, given decidability of equivalence testing: https://en.wikipedia.org/wiki/Deterministic_pushdown_automaton#Equivalence_problem (namely, enumerate all "smaller" DPDAs, by whatever notion of "smaller" you use). Maybe you mean to ask whether there is an efficient algorithm? – D.W. Sep 12 '22 at 20:50
  • @D.W. Yes, I'm specifically asking for an efficient algorithm that could be applied to software mentioned in my OP. – Peter Lenkefi Sep 16 '22 at 08:12
  • Please [edit] your question to correct the mistakes and to include all relevant information the question, so people don't need to read the comments to understand what you are asking. Thank you! – D.W. Sep 16 '22 at 18:02

0 Answers0