Open In App

GATE | GATE-CS-2003 | Question 67

Like Article
Like
Save
Share
Report

Let G = (V, E) be an undirected graph with a subgraph G1 = (V1, El). Weights are assigned to edges of G as follows :


GATECS2003Q67 

A single-source shortest path algorithm is executed on the weighted graph (V, E, w) with an arbitrary vertex ν1 of V1 as the source. Which of the following can always be inferred from the path costs computed?
(A) The number of edges in the shortest paths from ν1 to all vertices of G
(B) G1 is connected
(C) V1 forms a clique in G
(D) G1 is a tree


Answer: (B)

Explanation: When shortest path shortest path from v1 (one of the vertices in V1) is computed. G1 is connected if the distance from v1 to any other vertex in V1 is greater than 0, otherwise G1 is disconnected.

Quiz of this Question


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads