Skip to main content

Depth-First, Run Whole

This video presents the same text shown beside it, spoken and on screen. It adds nothing the text does not say.

State

A complete depth-first run shows the diving strategy at its best — and exposes what the speed depends on.

Show

Riverbend again, start Home, goal Grandmother's — extensions filed in reverse alphabetical order, so the last filed sits on top. Turn one: select Home; file Home–School, then Home–Bakery on top. Turn two: select Home–Bakery; file Home–Bakery–Park. Turn three: select Home–Bakery–Park; its extensions file with Grandmother's on top. Turn four: select Home–Bakery–Park–Grandmother's. Goal — three roads, four turns, against breadth-first's seven, and the frontier never held more than three paths. Now re-run with alphabetical filing: the dive goes down the School line instead, and on a slightly meaner map the same strategy happily returns a five-road tour while the three-road route sits unexplored.

Watch for

Both runs are the same algorithm; the brilliance and the blunder differ only in filing order.