Prove Dijkstra's O(E + VlogV) complexity

In summary, the conversation discusses the sorting problem of Heap Sort and its complexity of O(logV). The speaker asks for help in solving the problem and is given an outline that involves visiting each edge and vertex, using time T1 for decrease key and time T2 for extract minimum. To improve the efficiency, Fibonacci Heaps which run in O(log n) is suggested. The speaker must show that T1 is O(1) and T2 is greater than O(log|V|). This is necessary to prove the lower bound for the sort operation and the sufficiency of using Fibonacci heap, as well as the necessity of any sort algorithm needing at least O(log n).
  • #1
SadPaul
2
0
Homework Statement
Prove that Dijkstra's time complexity O(E + VlogV) with Fibonacci priority queue is the best by reducing it to a sorting problem
Relevant Equations
-
My effort:
I think that the sorting problem in question is Heap Sort which has an O(logV) complexity, but how can I operate with that information so I can solve this? Can you help me by giving me the outline of an idea?
 
Physics news on Phys.org
  • #2
I would reason this way:

You have to visit each edge and each vertex at least once, for otherwise you might lose the minimum. This gets you ##O(|E|\cdot T_1 +|V|\cdot T_2)## where ##T_i## is the time you use at each edge: ##T_1=T(\text{decrease key})## and the time at each vertex: ##T_2=T(\text{extract minimum})##.

To extract minimum we use Fibonacci Heaps which run in ##O(\log n)##. So all you have to do is to show that ##T_1=O(1)## and ##T_2 > O(\log |V|)##. So you have to show the lower boundary for the sort operation via Fibonacci heap (sufficiency) and that any sort algorithm needs at least ##O(\log n)## (necessity).
 
  • Like
Likes SadPaul

What is Dijkstra's algorithm?

Dijkstra's algorithm is a popular algorithm used in graph theory to find the shortest path between two vertices in a graph. It was developed by Dutch computer scientist Edsger Dijkstra in 1956.

What is the time complexity of Dijkstra's algorithm?

The time complexity of Dijkstra's algorithm is O(E + VlogV), where E is the number of edges and V is the number of vertices in the graph. This means that the algorithm's running time increases linearly with the number of edges and logarithmically with the number of vertices.

How is the time complexity of O(E + VlogV) derived for Dijkstra's algorithm?

The time complexity of Dijkstra's algorithm is derived by analyzing the number of operations required for each step of the algorithm. The algorithm involves a priority queue, which has a time complexity of O(logV) for insertion and deletion. Additionally, the algorithm iterates through all the edges, resulting in O(E) operations. Therefore, the overall time complexity is O(E + VlogV).

What is the significance of O(E + VlogV) complexity for Dijkstra's algorithm?

The O(E + VlogV) complexity of Dijkstra's algorithm is considered efficient because it is faster than other algorithms such as Bellman-Ford, which has a time complexity of O(VE). This makes Dijkstra's algorithm a popular choice for finding the shortest path in large graphs.

Are there any cases where Dijkstra's algorithm may not have a time complexity of O(E + VlogV)?

Yes, there are some cases where Dijkstra's algorithm may not have a time complexity of O(E + VlogV). For example, if the graph has negative edge weights, the algorithm's time complexity can increase to O(VE). Additionally, if the priority queue used in the algorithm has a higher time complexity for insertion and deletion, the overall complexity may also increase.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
11
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
950
  • Engineering and Comp Sci Homework Help
Replies
10
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Programming and Computer Science
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
970
Back
Top