Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Graph Theory

Vertices, edges, and the structural questions every network, algorithm, and optimization problem reduces to.

Free to read now, no account needed: Readiness: the graph-theory toolkit. Create a free account to open the other chapters, take the quizzes and keep your progress.

1 Foundations of graphs πŸ”’

Create a free account to open this chapter.

  • What a graph is ~9 min
  • Vertices, edges, and order/size ~8 min
  • Undirected vs. directed graphs ~9 min
  • Simple graphs, multigraphs, and pseudographs ~10 min
  • Weighted graphs ~8 min
  • Degree, isolated, and pendant vertices, revisited ~9 min
  • Subgraphs, induced subgraphs, and spanning subgraphs ~9 min
  • Graph isomorphism, revisited ~10 min
  • Graph representations: adjacency lists ~8 min
  • Graph representations: adjacency and incidence matrices ~9 min

2 Walks, distance, and connectivity basics πŸ”’

Create a free account to open this chapter.

  • Walks, trails, and paths, revisited ~10 min
  • Closed walks, circuits, and cycles, revisited ~10 min
  • Connected components, revisited ~10 min
  • Distance in a graph ~10 min
  • Eccentricity ~8 min
  • Diameter and radius ~9 min
  • The center of a graph ~8 min
  • Choosing the right connectivity vocabulary ~8 min

3 Trees πŸ”’

Create a free account to open this chapter.

  • What a tree is, revisited ~9 min
  • Equivalent characterizations of a tree ~12 min
  • Leaves and internal vertices ~9 min
  • Rooted trees and rooted-tree terminology ~10 min
  • Ordered and binary trees, revisited ~10 min
  • Spanning trees, structurally ~11 min
  • The cut property, previewed ~9 min
  • Counting spanning trees, revisited ~11 min
  • Recognizing a tree by whichever property is easiest to check ~9 min

4 Graph traversal: BFS and DFS πŸ”’

Create a free account to open this chapter.

  • Breadth-first search ~10 min
  • Depth-first search ~10 min
  • BFS and shortest paths in unweighted graphs ~10 min
  • DFS edge classification: tree edges and back edges ~9 min
  • Traversal order and discovery/finish times ~10 min
  • BFS vs. DFS, compared ~8 min
  • Using traversal to test connectivity ~9 min
  • Applications: maze-solving and dependency discovery ~10 min

5 Eulerian and Hamiltonian graphs πŸ”’

Create a free account to open this chapter.

  • Euler walks, trails, and circuits ~10 min
  • The KΓΆnigsberg bridges problem ~9 min
  • Characterizing Eulerian graphs ~11 min
  • Fleury's algorithm ~10 min
  • Hierholzer's algorithm ~10 min
  • Hamiltonian paths and cycles ~10 min
  • Necessary conditions for Hamiltonicity ~10 min
  • Dirac's and Ore's theorems ~11 min
  • Eulerian vs. Hamiltonian, compared ~10 min
  • The traveling salesperson problem, previewed ~9 min

6 Connectivity, cuts, and Menger's theorem πŸ”’

Create a free account to open this chapter.

  • Cut vertices ~10 min
  • Bridges ~9 min
  • Vertex cuts and edge cuts ~10 min
  • Vertex connectivity and edge connectivity ~12 min
  • k-connected graphs ~9 min
  • Blocks ~10 min
  • Menger's theorem ~12 min
  • Network resilience as a connectivity question ~11 min

7 Graph coloring πŸ”’

Create a free account to open this chapter.

  • Proper vertex coloring, revisited ~10 min
  • The chromatic number, revisited ~12 min
  • Greedy coloring ~11 min
  • Why greedy coloring isn't optimal ~10 min
  • Brooks' theorem ~13 min
  • Bipartite graphs and 2-colorability, revisited ~12 min
  • Chromatic polynomials, revisited ~12 min
  • Coloring as scheduling ~11 min

8 Planar graphs and duality πŸ”’

Create a free account to open this chapter.

  • Planar graphs and plane embeddings ~10 min
  • Faces of a plane graph ~9 min
  • Euler's formula for planar graphs ~11 min
  • Edge bounds for planar graphs ~10 min
  • Kuratowski's theorem ~10 min
  • K5 and K3,3 ~10 min
  • Detecting nonplanarity ~9 min
  • Dual graphs ~10 min
  • The Platonic solids as planar graphs ~11 min
  • The four-color theorem and the five-color theorem ~10 min

9 Shortest paths πŸ”’

Create a free account to open this chapter.

  • Weighted graphs, revisited ~14 min
  • Dijkstra's algorithm ~18 min
  • Why Dijkstra's algorithm fails on negative weights ~15 min
  • Bellman-Ford's algorithm ~17 min
  • The Floyd-Warshall algorithm ~17 min
  • All-pairs shortest paths and distance matrices ~16 min
  • Choosing a shortest-path algorithm ~14 min
  • Shortest paths as a modeling tool ~16 min

10 Minimum spanning trees πŸ”’

Create a free account to open this chapter.

  • The cut property, formalized ~12 min
  • Kruskal's algorithm ~13 min
  • Prim's algorithm ~13 min
  • BorΕ―vka's algorithm ~12 min
  • Union-find and disjoint-set structures ~13 min
  • Why the greedy choice works ~13 min
  • Comparing MST algorithms ~10 min
  • Network design as an MST problem ~12 min

11 Directed graphs πŸ”’

Create a free account to open this chapter.

  • Digraphs, revisited ~12 min
  • Directed paths and directed cycles ~12 min
  • Strong vs. weak connectivity ~12 min
  • Strongly connected components ~15 min
  • Condensation graphs ~12 min
  • Directed acyclic graphs ~12 min
  • Topological sorting ~16 min
  • Dependency resolution and course prerequisites ~15 min
  • Ranking a network: PageRank as a directed-graph problem ~16 min

12 Network flow and matching πŸ”’

Create a free account to open this chapter.

  • Flow networks ~14 min
  • Capacities, flow, and conservation ~16 min
  • Residual graphs and augmenting paths ~16 min
  • The Ford-Fulkerson algorithm ~18 min
  • The max-flow min-cut theorem ~18 min
  • Matching, revisited ~15 min
  • Bipartite matching as a flow problem ~16 min
  • Hall's theorem, revisited ~16 min
  • General (non-bipartite) matching, previewed ~12 min
  • Matching and flow in practice ~16 min

13 Algorithm complexity and graph problems πŸ”’

Create a free account to open this chapter.

  • Comparing graph representations by cost ~9 min
  • Algorithm complexity, revisited ~9 min
  • O(V), O(E), and O(V+E) ~10 min
  • P vs. NP, informally ~10 min
  • NP-complete graph problems ~11 min
  • The traveling salesperson problem as NP-hard ~11 min
  • Why some graph problems resist every algorithm in this course ~10 min

14 Special graphs and graph counting πŸ”’

Create a free account to open this chapter.

  • Complete and complete bipartite graphs, revisited ~9 min
  • Cycles, paths, and wheels ~9 min
  • Regular graphs, revisited ~10 min
  • The hypercube graph ~10 min
  • The Petersen graph ~10 min
  • Counting simple graphs ~10 min
  • Degree sequences and graphical sequences, revisited ~11 min
  • The complement of a graph ~9 min
  • Graph operations: union, intersection, and line graphs ~10 min

15 Ramsey theory πŸ”’

Create a free account to open this chapter.

  • The pigeonhole principle, revisited ~10 min
  • Ramsey numbers ~12 min
  • The party problem ~11 min
  • R(3,3) ~13 min
  • Monochromatic subgraphs in edge colorings ~12 min