Documentation

Complexity.Algorithms.WordRAM.Dijkstra.FibonacciStatement

Dijkstra's algorithm on the word RAM with a Fibonacci heap: statements #

This file states what a single-source shortest-path program on the word RAM must satisfy to achieve the Fredman–Tarjan running-time bound of Dijkstra's algorithm with a Fibonacci heap Dijkstra Fredman and Tarjan Cormen et al., Chapter 19 and Section 24.3.

Because memory past the input starts at 0, the priority-queue and distance arrays require only O(1) fresh initialization, and the algorithm extracts at most min n (m + 1) reachable vertices from the source. We therefore state both:

Both bounds use the exact same word-size hypothesis Fits w (8 * (G.n + G.m + 2) * (G.maxWeight + 2)) as Cslib.Algorithms.WordRAM.Dijkstra.LogLinearSpec.

Main definitions #

Main results #

References #

Shortest paths in O(m + min(n, m + 1) (⌊log₂ n⌋ + 1)) time. At every word size w that holds 8 (n + m + 2) (W + 2), where m is the number of edges and W the largest weight, the flat program p, started on the input words of an adjacency-list instance, halts within K (m + min(n, m + 1) (⌊log₂ n⌋ + 1)) instructions, the final halt included, and its memory then holds at G.outAddr v the encoded distance from the source to v, for every vertex v.

Instances For

    Shortest paths in O(m + n (⌊log₂ n⌋ + 1)) time. Textbook Fredman–Tarjan running-time specification for a flat word-RAM program p over the exact basis.

    Instances For

      The sharper reachable-vertex specification FibonacciSpec implies the textbook specification FibonacciLinearSpec with the same constant K.

      Reachable-vertex Fibonacci-heap Dijkstra theorem (statement). Some word-RAM program over the exact basis meets FibonacciSpec.

      Instances For

        Fibonacci-heap Dijkstra main theorem (statement). 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.

        Instances For