GATE Computer ScienceVery hardGATE CS (PYQ pattern)
What is the smallest possible value of the largest edge weight on a path from E to D in the graph with edges AB 6, AC 1, AD 5, BC 5, BE 3, CD 7, CE 8, CF 4, DF 2, EF 9, FG 10, EG 11, DG 12, AG 13?
- A. 4
- B. 5
- C. 6
- D. 9
Correct answer: B. 5
The minimum bottleneck path between two vertices is realised on the MST. The MST path from E to D is E–B (3), B–C (5), C–F (4), F–D (2), whose largest edge is 5; no edge of weight below 5 can connect E to D, since edges of weight at most 4 leave E in a different component.
More Algorithms questions
- Kahn's topological sort uses a min-priority queue, so among available vertices the smallest label is always chosen. The DAG has edges 1→3…
- A DAG has edges s→a, s→b, a→b, a→c, a→d, b→c, b→d, c→d, c→e, c→f, d→e, d→f, e→f, e→t, f→t. How many s–t paths pass through exactly one of…
- How many spanning trees of the complete graph K₅ (vertices 1–5) contain neither the edge 1-2 nor the edge 1-3?
- For the pattern P = abcabdabcabcabd, the KMP failure (prefix) function π[i] is the length of the longest proper prefix of P[0..i] that is…
- Boyer–Moore–Horspool searches for P = abcab in T = abcabdabcabcabcabxab (20 characters). The window is compared right to left; after every…
- Rabin–Karp searches for P = 26 in T = 3141592653589793 using base 10 and modulus 11 on 2-digit windows. How many spurious hits (hash equal…