The Gateway to Computer Science Excellence
+2 votes
222 views
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 by (21 points) | 222 views

2 Answers

+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/

by Loyal (9.6k points)
0 votes
Yes it does.
by Active (3.8k points)

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
50,648 questions
56,429 answers
195,218 comments
99,954 users