Questions tagged [prims-algorithm]

Prim's algorithm is a greedy algorithm which forms minimum spanning tree for the given graph. During execution, Prim's algorithm grows single tree by adding edges to it, unlike Kruskal's algorithm in which there can be multiple minimum spanning trees during execution.

5 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
23 views

Minimum unrooted binary spanning tree

Given a graph $G$ with $n$ tip vertices, $n-2$ internal vertices and a cost on each edge $C(v)$, find a minimum spanning tree subject to degree constraints: tips have degree $1$ internal vertices ...
1
vote
0answers
41 views

The Cut Lemma for graphs with non-distinct edges

In my introductory algorithms class I recently learned about the Cut Lemma and how it can be used to prove correctness for many Minimum Spanning Tree algorithms like Kruskal's and Prim's. In class, to ...
1
vote
0answers
106 views

n'th cheapest MST in a graph, with multiple edges that can have the same weight

I'm trying to think about an algorithm for this problem. I know there is an algorithm for the second cheapest MST in a graph, but if I understood it correctly it only solves cases in which every ...
0
votes
0answers
20 views

MST - Every edge visited once

I know that every vertex is visited exactly once but In Prim’s algorithm to find the MST, does every edge of the input graph is checked exactly once?How do I prove this? Although this look false but ...
0
votes
0answers
43 views

Improve Prim's algorithm runtime

Assume we run Prim’s algorithm when we know all the weights are integers in the range {1, ...W} for W, which is logarithmic in |V|. Can you improve Prim’s running time? When saying 'Improving', it ...