Let πΊ(π, πΈ) be an undirected, edge-weighted graph with integer weights. The weight
of a path is the sum of the weights of the edges in that path. The length of a path is
the number of edges in that path.
Let π βπ be a vertex in πΊ. For every π’βπ and for every π β₯0, let ππ(π’) denote
the weight of a shortest path (in terms of weight) from π to π’ of length at most π. If
there is no path from π to π’ of length at most π, then ππ(π’) = β.
Consider the statements:
S1:
For every π β₯0 and π’ βπ, ππ+1(π’) β€ππ(π’).
S2:
For every (π’, π£) βπΈ, if (π’, π£) is part of a shortest path (in terms of
weight) from π to π£, then for every πβ₯ 0, ππ(π’) β€ππ(π£).
Which one of the following options is correct?
Step 1: Think of \(d_k(u)\) as the result of running \(k\) rounds of Bellman-Ford-style edge relaxation starting from \(s\): after \(k\) rounds, \(d_k(u)\) is the cheapest weight found for reaching \(u\) using paths of at most \(k\) edges.
Step 2: Why S1 must hold. Doing one extra round of relaxation can only keep values the same or make them smaller, never larger, because every path counted in round \(k\) is still counted in round \(k+1\) (using at most \(k\) edges is a special case of using at most \(k+1\) edges). Formally, since paths of length \(\le k\) form a subset of paths of length \(\le k+1\), taking the minimum weight over the larger set can never exceed the minimum over the smaller set: \(d_{k+1}(u) \le d_k(u)\). This is true for any weights and any \(k\), so S1 is correct.
Step 3: Why S2 can break. S2 tries to say that if \(u\) immediately precedes \(v\) on the best route to \(v\), then at every stage of relaxation \(u\)'s tentative distance is at most \(v\)'s. But nothing forces \(u\) to be reachable quickly in terms of edge count - \(u\) might sit deep inside the graph (many edges away from \(s\)) even though the edge \((u,v)\) happens to close out the cheapest overall route to \(v\).
Step 4: A working counterexample. Take a chain \(s \to y \to u\) (weights 1 and 1) plus the edge \(u \to v\) of weight 0, so the path \(s,y,u,v\) costs \(2\) over 3 edges. Also add a shortcut \(s \to v\) directly with weight \(5\). Because \(2 < 5\), the true shortest path to \(v\) passes through \(u\), satisfying S2's condition on edge \((u,v)\).
Step 5: Break it at \(k=1\). With only 1 edge allowed, \(u\) is unreachable (\(u\) needs 2 edges via \(y\)), so \(d_1(u)=\infty\). But \(v\) is reachable in 1 edge directly, so \(d_1(v)=5\). Since \(\infty \le 5\) is false, S2 fails for this \(k\).
Step 6: Final call. S1 is a universal truth about relaxation with more allowed edges; S2 fails once the predecessor on the shortest path is edge-count-wise farther from \(s\) than the successor. So the correct choice is 'Only S1 is true', i.e. option A.
Let πΊ(π, πΈ) be a simple, undirected, edge-weighted graph with unique edge weights.
Which of the following statements about the minimum spanning trees (MST)
of πΊ is/are true?
