in Algorithms edited by
667 views
2 votes
2 votes

Which of the following are correct for Minimum Spanning Tree from graph G with unique weights, with the weight function w: Eā†’R (more than one possible)

  1. If we divide all weights by some non zero value  MST will be unchanged (answer for both positive and negative values divided)
  2. If we multiply all weights by some non zero value  MST will be unchanged (answer for both positive and negative values multiplied)
  3. If we take % by some number for all weight  MST will be unchanged (answer for both positive and negative values )
  4. If we add or subtract all weights by some number MST will remain unchanged. (answer for both positive and negative values)
in Algorithms edited by
667 views

2 Comments

I think only D is possible.

Due to negative value division it makes bigger edges more smaller and hence MST will change, Same for multiplication.

And mod can change inconsistently.

Not totally sure.
0
0
1- for -ve divisor can change, for +ve will not change.

2- for -ve multiplier can change, for  +ve will not change.

3- can change for both -ve and +ve modulo

4- will not change.
9
9

Please log in or register to answer this question.

Related questions

1 vote
1 vote
2 answers
4