◈ Theory of Automata · Live Demo

Smart Parking DFA

Every sensor event is one input symbol. The controller is a deterministic finite automaton M = (Q, Σ, δ, q0, F): feed it events and watch it accept a complete parking visit or fall into the trap state.

L(M) = v f* a p e t x* s g
Hamna Ali Khan CT-24157
Amna Mohsin CT-24169
Muhammad Danish Meraj CT-24268
Muhammad Saraib CT-24255

State diagram double ring = accept · dashed red = trap

transition drawn in δ any other symbol → qR Keyboard: press v a f t i p e s x g to send events, Backspace to undo, Esc to reset
Current state
q0 · Idle
REJECT (not in F)

Send a sensor event highlighted = keeps the car on the accepted path

Input tape

Speed0.7 s

Trace 0 steps

    Parking hardware Moore + Mealy outputs

    Slot LED (Moore)
    Free
    Lot status
    Slots available
    > waiting for a vehicle…
    Exit gate
    CLOSED
    FreeReserved (q2)Occupied (q4–q7)

    Transition table δ 10 × 10 = 100 cells

    Only 12 cells are real moves; every other cell is qR, and δ(qR, any) = qR.