LESSON 3.C1 · 6 STAGES · 3 CONTROLS · 3 CHECKSPRO · PREVIEW
Four searches on one graph
Watch four searches cross one 12-node graph, and see what each one finds.
Pro lesson. Stage 1 is free to watch. Pro opens all 6 stages, 3 controls and 3 checks, in this lesson and every other.
Go Pro · $8.25/moEXPLAINER · 3.C1 · SEARCH BAY12 NODES · 16 EDGES · F TO D
01
Stage 1 of 6 · One graph
Each search walks this graph from F to D. It takes nodes from a frontier, each search in its own order.
Explain it simply
You see 12 nodes, the circles, joined by edges, the lines. Each number is the edge's weight, the cost to cross it. The grey bar is a wall, so no edge crosses it. Every search starts at F and looks for D. It keeps a list of nodes to visit next, called the frontier.
A grid of 12 nodes, A to L, with 16 edges. The start is F and the goal is D. BFS finds the path F, G, H, D, 3 edges at cost 7.
not reachedfrontier (ring), expanded, gedge weight, guess hpath foundextra work or costwall
Toy: 4 × 3 grid · 12 nodes · start F · goal D
MATH · STAGE 1HOVER A SYMBOL OR A SHAPE
A path costs the sum of its edge weights.
PRO LESSON · YOU WATCHED STAGE 1 OF 6
Unlock the full explainer
- 5 more stages and 3 live controls
- 2 mix-up cards and 3 predict-then-reveal checks
- Watch it as a narrated video, in three voices
- Every Pro lesson and capstone · 656 in total
$99 a year, or $15 a month. Cancel any time.