Draw it, run it, prove it.
Theory of Computation
step by step
DeltaDraw is a free companion for a Theory of Computation course. Pick your chapter, draw the machine, and watch it compute one step at a time: finite automata, regular expressions, grammars, pushdown automata and Turing machines, through decidability and NP-completeness.
Follows Michael Sipser, Introduction to the Theory of Computation, 3rd edition (Cengage Learning, 2013). Section, example and theorem numbers on this site match the book.
Chapters
Follows the chapter order of Sipser, Introduction to the Theory of Computation (3rd edition). Choose the section your class is on.
Regular languages
Finite automata
Draw DFAs, test strings, minimize step by step, and combine machines: union, intersection, complement and equivalence.
Nondeterminism
Simulate NFAs and ε-NFAs, and convert an NFA to a DFA step by step with the subset table.
Regular expressions
Regular expression to NFA and NFA to regular expression, step by step. Test strings and compare expressions.
Nonregular languages
Prove a language is not regular with the pumping lemma, played as a game against an adversary.
Context-free languages
Context-free grammars
Test strings, draw parse trees and leftmost derivations, find ambiguity, and convert to Chomsky normal form and CYK step by step.
Pushdown automata
Draw a PDA, run strings step by step with the stack drawn beside it, and convert a grammar to a PDA.
Non-context-free languages
Prove a language is not context-free with the pumping lemma for CFLs, case by case.
The Church–Turing thesis
Decidability and reducibility
Time complexity
Exercises and exams
Practice exercises
22 exercises on DFAs, NFAs, minimization and regular expressions. Press Check and get a counterexample if it is wrong.
Practice: grammars, PDAs, TMs
28 exercises in the Practice tab of the Grammars (13), Pushdown automata (8) and Turing machines (7) pages, checked with counterexamples.
Exam mode
A drawing-only version for proctored online exams. Answers are saved as images for Canvas.