Shortest Path: GATE CS Previous Year Questions

Shortest Path · Algorithms

22 questions · asked in 17 of 27 years (2000–2026)

MCQ 21 · NAT 11-mark 12 · 2-mark 10

2000Questions per year2026

Questions 11–15 of 22

Q11GATE 20102 marksMCQ−0.67 if wrong
Consider a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Entry WijW_{ij} in the matrix W below is the weight of the edge {i, j}.

(018141012498120731470249320)\begin{pmatrix} 0&1 & 8 & 1 &4 \\ 1& 0 & 12 & 4 & 9\\ 8 & 12 & 0 & 7 & 3\\ 1& 4& 7 & 0 &2 \\ 4& 9 & 3& 2 &0 \end{pmatrix}

What is the minimum possible weight of a path P from vertex 1 to vertex 2 in this graph such that P contains at most 3 edges?

Q12GATE 20091 markMCQ−0.33 if wrong
Which of the following statement(s) is/are correct regarding Bellman-Ford shortest path algorithm?

P. Always finds a negative weighted cycle, if one exists.
Q. Finds whether any negative weighted cycle is reachable from the source.

Q13GATE 20082 marksMCQ−0.67 if wrong
1 2 3 2 −3 −5 2 1 1 2 3 2 a b c d e f g h
Dijkstra's single source shortest path algorithm when run from vertex a in the above graph, computes the correct shortest path distance to

Q14GATE 20071 markMCQ−0.33 if wrong
Consider a weighted, undirected graph with positive edge weights and let uvuv be an edge in the graph. It is known that the shortest path from the source vertex ss to uu has weight 53 and the shortest path from ss to vv has weight 65. Which one of the following statements is always TRUE?

Q15GATE 20071 markMCQ−0.33 if wrong
In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most efficiently, in terms of time complexity, by

Keep practising

Topics in Algorithms

All CS topics ›