Johnson’s Algorithm

  • Re-weighting technique: If negative edges exist, compute for Dijkstra’s algorithm to work on.
    • , is shortest using if and only if the same applies using .
  • Define as
  • The new weight is given byture
    • is any mapping
    • So that
  • Determining takes time.
  • Run Dijkstra’s algorithm on each vertex.
  • With min-priority-queue in Dijkstra’s algorithm implemented by fibonacci-heap, the runtime is , binary min-heap yields .