Mathematics: Applications and Interpretation · Topic 3: Geometry and trigonometry
AHL3.16 — Tree, cycle and route algorithms
Mathematics: Applications and Interpretation · SL / HL · syllabus-mapped notes
AIAHL3.16.1
Walks, trails, paths and cycles
Name the ways of moving through a graph, and Eulerian and Hamiltonian routes.
Full note — freeDifferent ways of moving through a graph have precise names: Walk : any sequence of edges. Trail : a walk with no repeated edge. Path : a walk with no repeated vertex. Circuit : a trail that starts and ends at the same vertex. Cycle : a path that starts and ends at the same vertex. An Eulerian trail uses every edge exactly once ; an Eulerian circuit does so and returns to the start. Existence test (connected graph): an Eulerian circuit exists exactly when every vertex has even degree; an Eulerian trail exists exactly when there are exactly two odd vertices (start and end at those two). A Hamiltonian path visits every vertex exactly once ; a Hamiltonian cycle does so and returns to the start. Euler conditions are about edges and degrees ; Hamiltonian routes are about vertices . There is no simple degree test for Hamiltonian cycles.
AIAHL3.16.2
Minimum spanning trees: Kruskal and Prim
Connect all vertices at least total cost with no cycle.
A spanning tree connects all vertices using a subset of edges with no cycle. A minimum spanning tree (MST) is a spanning tree of least total weight. Kruskal's algorithm : sort all edges by weight; add them cheapest-first, skipping any edge that would form a …
AIAHL3.16.3
The Chinese postman problem
Find the shortest closed route using every edge at least once.
The Chinese postman problem asks for the shortest closed route that travels along every edge at least once , returning to the start (e.g. a postman covering every street). If every vertex has even degree, an Eulerian circuit exists and the answer is simply the …
AIAHL3.16.4
The travelling salesman problem
Find a least-weight cycle visiting every vertex, with bounds.
The travelling salesman problem (TSP) asks for the Hamiltonian cycle of least weight in a weighted complete graph: visit every vertex once and return to the start at least cost. A practical problem is first converted to this "classical" form by building a table of …
