Foundations — NFA — formal definition, epsilon transitions
Before you can read a single line of the parent note, you need a small toolbox. This page builds each tool from nothing — plain words first, then the picture, then why the NFA needs it. Nothing is used before it is defined.
1. A set — the bag that holds things
The picture: imagine a real cloth bag with three labelled marbles inside. Shaking the bag changes nothing — and are the same set.
Why the topic needs it. The whole point of an NFA is that after reading a symbol you may be in several states. "Several states" is exactly a set of states. Without the idea of a bag we could not even say "the machine is in right now."

2. Subset and — a smaller bag inside a bigger one
The picture: a big circle ; a smaller circle drawn entirely inside it. Nothing of pokes out.
Why the topic needs it. The parent writes — the accepting states are a smaller bag sitting inside the bag of all states . Some states win, some don't; the winners are a subset.
3. The power set — the bag of ALL possible bags
This is the trickiest symbol in the parent note, so we build it slowly.
The picture: if , lay out every sub-bag you can make: That is bags. In general a set of items has subsets, because each item is independently either in or out.
Why the topic needs it. The parent note's transition rule (a rule we build fully in §4) will hand back a set of states. To describe "returns a set of states — one, many, or none" precisely, we need the collection of all possible such sets. That collection is exactly , and being able to return any member of it is what will give the NFA its multiple/zero targets.

4. A function, its arrow , and the NFA transition rule
The picture: a little vending machine. You press a button (input); one item drops out (output). Same button always gives the same item.
Why the topic needs it. is the heart of the machine — the rule that tells it where it may go. Its arrow's left side (input) and right side (output) are the definition of the machine's behaviour.
5. The Cartesian product — pairing two bags
The picture: a grid. List down the left, across the top; every cell is one pair. If has 3 items and has 2, the grid has cells.
Why the topic needs it. The input to is a pair (which state am I in, which symbol did I just read). You always need both to decide the next move, so the input must be a pair, and pairs come from a Cartesian product. The exact bags being paired are named in §6–§8.

6. The alphabet and strings
The picture: is your box of alphabet tiles; a string is a row of tiles laid left-to-right; is the infinite catalogue of every row you could ever lay, from length 0 upward.
Why the topic needs it. The machine's job is to answer "is this string in the language?" for strings drawn from . The set of all strings the machine accepts is a subset of that catalogue (we name that set in §10).
7. Epsilon — the empty string
The picture: a completely blank row on the table. There is a row there (it exists), it just holds nothing.
Why the topic needs it. ε-transitions — letting the machine change state without reading input — are one of the two superpowers of an NFA. You cannot describe them without a name for "no symbol."
8. Union and intersection — combining bags
The picture: two overlapping circles (a Venn diagram). Union shades both circles; intersection shades only the overlap.
Why the topic needs it.
- uses union to bolt the free-move label onto the real symbols — this is exactly the input-symbol side of .
- Intersection powers the acceptance test we meet in §9: do any of the states I ended in overlap with the winning states? If the overlap is non-empty, the machine accepts.
9. Running a whole string: , then "there exists"
(from §4) answers only for one symbol. To run an entire string we need a companion rule that applies symbol after symbol.
The picture: many trails leaving a trailhead. If even one trail reaches the summit, you "reached the summit." The failed trails don't count against you.
Why the topic needs it. This is the heartbeat of nondeterminism. The acceptance test says: the final cloud must share at least one state with the winning set — written . This literally means "there exists a surviving path that ends on a winner." Contrast this with the wrong idea ("all paths win"), which the parent flags as a classic mistake.
10. Naming the whole machine: and its language
The picture: is the whole vending machine sitting on the table; is the list of every input string that makes its "accept" light turn on.
Now every symbol in the parent's central definition is earned: Read it aloud: " takes a pair (§5) — a state and a (symbol-or-free-move) — and returns a set of states." That single line is nondeterminism.
Every arrow above feeds the parent topic NFA formal definition. These same foundations also power DFA — formal definition, Subset Construction (NFA to DFA), Regular Languages, Regular Expressions, and Closure Properties of Regular Languages.
Equipment checklist
Cover the right side and test yourself — if any line stumps you, reread its section.
A set — what is it, and does order matter?
What does mean, and is it an error in an NFA?
What does say?
What is , and if has some number of states , how many members does it have?
Can a function whose output is return many states?
What is ?
What does do, and why is its input a pair?
Is in ?
What does give you?
What does mean in the acceptance rule?
"Accept" uses which logic — for-all or there-exists?
What is ?
Recall Quick self-check
- where is a single item ::: (two members).
- ::: .
- Is always true? ::: Yes — the empty set is a subset of every set.