Skip to main content

Compare TM with FA and PDA

Short answer

FA uses finite state memory only, accepts regular languages. PDA adds a stack, accepts context-free languages. TM has infinite tape, read/write, bidirectional; accepts recursively enumerable languages. TM can simulate both; FA ⊂ PDA ⊂ TM. Example: aⁿbⁿ is PDA not FA; aⁿbⁿcⁿ is TM not PDA.

Compare Turing machine with finite automata (FA) and pushdown automata.

PointFinite automaton (FA)Pushdown automaton (PDA)Turing machine (TM)
Memoryonly the current state (finite)one stack (LIFO)infinite tape, read and write anywhere
Inputread-only, left to right, one passread-only, left to righttape; can read, write, move both ways
Head movementright onlyright only (stack top changes)left, right or stay
Languages acceptedregularcontext freerecursively enumerable
Exampleab{ aⁿbⁿ }{ aⁿbⁿcⁿ }, { ww }
Grammarregular grammarCFGunrestricted grammar
DeterminismDFA ≡ NFADPDA < NPDADTM ≡ NTM
Halts always?yesnot necessarily (ε-moves can loop), but membership is decidablemay loop forever
Accepts byfinal statefinal state or empty stackhalting in accepting state
Powerweakestmiddlestrongest (models any algorithm)

Summary. FA ⊂ PDA ⊂ TM in power: a TM can simulate a PDA (using part of the tape as a stack) and an FA, but not the reverse. For example, an FA cannot count without bound, so it cannot accept aⁿbⁿ; a PDA can count with its stack but cannot compare three counts (aⁿbⁿcⁿ), since popping destroys the count; a TM can do both by marking symbols on its tape.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Theory of Computation chapter 4 questions →