4.6.4 · D1Theory of Computation

Foundations — NFA to DFA conversion — subset construction

1,650 words8 min readBack to topic

Before you can read the parent note, you must own every symbol it throws at you. Below, each item is built in order: plain words → the picture → why the topic needs it. Nothing later uses anything not defined earlier.


1. A "state" — the dot in a machine

Why the topic needs it: the entire construction is about which dots the machine could be sitting on. If you don't picture states as dots you sit on, "set of states" means nothing.


2. The letters , and the alphabet

Why the topic needs it: every transition is "on reading letter …". The DFA we build must give an answer for each letter in — no letter left undefined.


3. The empty move (epsilon)

Why the topic needs it: because the NFA can silently slide along these free edges before and after every real letter, the DFA must chase all such slides. This is the whole reason ECLOSE (item 9) exists.


4. The arrow / transition and (delta)

Why the topic needs it: is the machine. Converting NFA→DFA is really rewriting one rulebook () into another ().


5. The crucial difference: one answer vs. a set of answers

This is the heart of why the topic is hard, so it gets its own figure.

Why the topic needs it: an NFA on reading might land on — a set. A DFA cannot sit on a set of dots. The fix (the topic's big idea): invent a new single dot whose NAME is that set.


6. Sets, , , , and

The construction lives entirely in the language of sets. Four symbols carry it.

Why the topic needs each:

  • appears in MOVE: gather next-dots from every current dot.
  • is the DFA's dead/trap state (no dots alive → reject forever).
  • appears in the accept test ("does the bag touch a final dot?").

7. The power set and why

Why the topic needs it: DFA states are exactly the bags in . This is why the construction is called the subset (powerset) construction, and why it always terminates: there are only possible DFA states, a finite number. See Power Set and Subsets.


8. Start dot and final dots

Why the topic needs it: the DFA's start becomes (item 9), and a DFA bag is accepting iff it touches : .


9. ECLOSE and MOVE — the two derived operations

Everything above now assembles into the two operations the parent note runs.

Why this order: you can only cross an -edge after arriving somewhere by the real letter. Closing before but not after is the parent note's Mistake 2.


The prerequisite map

State = labelled dot

Transition delta = arrow

Alphabet Sigma = input letters

Epsilon = free move

ECLOSE = leak on free edges

NFA gives a SET, DFA gives one dot

Sets: union intersect empty

MOVE = union of next dots

Power set = all bags, size two power n

Subset construction

Start dot and final dots F

DFA with same language as NFA


Equipment checklist

Test yourself — cover the right side and answer aloud.

A "state" pictured as?
A labelled circle/dot the machine sits on.
means?
The fixed alphabet — the box of allowed input letters; never contains .
-transition means?
A free move between dots that reads no input letter.
answers what question?
"On dot , reading , where do I go?"
Key DFA-vs-NFA difference?
DFA's returns exactly one dot; NFA's returns a set of dots.
means?
Dot is inside bag .
means?
Pour both bags together (union), keeping one of each dot.
means?
The two bags share at least one dot.
is used as which DFA state?
The dead/trap state — no live dots, rejects forever.
is?
The set of all subsets (bags) of .
Why at most DFA states?
Each of dots is either in or out of a bag — possible bags.
MOVE computes?
The union of over all — real one-letter step.
ECLOSE computes?
All dots reachable from via -edges, included.
Correct order in ?
MOVE first, then ECLOSE: .
A DFA bag is accepting when?
It touches a final dot: .

Connections