Skip to content
Tape‑n‑Trace
PracticeSearch 26 tools

← All case studies

Digital lock

CO1BTL 4 – AnalyzeSDG 16 — Peace, Justice & Strong InstitutionsModule 1

A PIN pad that opens on 2317. It is exactly the keyword-recognising DFA of §2.4 with a single keyword, which is the interesting observation: a lock does not need to remember what you typed, only how much of the PIN you are currently part-way through. A wrong digit does not reset it to the start — it drops to the longest prefix of the PIN that the last few digits still match.

1, 3, 721, 723123, 71, 3271, 3, 72start2232312317
Try
1, 3, 721, 723123, 71, 3271, 3, 72start2232312317

Input

0 of 4 read

Narration

start

Start in state start with "2317" still to read.

Hopcroft 2e, §2.2.4

Accepted

Run many strings

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