Graph Algorithms

In the winter semester 2021/2022, I teach the course on Graph Algorithms. The lecture covers advanced algorithms for shortest paths, network flows, minimum spanning trees, and some other graph problems. Several graph data structures will be mentioned, too.

The course is scheduled on Wednesdays from 10:40 in room S322 and taught in English this year.

If you want to consult anything, please write an e-mail to and we will discuss possibilities.

date topics
6. 10. Network flows: formulation of the problem, basic theorems (min-cut/max-flow, integrality), Ford-Fulkerson algorithm. Applications to bipartite matchings and disjoint paths.
13. 10. Network flows: Dinitz algorithm and its behavior on special networks. Scaling algorithm for integer capacities.
20. 10. Disjoint paths, cuts and separators using flows. Finding cuts probabilistically: the Karger-Stein algorithm.
27. 10. Shortest paths: general properties, woes with negative cycles, prefix property. Relaxation scheme and a proof of its correctness. Bellman-Ford-Moore algorithm as a special case of relaxation. Dijkstra's algorithm and related data structures: various kinds of heaps.
3. 11. Data structures for Dijkstra: array of buckets, trees over buckets, multi-level buckets, a sketch of HOT-queues. Dinic's trick for real edge lengths. Potential reduction and elimination of negative lengths.
10. 11. Shortest path trees. Heuristics for point-to-point shortest paths, the A* algorithm. All-pairs shortest paths and transitive closure: Floyd-Warshall algorithm and its generalization to construction of walk expressions. An algebraic point of view. All-pairs shortest paths: making use of matrix multiplication.
17. 11. No lecture today, we have a holiday!
24. 11. Divide & conquer algorithm for transitive closure. Seidel's algorithm for undirected unweighted graphs. Introduction to minimum spanning trees: light and heavy edges. Minimum spanning trees: Cut lemma, uniqueness, characterization using light edges. Red-blue algorithm.
1. 12. Minimum spanning trees: Red-blue algorithm and its usual special cases: Jarník's, Borůvka's and Kruskal's algorithm. Union-Find problem. Borůvka's algorithm with contractions and filtering. Minimum spanning trees in planar graphs and minor-closed graph classes. Density of minor-closed classes and the theorems of Mader and Kostochka+Thomason (without proofs).
8. 12. Jarník's/Dijkstra's algorithm with Fibonacci heap, Fredman-Tarjan algorithm (iterated Jarník's algorithm). Lowest common ancestor (LCA), range minima (RMQ), and block decomposition.
15. 12. Reduction of RMQ to LCA. Suffix trees and their properties. Reducing string problems to graph problems. Suffix, rank, and LCP arrays.
22. 12. Construction of suffix and rank arrays: the skew algorithm. Frederickson decomposition of a graph. Union-Find with the tree of Unions known in advance. A dessert: perfect matching in regular bipartite graphs by degree splitting, relation to edge coloring.
5. 1. Representation of trees using ET-sequences and ET-trees. Fully dynamic connectivity in undirected graphs (Holm, de Lichtenberg, Thorup). [Not present in the lecture notes, please see chapters 5.2 and 5.3 of my thesis.]


Exam dates are listed in SIS, please sign up there. I prefer examining in person, but it is hard for you to get to Prague, please send me an e-mail. If no date suits you, let me know and we can arrange another one. If you want to consult anything before the exam, feel free to ask.

You are expected to know the theory presented at the lecture (algorithms, theorems, and proofs) and to be able to apply it to related problems.

Recommended reading

This page is maintained by Martin Mareš