The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+9 votes
1.3k views

What is the weight of a minimum spanning tree of the following graph?

 

  1. $29$
  2. $31$
  3. $38$
  4. $41$
asked in Algorithms by Veteran (59.7k points)
edited by | 1.3k views

2 Answers

+8 votes
Best answer

Apply Prim's algorithm, start from A as shown in figure below.


add all the weights in the given figure which would be equal to $31$.

answered by Loyal (9.4k points)
edited by
0
yes prims is easier to apply than kruskal here ...
0
what if we apply the kruskal here?
0
@lakshaysaini2013

Nothing, answer will be same, you just have to avoid any cycle/loop.
+4 votes
Solution: B

The minimum spanning tree is

AC,AD,BG,EI,BD,FH,HI,IJ,GH.
answered by Active (1.4k points)
0
answer is 31
Answer:

Related questions



Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

44,253 questions
49,749 answers
164,088 comments
65,845 users