GATE CS 2010 · Graph Traversals (BFS & DFS)

MCQ · 2 marks · Problem PROG-GRPH-0088

Consider a complete undirected graph with vertex set {0, 1, 2, 3, 4}. Entry \(W_{ij}\) in the matrix W below is the weight of the edge {i, j}.\[\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?
  1. A
    7
  2. B
    8
  3. C
    9
  4. D
    10

Solve it on GATE DA practice →More Graph Theory & Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option B.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/43328/gate2010-51

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com