Home / IB Mathematics AHL 3.14 Graph theory Graphs, vertices, edges AI HL Paper 2- Exam Style Questions

IB Mathematics AHL 3.14 Graph theory Graphs, vertices, edges AI HL Paper 2- Exam Style Questions- New Syllabus

Question

The following graph shows five cities of the USA connected by weighted edges representing the cheapest direct flights in dollars (\$) between cities.

Graph of cities with weighted edges

(a) Explain why the graph can be described as “connected”, but not “complete”.

(b) Find a minimum spanning tree for the graph using Kruskal’s algorithm. State clearly the order in which your edges are added, and draw the tree obtained.

(c) Using only the edges obtained in your answer to part (b), find an upper bound for the travelling salesman problem.

(d) Ronald lives in New York City and wishes to fly to each of the other cities, before finally returning to New York City. After some research, he finds that there exists a direct flight between Los Angeles and Dallas costing \$26. He updates the graph to show this. By using the nearest neighbour algorithm and starting at Los Angeles, determine a better upper bound than that found in part (c). State clearly the order in which you are adding the vertices.

(e)
    (i) By deleting the vertex which represents Chicago, use the deleted vertex algorithm to determine a lower bound for the travelling salesman problem.
    (ii) Similarly, by instead deleting the vertex which represents Seattle, determine another lower bound.

(f) Hence, using your previous answers, write down your best inequality for the least expensive tour Ronald could take. Let the variable \( C \) represent the total cost, in dollars, for the tour.

(g) Write down a tour that is strictly greater than your lower bound and strictly less than your upper bound.

▶️ Answer/Explanation
Markscheme

(a)
    Any city can be travelled to or from any other city (so is connected).
    But there is no direct flight between Los Angeles and Dallas (for example), or not every vertex has degree 4.
Result:
The graph is connected because there is a path between every pair of cities, but not complete because not all possible direct flights (e.g., Los Angeles to Dallas) exist.

(b)
    Using Kruskal’s algorithm:
    Sort edges by weight: CD (30), DN (39), CL (41), LS (58), etc.
    Add edges in order, avoiding cycles:
    – First: CD (30)
    – Second: DN (39)
    – Third: CL (41)
    – Fourth: LS (58)
    Total weight = \( 30 + 39 + 41 + 58 = 168 \)
    Minimum spanning tree (MST) edges: \( \{CD, DN, CL, LS\} \) with weight 168.
    Minimum spanning tree diagram
Result:
MST = \( \{30, 39, 41, 58\} \), total weight = 168

(c)
    Upper bound for TSP = \( 2 \times \text{MST weight} \)
    \( = 2 \times 168 \)
    \( = 336 \)
Result:
Upper bound = \$336

(d)
    Nearest neighbour algorithm starting at LA:
    Update graph with LA to D (26).
    Order of vertices: LA \(\to\) D (26), D \(\to\) C (30), C \(\to\) NYC (68), NYC \(\to\) S (66), S \(\to\) LA (58)
    Total cost = \( 26 + 30 + 68 + 66 + 58 \)
    \( = 248 \)
Result:
Upper bound = \$248

(e)(i)
    Delete Chicago (C):
    Form MST for remaining cities (LA, D, NYC, S) using Kruskal’s algorithm:
    – Edges: LD (26), DN (39), LS (58)
    Weight = \( 26 + 39 + 58 = 123 \)
    Add back cheapest 2 edges incident to C: CD (30), CL (41)
    Lower bound = \( 123 + 30 + 41 \)
    \( = 194 \)
Result:
Lower bound = \$194

(e)(ii)
    Delete Seattle (S):
    Form MST for remaining cities (LA, D, C, NYC) using Kruskal’s algorithm:
    – Edges: LD (26), DC (30), DN (39)
    Weight = \( 26 + 30 + 39 = 95 \)
    Add back cheapest 2 edges incident to S: LS (58), SN (66)
    Lower bound = \( 95 + 58 + 66 \)
    \( = 219 \)
Result:
Lower bound = \$219

(f)
    Best inequality using lower bound 219 and upper bound 248:
    \( 219 \leq C \leq 248 \)
Result:
\( 219 \leq C \leq 248 \)

(g)
    Valid tour starting at NYC and within interval:
    NYC \(\to\) D \(\to\) C \(\to\) LA \(\to\) S \(\to\) NYC
    Cost: NYC to D (39) + D to C (30) + C to LA (41) + LA to S (58) + S to NYC (66)
    \( = 39 + 30 + 41 + 58 + 66 \)
    \( = 234 \)
Result:
NYC \(\to\) D \(\to\) C \(\to\) LA \(\to\) S \(\to\) NYC, cost = \$234

Question

A prominent international sports event assesses its network of seven towns, depicted as vertices, with edges representing the roads linking them. The weight on each edge signifies the distance, in kilometers, between the connected towns.

(a) Evaluate the possibility of designing a journey that starts and ends at different towns, ensuring all roads are used exactly once. Provide a justification for your assessment.

The shortest distances, in kilometers, between any pair of towns are presented in the following table:

 ABCDEFG
A×68511919
B6×1257313
C812×77ab
D557×65c
E11776×411
F93a54×d
G1913bc11d×

(b)(i) Calculate the value of \( a \), which represents the shortest distance between towns \( C \) and \( F \).

(b)(ii) Calculate the value of \( b \), which represents the shortest distance between towns \( C \) and \( G \).

(b)(iii) Calculate the value of \( c \), which represents the shortest distance between towns \( D \) and \( G \).

(b)(iv) Calculate the value of \( d \), which represents the shortest distance between towns \( F \) and \( G \).

(c) Implement the nearest neighbor algorithm, starting at vertex \( G \), to determine an upper limit for the traveling salesman problem.

(d)(i) Draw a minimum spanning tree for the subgraph including vertices \( A, B, C, D, E, F \).

(d)(ii) Record the total weight of the minimum spanning tree created.

(e) Based on the prior findings, establish a lower limit for the traveling salesman problem using a 1-tree approach.

(f) Propose a method to improve the lower limit previously determined.

The optimal route starting at \( A \) is confirmed as \( A – C – E – G – B – F – D – A \), with a total length of 52 kilometers.

(g) Taking into account that each road length shown in the graph is rounded to the nearest kilometer, compute the lower limit for the total distance of the optimal route.

▶️ Answer/Explanation
Markscheme

(a) Euler trail feasibility
More than two vertices have odd degree, so an Euler trail that starts and ends at different towns and uses every road exactly once is not possible.

(b) Table entries
(i) \(a=d(C,F)\)
Best via \(E\): \(C\to E=7\), \(E\to F=4\Rightarrow a=7+4=\mathbf{11}\).
(ii) \(b=d(C,G)\)
Best via \(E\): \(C\to E=7\), \(E\to G=11\Rightarrow b=7+11=\mathbf{18}\).
(iii) \(c=d(D,G)\)
Best via \(E\): \(D\to E=6\), \(E\to G=11\Rightarrow c=6+11=\mathbf{17}\).
(iv) \(d=d(F,G)\)
There is no direct edge \(F\!-\!G\). Compare paths: \(F\to E\to G:\ 4+11=15\), \(F\to B\to G:\ 3+13=16\), other routes are longer. Hence \(d=\mathbf{15}\).

(c) Nearest neighbour from \(G\) (upper bound)
\(G\to E(11)\to F(4)\to B(3)\to D(5)\to A(5)\to C(8)\to G(18)\).
Total \(=11+4+3+5+5+8+18=\mathbf{54\text{ km}}\) ⇒ upper bound 54 km.

(d)(i) Minimum spanning tree for \(A,B,C,D,E,F\)
One valid MST (Kruskal): \(BF(3),\ EF(4),\ AD(5),\ DB(5),\ DF(5)\). (Any cycle-free tree with the same total is acceptable.)

(d)(ii) Total weight
\(3+4+5+5+5=\mathbf{24\text{ km}}\).

(e) Lower bound for TSP (1-tree bound)
MST on \(A\!:\!F\) is 24 km. Add the two shortest edges incident to \(G\): \(GE=11\) and \(GB=13\).
Lower bound \(=24+11+13=\mathbf{48\text{ km}}\).

(f) Improving the lower bound
Recompute the 1-tree bound after removing a different vertex and take the largest bound; or augment the MST with a minimum perfect matching on odd-degree vertices (Held–Karp idea).

Given optimal tour: \(A\!-\!C\!-\!E\!-\!G\!-\!B\!-\!F\!-\!D\!-\!A\) with length \(8+7+11+13+3+5+5=52\text{ km}\).

(g) Rounding-aware lower bound for that optimal tour
Each of the 7 edges could be up to \(0.5\) km smaller (nearest-km rounding). \(52-7\times0.5=\mathbf{48.5\text{ km}}\).

Leave a Reply

Scroll to Top