Let 𝐺(𝑉,𝐸) be an undirected, edge-weighted graph with integer weights. The…

2026

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 Sβˆˆπ‘‰ 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?

  1. A.

    Only S1 is true

  2. B.

    Only S2 is true

  3. C.

    Both S1 and S2 are true

  4. D.

    Neither S1 nor S2 is true

Attempted by 19 students.

Show answer & explanation

Correct answer: A


Given:

d_k(u) denotes the shortest path weight from s to u
using at most k edges.

--------------------------------------------------
Statement S1
--------------------------------------------------

d_(k+1)(u) <= d_k(u)

Reason:

All paths allowed for d_k(u)
are also allowed for d_(k+1)(u).

Allowing one extra edge can only improve
or maintain the shortest path value.

Therefore:

S1 is TRUE.

--------------------------------------------------
Statement S2
--------------------------------------------------

Claim:

d_k(u) <= d_k(v)

This is FALSE.

Counterexample:

s -> u = 5
u -> v = -10

Then:

d(u) = 5
d(v) = -5

Thus:

d(u) > d(v)

Hence the statement does not always hold.

Therefore:

S2 is FALSE.

--------------------------------------------------
Final Answer
--------------------------------------------------

Only S1 is true.
"""

Explore the full course: Gate Guidance By Sanchit Sir