GATE Assistant

Past questions › Computer Science and Information Technology › GATE 2026 set1

GATE 2026 set1 · CS · MCQ · 2 marks · Algorithms › Graph Algorithms

GATE 2026 set1 Computer Science and Information Technology question: Let G(V, E) be an undirected, edge-weighted graph with integer weights. The weight of a…

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 , 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 and , .

S2: For every , if is part of a shortest path (in terms of weight) from to , then for every , .

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

Show answer

Official answer: A

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion