Library

Moore · Rational transduction

Combination lock: 1101

Opens exactly when the last four digits entered were 1101. The fallback edges reuse overlapping progress instead of resetting — a Moore machine doing KMP string matching in hardware.

idle111110OPEN0101010101
The machine as drawn — 5 states, 10 transitions.

The author’s examples, run

1101 → accept · ····OPEN111101 → accept · ······OPEN1101101 → accept · ····OPEN··OPEN1111011 → reject · ······OPEN·0110 → reject · ·····