3D Data Structures · No. 2

Graph Net

Breadth-first, depth-first and Dijkstra on a net of strings. Lift the start knot and the net leaves the plinth in order of distance.

vs
Graph Net
Selected knot
Distance
Parent

How to read the net

Each knot is a node and each string is an edge. The number on a string is its weight. In Dijkstra it is also the string’s length; BFS and DFS ignore weights and count every string as one step.

The panel on the right is the lesson. BFS keeps a queue, so it spreads in rings. DFS keeps a stack, drawn as one cobalt thread that dives and reels back. Dijkstra keeps a priority queue that always hands out the cheapest ticket.

The lift. Hold the start knot by a wire and raise it. A knot leaves the plinth only when the strings on its cheapest route are pulled straight, so knots lift off in order of distance and each hangs exactly its distance below the start. The taut strings are the shortest-path tree.

Drag to orbit · scroll or pinch to zoom · right-drag or two fingers to pan.
With Move, drag a knot, click a knot to inspect it, or click a weight to change it.
Space play or pause · ← → step · ? this card · Esc close