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: Understand the definitions. For every \(k \ge 0\), \(d_k(u)\) is the smallest total weight among all paths from \(s\) to \(u\) that use at most \(k\) edges. If no such short path exists, \(d_k(u) = \infty\).
Step 2: Check statement S1. The collection of paths from \(s\) to \(u\) with length at most \(k+1\) contains every path with length at most \(k\) (a path with \(\le k\) edges automatically has \(\le k+1\) edges). Since \(d_{k+1}(u)\) is a minimum taken over a bigger (or equal) set of candidate paths than \(d_k(u)\), we get \[ d_{k+1}(u) \le d_k(u) \quad \text{for every } k \ge 0, u \in V. \] So S1 is always true, independent of the graph or the edge weights.
Step 3: Test statement S2 with a counterexample. S2 claims that if edge \((u,v)\) lies on the overall shortest \(s\)-to-\(v\) path, then \(d_k(u) \le d_k(v)\) for every \(k\). Build a small graph:
The path \(s \to y \to u \to v\) has weight \(1+1+0=2\), which is less than the direct edge weight 5, so this is the overall shortest path to \(v\), and edge \((u,v)\) lies on it - the hypothesis of S2 is satisfied.
Step 4: Compute \(d_1(u)\) and \(d_1(v)\). To reach \(u\) with at most 1 edge there is no route at all (the only path to \(u\) needs 2 edges), so \(d_1(u) = \infty\). To reach \(v\) with at most 1 edge, use the direct edge \(s-v\), giving \(d_1(v) = 5\), a finite number.
Here \(d_1(u) = \infty\) is NOT \(\le d_1(v) = 5\). This directly contradicts S2, so S2 is false in general.
Step 5: Conclusion. S1 always holds, S2 can fail, so only S1 is true.
\[\boxed{\text{Only S1 is true} \Rightarrow \text{Option A}}\]
A schedule of three database transactions \(T_1\), \(T_2\), and \(T_3\) is shown. \(R_i(A)\) and \(W_i(A)\) denote read and write of data item A by transaction \(T_i\), \(i = 1, 2, 3\). The transaction \(T_1\) aborts at the end. Which other transaction(s) will be required to be rolled back?

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?

Let πΊ be a weighted directed acyclic graph with π edges and π vertices. Given πΊ
and a source vertex π in πΊ, which one of the following options gives the worst case
time complexity of the fastest algorithm to find the lengths of shortest paths from π
to all vertices that are reachable from π in πΊ?