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 21–22 of 22

Q21GATE 20031 markMCQ−0.33 if wrong
Let G = (V,E) be an undirected graph with a sub-graph G1 = (V1,E1), Weight are assigned to edges of G as follows
w(e)={0if  e∈E1,1otherwisew(e)=\left\{\begin{matrix} 0 &if \; e \in E1, \\ 1& otherwise \end{matrix}\right.

A single-source shortest path algorithm is executed on the weighted graph (V,E,w) with an arbitrary vertex v1 of V1 as the source. Which of the following can always be inferred from the path costs computed?

Q22GATE 20011 markMCQ−0.33 if wrong
Consider the undirected unweighted graph G. Let a breadth-first traversal of G be done starting from a node r . Let d(r,u) and d(r,v) be the lengths of the shortest paths form r to u and v respectively in G. If u is visited before v during the breadth-first traversal, which of the following statements is correct ?

Keep practising

Topics in Algorithms

All CS topics ›