Top "Minimum-spanning-tree" questions

A minimum spanning tree (MST) or minimum weight spanning tree is a spanning tree of a connected, undirected graph with the least possible weight.

When should I use Kruskal as opposed to Prim (and vice versa)?

I was wondering when one should use Prim's algorithm and when Kruskal's to find the minimum spanning tree? They both …

algorithm graph-theory minimum-spanning-tree prims-algorithm kruskals-algorithm
How to find maximum spanning tree?

Does the opposite of Kruskal's algorithm for minimum spanning tree work for it? I mean, choosing the max weight (edge) …

algorithm minimum-spanning-tree greedy kruskals-algorithm
Difference between Prim's and Dijkstra's algorithms?

What is the exact difference between Dijkstra's and Prim's algorithms? I know Prim's will give a MST but the tree …

algorithm graph dijkstra minimum-spanning-tree prims-algorithm
Use Dijkstra's to find a Minimum Spanning Tree?

Dijkstra's is typically used to find the shortest distance between two nodes in a graph. Can it be used to …

algorithm language-agnostic graph-theory dijkstra minimum-spanning-tree
Is Minimum Spanning Tree afraid of negative weights?

This is a follow-up question of Why most graph algorithms do not adapt so easily to negative numbers?. I think …

algorithm data-structures graph minimum-spanning-tree
Minimum Spanning Tree: What exactly is the Cut Property?

I've been spending a lot of time reading online presentations and textbooks about the cut property of a minimum spanning …

data-structures graph minimum-spanning-tree
How to find total number of minimum spanning trees in a graph?

I don't want to find all the minimum spanning trees but I want to know how many of them are …

graph minimum-spanning-tree spanning-tree
How is a minimum bottleneck spanning tree different from a minimum spanning tree?

A minimum bottleneck spanning tree of a weighted graph G is a spanning tree of G such that minimizes the …

algorithm graph minimum-spanning-tree spanning-tree
Update minimum spanning tree with modification of edge

A graph (positive weight edges) with a MST If some edge, e is modified to a new value, what is …

algorithm graph-theory minimum-spanning-tree
implementing kruskals algorithm in java

im able to run this code for some input. but in some cases i get the wrong spanning tree. for …

java minimum-spanning-tree kruskals-algorithm