1,292 views
2 votes
2 votes
Consider a 'reversed Kruskal' Algorithm for computing a MST. Initialize T to be the set of all edges in the graph. Now consider edges from largest to smallest cost. For each edge, delete it from T if that edge belongs to a cycle in T. Assuming all the edge costs are distinct, does this new algorithm correctly compute a MST?

 

a) Yes

b) no

c) cant say

2 Answers

3 votes
3 votes

Yes

In original krushal's algorithm, we were including edges till it doesn't form a cycle in increasing order of weight. This will ensure maximum weight edge in a cycle is never included.

Here, if there is a cycle then to get MST we will always like to delete edge with maximum weight,

So both are effectively doing the same thing. 

Useful read: http://www.geeksforgeeks.org/reverse-delete-algorithm-minimum-spanning-tree/

Related questions

1 votes
1 votes
1 answer
4
ashish pal asked Jan 20, 2018
479 views
my answer is Cbut the answer given is Asomeone please explain