Data Structures & AlgorithmsHardCodeforces Div 2 C · ICPC regional

Undirected weighted graph on vertices 0 to 7 with edges: 1–4 (7), 2–7 (12), 1–6 (4), 0–5 (2), 1–2 (9), 0–4 (9), 0–2 (14), 2–4 (5), 6–7 (12), 1–7 (6), 0–7 (13), 2–3 (3), 4–5 (14), 1–3 (11). Over all paths from 0 to 7, what is the smallest possible value of the heaviest edge on the path (the bottleneck or minimax path weight)?

  1. A. 13
  2. B. 36
  3. C. 9
  4. D. 2

Correct answer: C. 9

Adding edges in increasing weight until 0 and 7 become connected gives bottleneck 9. The minimum total path weight (13), the MST weight (36) and the lightest edge at 0 (2) answer different questions.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic