engineering recuitment GATE CSE 2023-24 Test Series Algorithms Graphs/Spanning Tree and Shortest Paths Spanning Tree
A complete undirected graph G is given on the vertex set 0 to (n – 1) for a fixed value of ‘n’. Draw the minimum spanning tree (MST) of the graph G, for the following cases and find the cost of MST :
i) weight of the edge (u,v) is |u – v|
ii) weight of the edge (u,v) is |u+v|
1
(n – 1) , n *(n – 1)/2
2
(n – 1)+1, n2/2
3
n, n *(n – 1)/2
4
none