answersLogoWhite

0


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

9y 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


What is the runtime complexity of the Prim's algorithm for finding the minimum spanning tree of a graph?

The runtime complexity of Prim's algorithm is O(V2) or O(E log V), where V is the number of vertices and E is the number of edges in the graph.


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


What is the runtime complexity of Prim's algorithm for finding the minimum spanning tree of a graph?

The runtime complexity of Prim's algorithm for finding the minimum spanning tree of a graph is O(V2) using an adjacency matrix or O(E log V) using a binary heap.


What is the runtime of Prim's algorithm for finding the minimum spanning tree of a graph?

The runtime of Prim's algorithm for finding the minimum spanning tree of a graph is O(V2) with a simple implementation, or O(E log V) with a more efficient implementation using a priority queue.


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.