in Graph Theory
824 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
in Graph Theory
824 views

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/

0 votes
0 votes
Yes it does.

Related questions