Minimum number of edges for a connected
graph = n
and for a connected tree = n – 1
Here given that 2 n – 2 edges and the edges of
graph is partitioned into two edge disjoint trees.
So there are two vertex disjoint paths between
every pair of vertices.
Here given that 2 n – 2 edges and the edges of
graph is partitioned into two edge disjoint trees.
So there are two vertex disjoint paths between
every pair of vertices.

total weight = 4 + 1 + 2 + 3 = 10
Path from vertex 1 to 2 is
(1 – 0) + (0 – 4) + (4 – 2)
1 + 4 + 3 = 8
total weight = 31
so if we put n = 6 in option “b” then we get 31
i.e. x2 – n + 1
(6)2 – 6 + 1 ⇒ 36 – 6 + 1 ⇒ 31.