GATE Assistant

Past questions › Computer Science and Information Technology › GATE 2020

GATE 2020 · CS · MCQ · 2 marks · Algorithms › Graph Algorithms

GATE 2020 Computer Science and Information Technology question: Let G = (V, E) be a directed, weighted graph with weight function w: E R . For some…

Let be a directed, weighted graph with weight function . For some function , for each edge , define as .

Which one of the options completes the following sentence so that it is TRUE?

"The shortest paths in under are shortest paths under too, _________."

  1. (A)

    for every

  2. (B)

    if and only if , is positive

  3. (C)

    if and only if , is negative

  4. (D)

    if and only if is the distance from to in the graph obtained by adding a new vertex to and edges of zero weight from to every vertex of

Show answer

Official answer: A

Practise this question with exam-style marking

Discussion

No discussion yet.

Join the discussion