- Home
- Theory of Computation
Theory of Computation
What computers can and cannot compute: automata, grammars, parse trees and Turing machines.
DFA & NFA (Finite Automata)
The simplest model of a computer — states, transitions and accepting states. Run strings through DFAs and NFAs and watch every state light up in 3D.
DFA Minimization
Many DFAs accept the same language. Remove unreachable states, then split groups of states until only truly equivalent states share a group.
Regular Expressions
Patterns for text — and the automata hidden inside them. Type a regex, watch Thompson's construction turn it into an NFA, and run it on your text in 3D.
Pushdown Automata (PDA)
A finite automaton plus a stack. Watch it count a's and b's and check balanced brackets — something no DFA can do — with a 3D stack that grows and shrinks.
Turing Machine
The simplest machine that can compute anything a computer can. Watch the head read, write and move along the tape to add numbers and check palindromes.
CYK Algorithm (Parsing Context-Free Grammars)
Decide if a grammar can generate a string by filling a triangular table with dynamic programming, one substring length at a time.
NFA to DFA Conversion (Subset Construction)
Turn a nondeterministic automaton into a deterministic one by treating each set of NFA states as a single DFA state.
Mealy and Moore Machines
Finite automata that write output as they read. Run Mealy machines (output on the arrows) and Moore machines (output in the states) in 3D, and convert one into the other step by step.
Pumping Lemma for Regular Languages
The standard tool for proving a language is not regular, played as a game. Split s = xyz, pump y up or down in 3D, and check every split the opponent could choose.
CFG Derivations, Parse Trees & Ambiguity
How a context-free grammar builds a string, one rule at a time. Grow the parse tree with leftmost and rightmost derivations in 3D, then find two trees for a+b*c and see why ambiguity matters.
DFA to Regular Expression (State Elimination)
Turn any DFA into a regular expression. Remove states one at a time in 3D and watch every arrow's label grow into a regex, then compare the answers different elimination orders give.
CFG Simplification & Chomsky Normal Form
Clean up a context-free grammar and bring it to Chomsky normal form. Watch ε-rules, unit rules and useless symbols disappear in 3D, then see long rules split into pairs. You can also try your own grammar.
About Theory of Computation
Theory of computation asks what machines can compute. Run strings through DFAs and NFAs, turn a regular expression into an NFA with Thompson's construction, watch a pushdown automaton use its stack, and step through a Turing machine's tape rule by rule — the models behind compilers, regex engines and the limits of computing. The CYK parser and the NFA-to-DFA subset construction connect grammars and automata. Play the pumping lemma game to prove a language is not regular, turn a DFA back into a regular expression, run Mealy and Moore machines that write output, grow parse trees (and catch an ambiguous grammar), and convert any grammar to Chomsky normal form.