Data Structures & AlgorithmsHardCodeforces Div 2 C · ICPC regional

Undirected weighted graph on vertices 0 to 7 with edges: 2–6 (6), 0–7 (10), 2–4 (11), 0–5 (7), 6–7 (4), 1–7 (7), 4–7 (10), 5–7 (11), 1–5 (7), 2–3 (4), 4–6 (2), 0–2 (4), 5–6 (2), 1–4 (10), 0–1 (9). 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. 10
  2. B. 6
  3. C. 29
  4. D. 4

Correct answer: B. 6

Adding edges in increasing weight until 0 and 7 become connected gives bottleneck 6. The minimum total path weight (10), the MST weight (29) and the lightest edge at 0 (4) answer different questions.

More Trees, Graphs, Recursion and Dynamic Programming questions

Exams that ask this topic