28 exam-style questions on Tree/cycle algorithms: Eulerian, Hamiltonian, MST (Kruskal/Prim), Chinese postman, TSP — topic 3.16 of Geometry and Trigonometry in the IB Mathematics: Applications and Interpretation syllabus — with answers and explanations. Samples below; the full set is free with an account.
A connected graph has exactly two vertices of odd degree and all others of even degree. State what this guarantees about the graph.
Answer: It has an Eulerian trail but no Eulerian circuit
A connected graph has an Eulerian circuit exactly when every vertex has even degree, and an Eulerian trail that is not a circuit exactly when it has two odd-degree vertices, which must be the start and end. So with two odd vertices a trail exists but no circuit; nothing is guaranteed about Hamiltonian cycles.
A complete graph K₆ has 6 vertices, each connected to every other vertex. Determine the degree of each vertex.
Answer: 5
In a complete graph Kₙ every vertex connects to the other n − 1 vertices, so each vertex in K₆ has degree 6 − 1 = 5. (The value 15 is the number of edges, a common mix-up.)
Kruskal's algorithm builds a minimum spanning tree by repeatedly adding edges. Describe how the next edge is chosen at each step.
Answer: The cheapest remaining edge overall not forming a cycle
Kruskal considers all edges globally in increasing weight order, adding an edge only if it does not form a cycle. Choosing the cheapest edge adjacent to the current tree describes Prim's algorithm instead.
The Chinese postman (route inspection) problem on a connected weighted graph asks the traveller to do what?
Answer: Cover every edge at least once, returning to the start at least cost
The Chinese postman problem seeks a closed walk that covers every edge at least once for minimum total weight; visiting every vertex once describes the travelling salesman problem instead.
Prim's algorithm is applied starting from vertex A. Describe the rule for selecting each subsequent edge.
Answer: Add the cheapest edge from a tree vertex to a non-tree vertex
Prim's algorithm grows a single connected tree, always adding the least-weight edge that connects a new vertex to the existing tree; choosing globally cheapest edges describes Kruskal's algorithm.
A weighted complete graph on 5 vertices is used for a TSP. Determine how many distinct Hamiltonian cycles must be compared when solving it by the brute-force method (treating a cycle and its reverse as the same).
Answer: 12
For n vertices the number of distinct Hamiltonian cycles is (n − 1)!/2 = 4!/2 = 24/2 = 12.
That was 6 of 28 Tree/cycle algorithms: Eulerian, Hamiltonian, MST (Kruskal/Prim), Chinese postman, TSP questions.
Practise all 28 freeStateAO1 · 1–2 marks
One word or one short sentence. No explanation, no working: the mark is for the fact itself.
DistinguishAO3 · 1–3 marks
Make the difference clear for BOTH terms — a definition of one of them is only half an answer.
28 Tree/cycle algorithms: Eulerian, Hamiltonian, MST (Kruskal/Prim), Chinese postman, TSP questions — free with an account. Spaced repetition, streaks and full exam simulations included.
Practise them freeThis platform is independently developed and is not endorsed by, affiliated with, or sponsored by the International Baccalaureate Organization. “International Baccalaureate” and “IB” are registered trademarks of the IBO.