Eight machines worth reading closely
Each one loads straight into the canvas with a test string already in the input. Run it, then take it apart.
Deterministic Finite Automaton
Even Parity Checker - accepts binary strings with even number of 0s AND even number of 1s. Demonstrates state-based counting.
Non-Deterministic Finite Automaton
String Suffix Recognizer - accepts strings ending with "ab". Demonstrates epsilon transitions and non-deterministic state choices.
Deterministic Pushdown Automaton
Balanced Parentheses Checker - validates that all opening parentheses "(" have matching closing ")" in correct order using stack.
Non-Deterministic PDA
a^n b^n Language Recognizer - accepts strings with equal numbers of "a"s followed by equal "b"s (e.g., "aaabbb"). Classic context-free language.
Turing Machine
Balanced Parentheses Verifier - checks if parentheses are properly nested using tape operations (read/write/move).
Turing Machine: Binary Addition
Binary Number Adder - adds two binary numbers written as x c y (two tapes); the sum is left on tape 1. Demonstrates computational power of TMs.
Mealy Machine
"101" Pattern Detector - outputs 1 when detecting "101" sequence, 0 otherwise. Output is generated on transitions (during state changes).
Moore Machine
"101" Pattern Detector - outputs 1 when "101" is detected. Output is associated with states (not transitions), demonstrating state-based output.
NFA to DFA
Subset construction, with the set of NFA states behind every DFA state.
DFA minimization
The smallest DFA for a language, and which of your states were merged to get it.
ε-NFA to NFA
Remove ε-transitions using ε-closures, on the same states.
Regex to NFA
Thompson’s construction: type an expression, watch the NFA assemble.
NFA to regex
State elimination, one state at a time, down to a single expression.
CFG to PDA
Turn a context-free grammar into a pushdown automaton you can run.
Derivation tree
Type a grammar and a string: watch the leftmost derivation grow the parse tree.