GATEverse
← GATE CSE 2026 Set 1

Q31

MCQ2 marks, −0.67

Let G(V,E)G(V, E) 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 s∈Vs \in V be a vertex in GG. For every u∈Vu \in V and for every k≥0k \geq 0, let dk(u)d_{k}(u) denote the weight of a shortest path (in terms of weight) from ss to uu of length at most kk. If there is no path from ss to uu of length at most kk, then dk(u)=∞d_{k}(u)=\infty. Consider the statements: S1: For every k≥0k \geq 0 and u∈V,dk+1(u)≤dk(u)u \in V, d_{k+1}(u) \leq d_{k}(u). S2: For every (u,v)∈E(u, v) \in E, if (u,v)(u, v) is part of a shortest path (in terms of weight) from ss to vv, then for every k≥0,dk(u)≤dk(v)k \geq 0, d_{k}(u) \leq d_{k}(v). Which one of the following options is correct?

Sign in to save attempts.

Loading…