Please read the new rule regarding the restriction on the use of AI tools. ×

ChickenInKitchen's blog

By ChickenInKitchen, history, 6 years ago, In English

Does a graph with distinct weight on edges exists that prim and kruskal algorithm produce different trees ?

| Write comment?
»
6 years ago, # |
  Vote: I like it +39 Vote: I do not like it

The MST is unique if there are no equal weights.

»
6 years ago, # |
  Vote: I like it +23 Vote: I do not like it

For anyone interested, counting the number of minimum spanning trees is doable in cubic time (here is a problem asking exactly for this).