GATE / CS ARCHIVE

GATE CSE 2016 SET 1 / QUESTION 39

GATE CSE 2016 Set 1 Q39

Algorithms · Graph Algorithms · Full GATE CSE 2016 Set 1 paper

GATE 2016 Set 1, Q39 2 marks · NAT
Report issue

Graph Algorithms

Question 39, GATE 2016: A complete undirected graph on 4 vertices has its 6 edges assigned the distinct weights 1,2,3,4,5,6. Over all assignments, find the largest possible weight of its minimum spanning tree.
Tap to enlarge
Answer & solution

Official answer: 7.0 : 7.0

Our answer: 7

Kruskal always accepts edges 1 and 2. If edge 3 does not make a triangle, it completes the tree and total is 6. If edges 1, 2, 3 form a triangle, edge 3 is rejected and the next edge 4 must join the fourth vertex, giving total 7. Assigning 1, 2, 3 to one triangle and 4, 5, 6 to the remaining incident edges attains 7.

Kruskal processes weights in increasing order and cannot reject either of the first two edges of a simple graph: a cycle requires at least three. If the first three edges do not form a triangle, they connect all four vertices and total 6. Otherwise they occupy three vertices, and every remaining edge joins that triangle to the fourth vertex, so edge 4 is necessarily accepted. This proves the upper bound 7 and the triangle arrangement witnesses attainability over all 720 weight assignments.

Original paper, page 15 · Answer key