Questions tagged [fibonacci-heap]

A Fibonacci heap is an implementation of a priority queue that supports amortized O(1) insertion, merge, find-min, and decrease-key, along with amortized O(log n) delete and extract-min. When implemented with a Fibonacci heap, Dijkstra's algorithm and Prim's algorithm can be made to work in O(E + V log V).

74 questions
154
votes
4 answers

Has anyone actually implemented a Fibonacci-Heap efficiently?

Has anyone of you ever implemented a Fibonacci-Heap? I did so a few years back, but it was several orders of magnitude slower than using array-based BinHeaps. Back then, I thought of it as a valuable lesson in how research is not always as good as…
64
votes
1 answer

What is the intuition behind the Fibonacci heap data structure?

I've read the Wikipedia article on Fibonacci heaps and read CLRS's description of the data structure, but they provide little intuition for why this data structure works. Why are Fibonacci heaps designed the way they are? How do they work? Thanks!
templatetypedef
  • 328,018
  • 92
  • 813
  • 992
35
votes
3 answers

Is there a standard Java implementation of a Fibonacci heap?

I was looking at the different kind of heap data structures. The Fibonacci heap seems to have the better worst case complexity for (1) insertion, (2) deletion and (2) finding the minimum element. I have found that in Java there is a class…
Phil
  • 3,184
  • 3
  • 26
  • 43
33
votes
4 answers

Real world applications of Binary heaps and Fibonacci Heaps

What are the real world applications of Fibonacci heaps and binary heaps? It'd be great if you could share some instance when you used it to solve a problem. Edit: Added binary heaps also. Curious to know.
softwarematter
  • 25,053
  • 59
  • 155
  • 250
20
votes
3 answers

How to implement Prim's algorithm with a Fibonacci heap?

I know Prim's algorithm and I know its implementation but always I skip a part that I want to ask now. It was written that Prim's algorithm implementation with Fibonacci heap is O(E + V log(V)) and my question is: what is a Fibonacci heap in…
19
votes
2 answers

Why is a Fibonacci heap called a Fibonacci heap?

The Fibonacci heap data structure has the word "Fibonacci" in its name, but nothing in the data structure seems to use Fibonacci numbers. According to the Wikipedia article: The name of Fibonacci heap comes from Fibonacci numbers which are used in…
templatetypedef
  • 328,018
  • 92
  • 813
  • 992
18
votes
1 answer

Are Fibonacci heaps or Brodal queues used in practice anywhere?

Are Fibonacci heaps used in practice anywhere? I've looked around on SO and found answers to related questions (see below) but nothing that actually quite answers the question. There are good implementations of Fibonacci heaps out there, including…
kuzzooroo
  • 4,854
  • 7
  • 33
  • 70
12
votes
1 answer

Why do Fibonacci heaps need cascading cuts?

I'm learning f-heap from 'introduction to algorithms', and the 'decrease-key' operation really confuses me -- why does this need a 'cascading-cut' ? if this operation is removed: the cost of make-heap(), insert(), minimum() and union() remains…
11
votes
1 answer

Is there a Fibonacci heap based priority queue for Haskell?

Is there a Fibonacci heap/priority queue available for Haskell? (Or even an asymptotically better one?) I found a list of various priority queue implementations in this question, but I couldn't find if any of them satisfies the amortized running…
Petr
  • 60,177
  • 8
  • 136
  • 295
8
votes
2 answers

Priority Queue - Skip List vs. Fibonacci Heap

I am interested in implementing a priority queue to enable an efficient Astar implementation that is also relatively simple (the priority queue is simple I mean). It seems that because a Skip List offers a simple O(1) extract-Min operation and an…
6
votes
3 answers

STL for Fibonacci Heap?

where is the Fibonacci Heap in STL ? and if STL do not implement Fibonacci Heap what is the best practice to implement it using existing algorithms and containers in STL ?
amin
  • 2,844
  • 3
  • 25
  • 51
5
votes
1 answer

Defining compare function for fibonacci heap in boost

I need to use Fibonacci heap in my project and I am trying to use it from boost library. But I cannot figure out how to set up a user defined compare function for arbitrary data type. I need to construct a min heap for struct node defined as…
cauthon14
  • 249
  • 1
  • 3
  • 12
5
votes
2 answers

Dijkstra on Java: Getting Interesting Results Using a Fibonacci Heap vs. PriorityQueue

I recently made an initial comparison of the running time of Dijkstra's algorithm using two data structures, the Java-based PriorityQueue (based on a binary heap, if I'm not mistaken), and a Fibonacci heap. I used Java's currentTimeMillis() to make…
Fiery Phoenix
  • 1,064
  • 2
  • 15
  • 26
4
votes
1 answer

Boost Fibonacci Heap Decrease Operation

The new 'heap' boost library includes a fibonacci heap. The complexity of each implementation can be seen here: http://www.boost.org/doc/libs/1_51_0/doc/html/heap/data_structures.html. My question is this: Why is the fibonacci heap decrease…
user1487088
  • 231
  • 3
  • 6
3
votes
1 answer

Questions on the design and analysis of Fibonacci heaps

Fibonacci heaps are proving tricky to understand - even though CLRS has made a really good attempt to make it understand how it works. But some questions are really unclear to me: Why would you choose a potential function like t + 2m? What is the…
1
2 3 4 5