Graph Algorithms Mind Map

Algorithm & Systems Visualizations

Every graph algorithms visualization on this site on one map. The branches are the main ideas. Each leaf is a page; the grey line under it is the one thing to remember about it. Click a branch to focus on it, click a page to open it.

Recall mode hides the page names. Read the hint, say the name, then click the "?" to check.

1. How the map is organized

Overview of the graph algorithms mind map: Traversal, Connectivity and order, Shortest paths, Heuristic search, Spanning trees, Flow, matching, coloring, Complexity, Graphs at scale.
The map at a glance: 8 branches, 37 pages.

Ask what the algorithm must produce, and you know its branch:

  • Just which vertices are reachable, in what order? Traversal. Groups or an order of the whole graph (SCCs, topological order, Euler path): connectivity and order.
  • A cheapest path? Exact, with weights: shortest paths. With a goal and a distance guess, often on a grid: heuristic search.
  • A set of edges or an assignment? Cheapest edges joining everything: spanning trees. Capacities, pairs or colors: flow, matching, coloring.
  • Asking how hard a problem is, not how to solve it? Certificates and reductions: complexity.

2. The branches side by side

BranchMain toolTypical timeOutput
Traversalqueue or stackO(V + E)visit order, BFS/DFS tree
Connectivity and orderDFS, indegree queueO(V + E)SCCs, topological order, Euler path
Shortest pathspriority queue, relaxationDijkstra O(E log V), Bellman-Ford O(VE), Floyd O(V³)distances and parents
Heuristic searchpriority queue on g + hdepends on h; best case near path lengthone path to a goal
Spanning treespriority queue or union-findO(E log V)minimum spanning tree
Flow, matching, coloringaugmenting paths, backtrackingEdmonds-Karp O(VE²); coloring NP-hardflow, matching, colors
Complexitycertificate, reductionverify in poly time; best known search 2ⁿNP-complete proof

3. Five facts to remember

  • BFS finds shortest paths only when every edge has the same cost.
  • Dijkstra fails with negative edges; Bellman-Ford handles them and detects negative cycles.
  • A* with an admissible heuristic (never overestimates) still returns a shortest path.
  • A topological order exists only in a DAG; it is the reverse DFS finish order.
  • Max flow equals min cut: the full edges of the min cut limit the flow.

See all graph algorithms pages in the index, or the other mind maps.