Similar questions 2 more → · asked again: GATE 2006, Q11
Graph Algorithms

Answer & solution
Official answer: 99
Worked explanation
A spanning tree is connected and acyclic on all 100 vertices, hence has exactly 99 edges. Here i≠j makes every weight |i−j| a positive integer, at least 1. Thus 99 is a universal lower bound. Choose precisely the edges (v1,v2),(v2,v3),…,(v99,v100). They form a path through every vertex, so are a valid spanning tree, and every edge has weight 1. Their sum is 99, attaining the bound. Taking all weight-one edges happens to work because they form this path; merely selecting individually cheap edges would not prove connectivity in a general graph.
Derivation and answer
Every edge has positive integer weight at least 1, and every spanning tree on 100 vertices has 99 edges, so its total weight is at least 99. The path v1-v2-...-v100 uses 99 consecutive-index edges of weight 1 and attains that bound. Hence the MST weight is 99.