FREE Algorithms LESSON · Algorithms
Reason over graphs and flows
Reachability, cuts, greedy choices, and network structure
Graphs turn relationships into a state space that algorithms can traverse.
Vertices represent states or entities and edges represent allowed transitions, dependencies, capacity, or cost. Breadth-first search earns shortest paths only in an unweighted graph; topological order requires acyclicity; minimum spanning trees and shortest paths rely on different greedy invariants; max-flow and min-cut expose a dual view of capacity. Naming what an edge means prevents a familiar algorithm from solving the wrong graph.
Before choosing a graph algorithm, define the semantics of vertices, edges, paths, and the quantity being optimized.
A graph model can create edges the real system does not permit.
Similarity, co-occurrence, reachability, trust, and causality are not interchangeable relations. A route-planning edge may need direction, time windows, capacity, and transfer state; collapsing them can produce a mathematically valid but operationally impossible path. Validate the model against small real cases before optimizing traversal.
Correct traversal of the wrong graph is still a wrong system.