Documentation

Complexity.Algorithms.WordRAM.Dijkstra.Fibonacci

Dijkstra's Algorithm with a Fibonacci Heap in O(m + n (⌊log₂ n⌋ + 1)) Time #

This file instantiates the black-box outer Dijkstra algorithm (Cslib.Algorithms.WordRAM.Dijkstra.dijkstraCode_exec and Cslib.Algorithms.WordRAM.Dijkstra.dijkstra_of_pq_spec) with the standalone static-array Fibonacci heap package (Cslib.Algorithms.WordRAM.PriorityQueue.FibonacciHeap.pkg) to obtain both the sharper reachable-vertex bound Cslib.Algorithms.WordRAM.Dijkstra.FibonacciSpec (O(m + min(n, m + 1) (⌊log₂ n⌋ + 1))) and the textbook Fredman–Tarjan bound Cslib.Algorithms.WordRAM.Dijkstra.FibonacciStatement (O(m + n (⌊log₂ n⌋ + 1))).

Main definitions #

Main results #

References #

@[reducible, inline]

Structured exact-basis Dijkstra program instantiated with the standalone Fibonacci heap.

Instances For
    theorem Cslib.Algorithms.WordRAM.Dijkstra.fibDijkstra_spec {G : ListInstance} {w : ℕ} (hw : WordRAM.Fits w (8 * (G.n + G.m + 2) * (G.maxWeight + 2))) :
    ∃ (y : WordRAM.Data (15 + PriorityQueue.FibonacciHeap.rFib)), WordRAM.ExecWithin w fibDijkstra (WordRAM.Data.init G.encode) y (640 * (G.m + min G.n (G.m + 1) * (Nat.log 2 G.n + 1))) ∧ ∀ (v : Fin G.n), y.mem (G.outAddr v) = encodeDist (G.dist G.source v)

    Correctness and running time of structured Dijkstra with a Fibonacci heap.

    Dijkstra's algorithm with a Fibonacci heap in O(m + min(n, m + 1) (⌊log₂ n⌋ + 1)) time. The compiled flat program meets Cslib.Algorithms.WordRAM.Dijkstra.FibonacciSpec with K = 640.

    Dijkstra's algorithm with a Fibonacci heap in O(m + n (⌊log₂ n⌋ + 1)) time. The compiled flat program meets Cslib.Algorithms.WordRAM.Dijkstra.FibonacciLinearSpec with K = 640.

    Reachable-vertex Fibonacci-heap Dijkstra theorem.

    Fibonacci-heap Dijkstra main theorem. Some word-RAM program over the exact basis computes all shortest-path distances from the source of a weighted directed graph with n vertices and m edges, given by adjacency lists, within O(m + n (⌊log₂ n⌋ + 1)) instructions.