문제

I am trying to devise an implementation of dijkstras with fibonacci heaps. What I am trying to understand is if it is possible to represent, other than the minimum distance in O(logn) (with delete) but the neighbors of any given node? Or does this violate the fibonacci heap structure? Otherwise I would have to build a neighbor-list aswell as a fibonacci heap.

도움이 되었습니까?

해결책

You don't seem to understand what fibonacci heaps are!

This sturcture is independent of Dijkstra or any other shortest path algorithm, and is only used to speed up Dijkstra's algorithm, by speeding up the time to get the vertex with smallest distance.

Talking about maintain the adjacency list of neighbours as part of the the fibonacci heap structure borders on nonsense.

Of course, you could always maintain the list of neighbours corresponding to each vertex in the heap node (which is technically, not part of the heap structure) corresponding to that vertex..

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top