The spanning tree of a connected undirected graph G is a tree having all the vertices and some number of edges of G.
Questions tagged [spanning-trees]
147 questions
73
votes
10 answers
Minimum spanning tree vs Shortest path
What is the difference between minimum spanning tree algorithm and a shortest path algorithm?
In my data structures class we covered two minimum spanning tree algorithms (Prim's and Kruskal's) and one shortest path algorithm (Dijkstra's).
Minimum…
flashburn
- 1,233
- 1
- 12
- 22
29
votes
3 answers
When is the minimum spanning tree for a graph not unique
Given a weighted, undirected graph G: Which conditions must hold true so that there are multiple minimum spanning trees for G?
I know that the MST is unique when all of the weights are distinct, but you can't reverse this statement. If there are…
Keiwan
- 487
- 1
- 5
- 12
26
votes
7 answers
Do any two spanning trees of a simple graph always have some common edges?
I tried few cases and found any two spanning tree of a simple graph has some common edges. I mean I couldn't find any counter example so far. But I couldn't prove or disprove this either. How to prove or disprove this conjecture?
Mr. Sigma.
- 1,301
- 1
- 16
- 38
22
votes
2 answers
Do the minimum spanning trees of a weighted graph have the same number of edges with a given weight?
If a weighted graph $G$ has two different minimum spanning trees $T_1 = (V_1, E_1)$ and $T_2 = (V_2, E_2)$, then is it true that for any edge $e$ in $E_1$, the number of edges in $E_1$ with the same weight as $e$ (including $e$ itself) is the same…
Aden Dong
- 1,151
- 2
- 11
- 24
15
votes
4 answers
Graph Has Two / Three Different Minimal Spanning Trees?
I'm trying to find an efficient method of detecting whether a given graph G has two different minimal spanning trees. I'm also trying to find a method to check whether it has 3 different minimal spanning trees. The naive solution that I've though…
itamar
- 293
- 1
- 3
- 6
13
votes
2 answers
Why is the k-bounded spanning tree problem NP-complete?
The $k$-bounded spanning tree problem is where you have an undirected graph $G(V,E)$ and you have to decide whether or not it has a spanning tree such that each vertex has a degree of at most $k$.
I realize that for the case $k=2$, this is the…
user17199
- 131
- 1
- 1
- 5
12
votes
2 answers
Minimal Spanning Tree With Double Weight Parameters
Consider a graph $G(V,E)$. Each edge $e$ has two weights $A_e$ and $B_e$. Find a spanning tree that minimizes the product $\left(\sum_{e \in T}{A_e}\right)\left(\sum_{e \in T}{B_e}\right)$. The algorithm should run in polynomial time with respect to…
Strin
- 1,515
- 1
- 11
- 16
11
votes
1 answer
Tighter analysis of modified Borůvka's algorithm
Borůvka's algorithm is one of the standard algorithms for calculating the minimum spanning tree for a graph $G = (V,E)$, with $|V| = n, |E| = m$.
The pseudo-code is:
MST T = empty tree
Begin with each vertex as a component
While number of components…
Joe
- 4,105
- 1
- 21
- 38
10
votes
2 answers
Finding MST after adding a new vertex
Let $G=(V,E)$ which is undirected and simple. We also have $T$, an MST of $G$. We add a vertex $v$ to the graph and connect it with weighted edges to some of the vertices. Find a new MST for the new graph in $O(|V|\cdot \log |V|)$.
Basically, the…
LiorGolan
- 213
- 2
- 6
9
votes
1 answer
Does a graph always have a minimum spanning tree that is binary?
I have a graph and I need to find a minimum spanning tree to a given graph. What is to be done so that the output obtained is a binary tree?
Aditya.M
- 103
- 3
9
votes
3 answers
If all edges are of equal weight, can one use BFS to obtain a minimal spanning tree?
If given that all edges in a graph $G$ are of equal weight $c$, can one use breadth-first search (BFS) in order to produce a minimal spanning tree in linear time?
Intuitively this sounds correct, as BFS does not visit a node twice, and it only…
TheNotMe
- 571
- 1
- 6
- 18
9
votes
2 answers
MST: Prim's algorithm complexity, why not $O(EV \lg V)$?
According to CLRS, the Prim's algorithms is implemented as below --
$\mathtt{\text{MST-PRIM}}(G,w,r)$
for each $u \in V[G]$ do
$\mathtt{\text{key}}[u] \leftarrow \infty$
$\pi[u] \leftarrow \mathtt{\text{NIL}}$
$\mathtt{\text{key}}[r]…
ramgorur
- 541
- 1
- 5
- 16
8
votes
1 answer
Necessary and sufficient condition for unique minimum spanning tree
This is an exercise problem (Ex.3) from the excellent lecture note by Jeff Erickson Lecture 20: Minimum Spanning Trees [Fa’13]
.
Prove that an edge-weighted graph $G$ has a unique minimum spanning tree if and only if the
following conditions…
hengxin
- 9,671
- 3
- 37
- 75
8
votes
0 answers
MST with possibly minimal diameter
I am working with some research problem connected loosely to TSP which requires to find the Minimum Spanning Tree of a fully connected, weighted graph, where all the weights are positive and the graph is undirected (just like in Christofides…
7
votes
1 answer
Need a hint! Karger's algorithm versus Kruskal, spanning tree distribution
Let G = (V,E) be a unit-capacity graph with n vertices and m edges.
Let T denote all the spanning trees in G.
If we run Karger's algorithm, we will get a random spanning tree in T formed by the contracted edges, we denote this distribution of…
MMP
- 315
- 1
- 4