Skip to content
Tape‑n‑Trace
PracticeSearch 26 tools

← All machines

DFA — contains 01

Strings over {0, 1} that contain 01 as a substring.

Try
01010, 1q0q1q2

Input

0 of 4 read

Narration

q0

Start in state q0 with "0110" still to read.

Hopcroft 2e, §2.2.4

Accepted
Deterministic finite automatonHopcroft 2e §2.2 — δ̂

Exactly one move per state and symbol, so a run is a single path. The string is accepted if that path ends in an accepting state.

Also written DFSM, deterministic finite state machine in the question papers.

This machine3 states
Q
{q0, q1, q2}
Σ
{0, 1}
q₀
q0
F
{q2}
|δ|
6 transitions
How to read the run
  • One state is current at a time; it is outlined in blue.
  • The transition just taken is drawn in blue, and the symbol just read is boxed.
  • If a state has no move on the next symbol, the run dies there and the string is rejected — that is the implicit dead state a textbook diagram leaves off.

Run many strings

One string per line. A blank line means the empty string.