answersLogoWhite

0

When prim algorithm fail?

Updated: 12/8/2022
User Avatar

Wiki User

8y ago

Best Answer

When there are directed edges in the graph, as it is impossible to move back from B to A when the edges are directed.

User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: When prim algorithm fail?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program to implement prim's algorithm?

dfgbrgffee


Who invented the prim alorythm?

The Prim algorithm was developed in 1930 by Vojtech Jarnik, a Czech mathematician. It was later rediscovered by Robert C. Prim in 1957, who was a computer scientist.


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


Which one is better kruhskal's algorithm or prim's algorithm?

Both algorithms have the same efficiency and both are based on the same greedy approach. But Kruskal's algorithm is much easier to implement.


What is the Complexity of kruskal and prim's algorithm?

Complexity prim = O(E+ V logV). E edge and V vertex. kurskal = O(E lgV ).


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

http://wiki.answers.com/Differences_between_prim's_and_kruskal'sexample http://wiki.answers.com/Differences_between_prim's_and_kruskal's


Will either kruskal or prim's algorithm work on negative edge graph?

The correctness of either Prim's or Kruskal's algorithm, is not affected by negative edges in the graph. They both work fine with negative edges. The question boils down to "Does a Priority Queue of numbers work with negative numbers?" because of the fact that both Prim's and Kruskal's algorithm use a priority queue. Of course -- as negative numbers are simply numbers smaller than 0. The "<" sign will still work with negative numbers.


What are the Application?

Priority queues can be found in operating systems for load-balancing and interrupt handling, network servers for bandwidth management, compression algorithms (such as Huffman encoding), Dijkstra's algorithm, Prim's algorithm and artificial intelligence systems.


What are the application queues?

Priority queues can be found in operating systems for load-balancing and interrupt handling, network servers for bandwidth management, compression algorithms (such as Huffman encoding), Dijkstra's algorithm, Prim's algorithm and artificial intelligence systems.


How does Prim's algorithm differ from Kruskal's and Dijkstra's algorithms?

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.


Prim and .?

Prim and Proper,


How do you use prim's algorithm to find a spanning tree of a connected graph with no weight on its edges?

Prims Algorithm is used when the given graph is dense , whereas Kruskals is used when the given is sparse,we consider this because of their time complexities even though both of them perform the same function of finding minimum spanning tree. ismailahmed syed