edited by
24,035 views
43 votes
43 votes

Consider a complete undirected graph with vertex set $\{0, 1, 2, 3, 4\}$. Entry $W_{ij}$ in the matrix $W$ below is the weight of the edge $\{i, j\}$

$$W=\begin{pmatrix} 0 & 1 & 8 & 1 & 4 \\ 1 & 0 & 12 & 4 & 9 \\ 8 & 12 & 0 & 7 & 3 \\ 1 & 4 & 7 & 0 & 2 \\ 4 & 9 & 3 & 2 & 0 \end{pmatrix}$$

What is the minimum possible weight of a spanning tree $T$ in this graph such that vertex $0$ is a leaf node in the tree $T$?

  1. $7$
  2. $8$
  3. $9$
  4. $10$
edited by

8 Answers

1 votes
1 votes

One possible traversal be like this also-

2--->4--->3--->1--->0 having weights 3, 2, 4, 1 respectively and 0 is at last position means 'at leaf' as mentioned in the question.

So, total weight is 3+2+4+1 = 10 answer.

0 votes
0 votes

$V_0$ is supposed to be the leaf.

In a tree, a leaf has degree 1. Hence, we can choose exactly one edge for $V_0$

Obviously, we'll choose any of the two edges with weight 1. (Blue colour — select either one.)

Then, apply Kruskal; we'd choose only minimum weight edges, ie, 2, 3 and 4. (Red colour)

Weight = $1+2+3+4=10$

0 votes
0 votes
Apply kruskal :

Take first minimum : 1, either 01 or 03, doesn’t matter

Say, I take 01, now 0 to anything or anything to 0 is not possible because 0 is leaf, ignore such weights now.

Take next minimum : 2 (34)

Next : 3 (24)

Next : 4 (13)

Done ! You got the MST.

1+2+3+4 = 10
0 votes
0 votes

here when we make the min cost tree of cost 7 then here the node 0 will become internal node not the leaf node so that we will consider this mst as min cost bcoz in question they mentioned that the node 0 will become leaf node in mst 

so that we try to get another mst which will cost 10 so it is our answer

Answer:

Related questions

37 votes
37 votes
5 answers
1
26 votes
26 votes
4 answers
2