Graphs and graph search
Vertices, edges and degrees, Euler and Hamilton paths, trees and colouring, then breadth-first and depth-first search, components and shortest paths.
About 6 hours of study
Learning objectives
- Compute degrees and use the handshake lemma
- Decide when an Euler path or circuit exists
- Search a graph with BFS and DFS and find components and shortest paths
Lessons
- 1
Graphs Intermediate
Vertices and edges, degrees and the handshake lemma, special graphs, trees, Euler paths and circuits (the bridges of Königsberg), Hamilton cycles, colouring and planar graphs.
- 2
Searching a graph: BFS and DFS Intermediate
Adjacency lists, breadth-first search with a queue, depth-first search with a stack or recursion, connected components, and shortest paths in graphs without weights.
Module practice
- Degrees and the handshake lemmaEasy
- Euler path or circuit?Medium
- Chromatic numberHard
- Breadth-first visit orderEasy
- Connected componentsMedium
- Shortest path by breadth-first searchHard