Math 2.0

Computer science Definition

Pushdown automaton

Builds on AlphabetStringFormal languageNondeterministic finite automatonContext-free language

Definition

A pushdown automaton is a tuple M=(Q,Σ,Γ,δ,q0,Z0,F)M = (Q, \Sigma, \Gamma, \delta, q_0, Z_0, F) where:

  1. QQ is a finite set of states;
  2. Σ\Sigma is a finite input alphabet;
  3. Γ\Gamma is a finite stack alphabet;
  4. δ\delta is a function from Q×(Σ∪{ε})×ΓQ \times (\Sigma \cup \set{\varepsilon}) \times \Gamma to the finite subsets of Q×Γ∗Q \times \Gamma^*, the transition function;
  5. q0∈Qq_0 \in Q is the start state and Z0∈ΓZ_0 \in \Gamma is the initial stack symbol;
  6. F⊆QF \subseteq Q is the set of accepting states.

A configuration is a triple (q,w,γ)(q, w, \gamma) with q∈Qq \in Q, w∈Σ∗w \in \Sigma^* the unread input and γ∈Γ∗\gamma \in \Gamma^* the stack, top symbol first. For x∈Σ∪{ε}x \in \Sigma \cup \set{\varepsilon}, X∈ΓX \in \Gamma and (p,β)∈δ(q,x,X)(p, \beta) \in \delta(q, x, X), there is a move (q,xw,Xγ)⊢(p,w,βγ)(q, xw, X\gamma) \vdash (p, w, \beta\gamma). Let ⊢∗\vdash^* be the reflexive and transitive closure of ⊢\vdash. The language accepted by MM is L(M)={w∈Σ∗:(q0,w,Z0)⊢∗(q,ε,γ) for some q∈F, γ∈Γ∗}.L(M) = \set{w \in \Sigma^* : (q_0, w, Z_0) \vdash^* (q, \varepsilon, \gamma) \text{ for some } q \in F, \ \gamma \in \Gamma^*}.

Remarks

Example: for {anbn:n≥0}\set{a^n b^n : n \ge 0} take Q={q0,q1,q2}Q = \set{q_0, q_1, q_2}, Γ={A,Z0}\Gamma = \set{A, Z_0} and F={q2}F = \set{q_2}. The transitions are δ(q0,a,Z0)={(q0,AZ0)}\delta(q_0, a, Z_0) = \set{(q_0, AZ_0)}, δ(q0,a,A)={(q0,AA)}\delta(q_0, a, A) = \set{(q_0, AA)}, δ(q0,b,A)={(q1,ε)}\delta(q_0, b, A) = \set{(q_1, \varepsilon)}, δ(q1,b,A)={(q1,ε)}\delta(q_1, b, A) = \set{(q_1, \varepsilon)}, δ(q0,ε,Z0)=δ(q1,ε,Z0)={(q2,Z0)}\delta(q_0, \varepsilon, Z_0) = \delta(q_1, \varepsilon, Z_0) = \set{(q_2, Z_0)}, and all other values are empty. The machine pushes one AA per aa and pops one AA per bb. It can enter q2q_2 only when the stack is back to Z0Z_0, so it accepts exactly the words anbna^n b^n. Non-example: a machine with two independent stacks is not a pushdown automaton, since clause 4 allows only one stack; two stacks already simulate a Turing machine. Acceptance by empty stack, (q0,w,Z0)⊢∗(q,ε,ε)(q_0, w, Z_0) \vdash^* (q, \varepsilon, \varepsilon) for some qq, gives the same class of languages. A language is accepted by a pushdown automaton if and only if it is a context-free language.

Reading path

To understand this page from the ground up, read these 6 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Alphabet concept
  2. Context-free language concept
  3. Formal language concept
  4. Nondeterministic finite automaton concept
  5. String concept
  6. Pushdown automaton definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Pushdown_automaton
About this page
TagKNWWRAYCSR
URIm2://KNWWRAYCSR
Kinddefinition
WritingW0 stub
MSC68Q45, 68Q04
DefinesPushdown automaton
UsesAlphabet, String, Formal language, Nondeterministic finite automaton, Context-free language
Changed3 November 2026

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • an inventory row: the row of the inventory that the node accounts for (0 of 1)
  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.