DigiBacc

Practice questions › IB Mathematics: Applications and Interpretation › Geometry and Trigonometry › Tree/cycle algorithms: Eulerian, Hamiltonian, MST (Kruskal/Prim), Chinese postman, TSP
IB Mathematics: Applications and Interpretation · Geometry and Trigonometry

Tree/cycle algorithms: Eulerian, Hamiltonian, MST (Kruskal/Prim), Chinese postman, TSP practice questions.

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.

At a glance

About this topic

Syllabus code
3.16
Subject
IB Mathematics: Applications and Interpretation
Topic
3 · Geometry and Trigonometry
Questions
28 with worked answers
Question types
9 multiple-choice questions · 8 fill-in-the-gap questions · 5 true/false questions · 3 flashcards · 1 diagram task · 1 matching task · 1 structured question
Try it

Sample questions on Tree/cycle algorithms: Eulerian, Hamiltonian, MST (Kruskal/Prim), Chinese postman, TSP

A connected graph has exactly two vertices of odd degree and all others of even degree. State what this guarantees about the graph.

  • It has an Eulerian circuit but no Eulerian trail
  • It has an Eulerian trail but no Eulerian circuit
  • It has a Hamiltonian cycle
  • It has neither an Eulerian trail nor an Eulerian circuit

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.

  • 4
  • 5
  • 6
  • 15

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.

  • The cheapest remaining edge adjacent to the current tree
  • The cheapest remaining edge overall not forming a cycle
  • The most expensive edge that does not create a cycle
  • Any edge leaving the last vertex added

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?

  • Visit every vertex exactly once and return to the start with least weight
  • Cover every edge at least once, returning to the start at least cost
  • Find the shortest path between two given vertices
  • Find a spanning tree of least total weight

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.

  • Add the globally cheapest unused edge that avoids a cycle
  • Add the cheapest edge from a tree vertex to a non-tree vertex
  • Add the cheapest edge between two vertices already in the tree
  • Add edges in the order the vertices are labelled

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).

  • 10
  • 12
  • 24
  • 120

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 free
Exam tips

Command terms in this topic

Keep going

More topics in Geometry and Trigonometry

All of Geometry and Trigonometry →

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 free

This 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.