Data Structures & AlgorithmsHardICPC regional · GATE CS top band
Undirected weighted graph on vertices A, B, C, D, E with edges A–B (7), A–C (1), A–D (5), A–E (9), B–D (4), B–E (4), C–D (7), C–E (2), D–E (5). Over all paths from C to D, minimise the largest single edge weight used on the path. What is that minimum possible largest edge weight?
- A. 4
- B. 9
- C. 5
- D. 6
Correct answer: A. 4
The minimax (bottleneck) value is 4, which equals the largest edge on the MST path between the two vertices. The shortest-path bottleneck is 5, so minimising path length is not the same as minimising the largest edge.
Practise more Trees, Graphs, Recursion and Dynamic Programming questionsTrees, Graphs, Recursion and Dynamic Programming: notes and key points
More Trees, Graphs, Recursion and Dynamic Programming questions
- On an 6 × 6 chessboard with rows and columns numbered 0 to 5, a knight starts at (4, 4) and must reach (2, 0) (as (row, column)). A knight…
- Connected undirected graph on vertices A, B, C, D, E, F, G, H with edges A–C (1), B–G (1), B–H (1), C–D (1), C–F (1), C–H (1), D–E (1)…
- Directed weighted graph on vertices A, B, C, D with edges (u→v, w): D→A (8); C→B (4); B→A (6); B→D (4); D→B (7). Let d(x, y) be the…
- Array [7, 21, 6, 3, 10, 17, 8] is turned into a min-heap in place with bottom-up heapify: for i from ⌊n/2⌋−1 down to 0, sift the element…
- Coins of denominations [7, 6, 2] are available in unlimited quantity. What is the minimum number of coins needed to pay exactly 18? (Coins…
- 4 × 4 grid, rows top to bottom ('#' = blocked, '.' = open): .... / ..#. / ..#. / ..... Count the paths from top-left to bottom-right that…