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 .

549 questions
6
votes
3 answers

Can you pop 2 elements at a time in a PDA

My question is N(a)=2N(b) ; No of a's = 2 * No of b's . So for every symbol b can I pop 2 a's simultaneously
Tanvi
  • 61
  • 1
  • 1
  • 2
4
votes
2 answers

Does a PDA immediately accept if at final state with empty stack?

If computation on a PDA reaches a final state with an empty stack, will it immediately accept, regardless of whether or not the input tape has ended. For example if I have a PDA to recognize the language of strings where $a^nb^n$, if it was fed the…
tpm900
  • 365
  • 1
  • 4
  • 15
4
votes
1 answer

Pushdown automation where number of letter `a` is at least as twice as letter `b` in the word

I have talked to my friend and he said this is the only place somebody could know how to solve it. It is the only exercise(from around 80) from exam revise I just do not know how to do at all. Create pushdown automation for {w: #a(w) >= 2#b(w)}; and…
3
votes
2 answers

How to understand pushdown automata intuitively?

What is an intuitive way of understanding what a push down automaton is capable of computing?
Kedar
  • 41
  • 4
3
votes
0 answers

Length of an $\varepsilon$-computation in complete DPDA

I consider a deterministic pushdown automaton. Given that there are some differences between definitions, here is mine: the syntax is given $A = (Q, \Sigma, \Gamma, \Delta, q_0, Z_0, F)$, with $q_0\in Q$ is the initial state, $Z_0\in \Gamma$ is the…
Nathaniel
  • 15,071
  • 2
  • 27
  • 52
3
votes
2 answers

Implementation details of "transitions" of Non-deterministic push-down automata

I am reading "Introduction to the Theory of Computation" 3rd edition ~ by Michael Sipser, page 113-114 - topic: "Context free languages, push down automata" He states that the transition from one state to another would look as follows:…
Pratik Hadawale
  • 315
  • 3
  • 14
3
votes
1 answer

Can PDA have empty stack transition?

From a youtube video, this PDA can recognize any palindrom. However, from wikipedia, here is one of the criteria of PDAs. We clearly see that the transition function can't take an empty stack as input, as epsilon is not a part of Gamma. (but it…
rafoo
  • 165
  • 6
3
votes
4 answers

Constructing PDA to accept language { $a^i b^j c^k \mid i,j,k \geq0, i+2k = j$ }

I'm trying to understand the approach to constructing a PDA which accepts the language { $a^i b^j c^k \mid i,j,k \geq0, i+2k = j$ }
Iancovici
  • 665
  • 3
  • 13
  • 26
2
votes
2 answers

Which of the following languages is accepted by this Pushdown Automaton?

This is a question from a past paper. I am struggling to get my head around the concept of a PDA. I understand that it is a Finite Automaton with a stack but am stuck as far as answering questions like this one. Thanks.
epsilontheta
  • 33
  • 1
  • 6
2
votes
1 answer

PDA with an unusual double inequality

I have an odd PDA problem that I cant seem to construct. I haven't come across one like this before. $L = \{w\in\{a,b\}^{*} : 3\#_{a}(w) \leq 5\#_{b}(w) \leq 4\#_{a}(w)\}$ Could I get some pointers on how to tackle such a problem like this so I can…
2
votes
1 answer

Can we push and pop both at a single transition in a PDA?

Let say I have a pda : δ(q1,a,Z)=(q2,aZ) δ(q2,a,aZ)=(q2,bZ) Is this allowed.... you can see that in δ(q2,a,aZ)=(q2,bZ), we are basically popping 'a' and pushing 'b' for a single transition... Is this allowed for PDA ??
Shubham
  • 55
  • 1
  • 2
  • 9
2
votes
1 answer

How does Sipser's 0n1n PDA reject 0101?

In Sipser's Theory of Comp in 2.2 the following PDA is provided for ${\{0^n1^n|n\ge0}\}$. I follow how to process "", "01", "0011". I want to reject "0101", however it seems one of the nondeterministic paths makes it to accept. I'm probably…
2
votes
0 answers

Is the following PDA a DPDA or NPDA?

Let the language be : $$ L = \{ w \in \{a,b\}^* : \#_a(w) = \#_b(w)\}. $$ Now the PDA that I've designed for this language and seen at many other places is : Let the PDA be denoted by M such that, M = ({q0,q1}, {a,b}, {z0, a,b}, q0, delta, z0,…
Argon
  • 93
  • 6
2
votes
1 answer

PDA for the language of strings containing the same number of a and b

Need idea for solving the following pushdown automata: $\mathcal{L}=\{w\in\sum ^* | \#a(w)=\#b(w),|w|\geqslant 0\} \,\,\,\, \sum=\{a,b\}$ In the beginning I thought to PUSH A for input a, and then to POP A for input b, but it doesn't work well for…
Devy
  • 123
  • 2
1
vote
1 answer

PDA pushing nothing given an input and the current stack top

If we had a language $$\sum = \{a,b,c\}$$ for a pushdown automata, and the transition $$a;A/AA$$ means "If you read in an a and A is at the top of the stack, push A", then would you be able to push nothing if you encounter an a and A is at the top…
Paradox
  • 320
  • 5
  • 18
1
2 3 4