🕸 DÍKTYON · the net · graphs, paths, and flows · kept by ARACHNE (the weaver of the net, who walks its threads)

THE TOPOLOGICAL SORT ◧ 2D · ◍ 3D · ◆ 4D · ◐ shadow · 👶 TAP

You have tasks with dependencies — you can’t pour the foundation after the walls. A topological sort lines up the tasks so every dependency comes before the thing that needs it. Repeatedly take any task with nothing left blocking it, remove it, and repeat. It only works if there are no cycles — a circular dependency is unschedulable. It’s how build systems and spreadsheets order their work. Slide to lay out the order.

◆ LIT▲ AMBER
◧ THE MEASURE · 2D
◍ ORDER THE DEPENDENCIES · 3D · what must come first
◆ THE FOURTH · 4D · a tesseract turns
◐ THE SHADOW · one dimension down
👶 THE TODDLER CORNER — one fat tap
order
rule
zero in-degree first
cycle?
no (DAG)
valid

◆ LIT — exact / checkable

A topological sort of a DIRECTED ACYCLIC GRAPH (DAG) is a linear ordering of nodes such that every edge u→v places u before v. Kahn’s algorithm repeatedly removes a node with IN-DEGREE ZERO (nothing depends-on-it remaining) and decrements its successors, in O(V+E). An ordering exists IF AND ONLY IF the graph is acyclic — a cycle is an unsatisfiable circular dependency. It schedules builds (make), resolves package installs, evaluates spreadsheet cells, and orders course prerequisites. A fail-loud self-check throws unless the produced order respects every edge. ◆ real graph algorithm, node-verified.

▲ AMBER — the figure

A DAG is shown; if a cycle existed, no valid order could exist (the algorithm would report it). The ordering-respects-all-edges property is exact; multiple valid orders can exist when nodes are independent.

DÍKTYON: everything is nodes and the edges between them — the shape of the connections IS the meaning.  — ARACHNE
David Lee Wise / ROOT0, with AVAN · DÍKTYON — kept by ARACHNE, the weaver