answersLogoWhite

0

How does Prim's algorithm work?

User Avatar

Wiki User

โˆ™ 2008-08-24 11:56:24

Best Answer

First a vertex is selected arbitrarily. on each iteration we expand the tree by simply attaching to it the nearest vertex not in the tree. the algorithm stops after all yhe graph vertices have been included.. one main criteria is the tree should not be cyclic.

User Avatar

Wiki User

โˆ™ 2008-08-24 11:56:24
This answer is:
User Avatar
Study guides

What is a programming language

What does DOS stand for

What is a software that is distributed for free

What is application software

โžก๏ธ
See all cards
3.8
โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…โ˜†โ˜…
20 Reviews

Add your answer:

Earn +20 pts
Q: How does Prim's algorithm work?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the difference between prims and kruskal's algorithm with example?

prim's


What is the difference between prims and kruskal's algorithm?

Prims select vertex to build minimum spanning tree....kruskal's select edge at a time.... Prims work perfect when lot of edges in graph .........whereas kruskal's want sorted edges... Prims O(E+VlogV) Kruskal O(ElogV)


What is the difference between Prims algorithm Kruskals algorithm and dijktras algorithm?

Well, Dijkstra algorithm is a way to find a path with minimum weight between 2 vertices's in a weighted graph. Prims And Kruskal algorithms are algorithms used to find the a path with minimum weight in a way that you can go from any vertex to another. Prims And Kruskal Algorithms are some how the same and both are greedy algorithms, but Prims insiste that the next edge to be chosen must be an edge with minimum weight connected to the current fringe whereas kruskal says that the next edge to be chosen dosent have to be connected to the current set of edges.


What is the difference between Prims algorithm and kruskals algorithm for finding the minimum spanning tree of a graph?

Prims And Kruskal Algorithms are some how the same and both are greedy algorithms, but Prims insiste that the next edge to be chosen must be an edge with minimum weight connected to the current fringe whereas kruskal says that the next edge to be chosen dosent have to be connected to the set of vertices's Already Chosen.


What is the difference between Prims algorithm and Dijkstras algorithm?

Both Prim's and Dijkstra's algorithm are manipulating with graphs but they have different roles. Dijkstra's algorithm is used to find the shortest path between any two nodes in a weighted graph while the Prim's algorithm finds the minimum spanning tree of a graph.


Can someone provide the C program for Prim's algorithm?

The C code for Prim's algorithm can be found in the following link. https://sites.google.com/site/itstudentjunction/lab-programming-solutions/data-structures-programs/program-to-find-minimal-spanning-tree-using--prims-algorithm


What is mining Spanning Tree algorithm?

They are algorithms that give us a minimum connection between points(nodes) without cycles. 2 algorithms that do this are : Krushkals and Prims.


When was Graham Street Prims F.C. created?

Graham Street Prims F.C. was created in 1904.


What is prims favorite color?

blue


What do you mean by analysis of algorithm?

it is a processor of the work


How does the bellman ford algorithm work?

This distance-vector algorithm works by computing the shortest path , and considers weights. The algorithm was distributed widely in the RIP protocol.


What algorithm will work for any two fractions?

Many of them.

People also asked