GATE CSE 2026 Session 1 Q41: Shortest paths with at most k edges: two statements
- Algorithms
- 2 marks
- MCQ
- −2/3 if wrong
Question
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?
Try it: multiple choice: exactly one correct option
Show answer and explanation
Answer: A (official GATE 2026 final answer key)
Concept used: Allowing more edges can only enlarge the set of paths (Bellman–Ford monotonicity); edge-count limits break other orderings.
First step: For S2, try a small : with , may be adjacent to while is not, giving .
Full step-by-step solution
Detailed working, common mistakes and linked mock tests will be available with a free GATEiit account. Log-in is coming soon.
Share this question
Source: official GATE 2026 Session 1 CS question paper and final answer key, organised by IIT Guwahati. Question paper · Answer key
More Algorithms PYQs
- 2026 Session 1 · Q17Solve nested recurrences T1 = 4T1(n/2) + T2, T2 = 5T2(n/4) + log n
- 2026 Session 1 · Q47Condition forcing a vertex into every minimum vertex cover
- 2026 Session 1 · Q49Cycle and cut properties of MSTs with distinct weights
- 2026 Session 1 · Q50Impossible DFS discovery/finish orderings for a DAG edge
- 2026 Session 1 · Q55Properties of 2-colorable (bipartite) graphs
- 2026 Session 2 · Q24Order n^(1/3), log n, log(n!), 2^(log n) by growth rate