in Algorithms retagged by
1,896 views
1 vote
1 vote

Find the no. of minimum cost spanning tree using Kruskal’s or Primus algorithm

i am getting "4" but the answer is given "5" ...verify please

in Algorithms retagged by
1.9k views

7 Comments

Yes it is 4 coming
1
1
It should be 5.

The first three edges that would be selected are of costs 11,12,12 ie. AD, AB, BE.

Now remaining 5 edges are of same cost 13 and one edge is of cost 15(this should not be considered ).  From these edges we have to select 2 for a Minimum spanning tree.  Clearly DE would produce a cycle here. So out of remaining 4 we have to select two.It can be done in 4c2 ways which is 6. But if we add BC and EC together it would produce a cycle.  So it should be ignored and leaves us with 5 choices.

So the answer is 5.
1
1

see i have drawn 6 spanning trees so may be 6 or >6

0
0
How can you have 3 and 4 one.  The edge is in one diagonal only.
0
0
oh yes thank u so much ,my mistake  ...nd thank god i didnt tried further may be i could got 7or 8 or 9........spanning tries
0
0
its just 5 spanning trees
0
0
Answer is 5 you need to check wisely!!
0
0

2 Answers

3 votes
3 votes
Best answer
Caption
selected by
0 votes
0 votes
prims algo

starting from the A minimum weight is given by :11+12+12+13+13=61

kruskals algo:

sorting the weight of the graphs i.e.

11  12 12 13 13 13 13 13 15

now taking the weight and neglecting the weights that generates the cycle  11+12+12+13+13=61

2 Comments

question is about number of such spanning trees....read question carefully
0
0
As after performing the operation i am getting 5 but i also saw the image and finds the cost too
0
0