Questions tagged [pushdown-automata]

Questions about state machines with a single stack for memory. They characterize the class of context-free languages.

The best category tag to use with this one is usually .

Except when conversion from or to automata is concerned, do not use when the question is about or properties of that do not relate to automata!

If you are unsure whether your question is about pushdown automata, you may want to check other questions or the Wikipedia page.

Do not use this tag for automata with more than one stack; tag those and .

564 questions
53
votes
2 answers

Is a push-down automaton with two stacks equivalent to a turing machine?

In this answer it is mentioned A regular language can be recognized by a finite automaton. A context-free language requires a stack, and a context sensitive language requires two stacks (which is equivalent to saying it requires a full Turing…
Lazer
  • 1,107
  • 2
  • 10
  • 8
40
votes
2 answers

Are there inherently ambiguous and deterministic context-free languages?

Let us call a context-free language deterministic if and only if it can be accepted by a deterministic push-down automaton, and nondeterministic otherwise. Let us call a context-free language inherently ambiguous if and only if all context-free…
Patrick87
  • 12,924
  • 1
  • 45
  • 77
26
votes
3 answers

Is the language of pairs of words of equal length whose hamming distance is 2 or greater context-free?

Is the following language context free? $$L = \{ uxvy \mid u,v,x,y \in \{ 0,1 \}^+, |u| = |v|, u \neq v, |x| = |y|, x \neq y\} $$ As pointed out by sdcvvc, a word in this language can also be described as the concatenation of two words of the same…
25
votes
1 answer

Decide whether a context-free languages can be accepted by a deterministic pushdown automaton

Given a context-free grammar G, there exists a Nondeterministic Pushdown Automaton N that accepts exactly the language G accepts. (and visa versa) There may also exist a Deterministic Pushdown Automaton D that accepts exactly the language G accepts…
Andrew Tomazos
  • 759
  • 1
  • 7
  • 15
18
votes
1 answer

Construct a PDA for the complement of $a^nb^nc^n$

I am wondering if this is even possible, since $\{a^n b^n c^n \mid n \geq 0\} \not\in \mathrm{CFL}$. Therefore a PDA that can distinguish a word $w\in\{a^n b^n c^n \mid n \geq 0\}$ from the rest of $\{a^*b^*c^*\}$ might as well accept it, which…
18
votes
1 answer

Is it decidable whether a pushdown automaton recognizes a given regular language?

The problem whether two pushdown automaton recognize the same language is undecidable. The problem whether a pushdown automaton recognizes the empty language is decidable, hence it is also decidable whether it recognizes a given finite language. It…
Thomas Klimpel
  • 5,440
  • 29
  • 69
15
votes
2 answers

Does the language of Regular Expressions need a push down automata to parse it?

I want to convert a user entered regular expression into an NFA so that I can then run the NFA against a string for matching purposes. What is the minimum machine that can be used to parse regular expresssions? I assume it must be a push down…
15
votes
4 answers

Push Down Automatons "guess" - what does that mean?

I realize non-deterministic pushdown automata can be an improvement over deterministic ones as they can "choose" among several states and there are some context-free languages which cannot be accepted by a deterministic pushdown. Still, I do not…
lisa
  • 253
  • 1
  • 6
13
votes
5 answers

is it possible to minimize pushdown automata?

is it possible to minimize pushdown automata? If no, why? Is it because for minimization the equivalence classes need to have a finite index and we cannot guarantee that for CFG?
Tom J.
  • 131
  • 3
13
votes
1 answer

Computing the intersection of two NPDA where it is possible

Apropois to Raphael's suggestion on Intersection of two NPDAs: Let $A_1$ and $A_2$ NPDA for context-free languages $L_1$ and $L_2$, respectively. Assuming that we know that $L = L_1 \cap L_2$ is context-free, can we (effectively) construct NPDA $A$…
soandos
  • 1,143
  • 2
  • 10
  • 23
12
votes
3 answers

If $L$ is context-free and $R$ is regular, then $L / R$ is context-free?

I'm am stuck solving the next exercise: Argue that if $L$ is context-free and $R$ is regular, then $L / R = \{ w \mid \exists x \in R \;\text{s.t}\; wx \in L\} $ (i.e. the right quotient) is context-free. I know that there should exist a PDA that…
11
votes
1 answer

How to prove that ε-loops are not necessary in PDAs?

In the context of our investigation of heap automata, I would like to prove that a particular variant can not accept non-context-sensitive languages. As we have no equivalent grammar model, I need a proof that uses only automata; therefore, I have…
Raphael
  • 73,212
  • 30
  • 182
  • 400
11
votes
1 answer

Convert CFG to PDA

Is there any set of rules or methods to convert any context free grammar to a push down automata? I already found some slides online but I wasn't able to understand them. In slide 10 he speaks about some rules could anyone explain that?
10
votes
3 answers

Why do pushdown automata use a stack?

I'm taking a computer theory class and my professor told us that a pushdown automaton cannot use data structures other than a stack (like a queue or multiple stacks). Why is that?
gmelodie
  • 219
  • 2
  • 8
10
votes
2 answers

Decidability of halting problem for DPDAs with $\epsilon$-transitions?

For LBAs it's rather easy to prove the decidability of the halting problem, as there can only be a finite number of different configurations when using limited space. But what about PDAs with $\epsilon$-transitions? Is the halting problem decidable…
1
2 3
37 38