Traffic light controller
CO1BTL 4 – AnalyzeSDG 11 — Sustainable Cities & CommunitiesModule 1
Red, red-amber, green, amber, back to red — one step per tick "t", with an emergency "e" that drops straight to red from wherever it is. Green is the accepting state, so the machine accepts exactly those tick sequences that leave the light on green. A controller is not really an acceptor, and framing it as one is the modelling step worth noticing.
Input
Narration
Start in state Red with "tt" still to read.
Run many strings
One string per line. A blank line means the empty string.