JuliaGraphs / JuliaGraphs/Graphs.jl

Time complexity of Johnson's algorithm wrongly stated in documentation

Open
#401 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation
Dominant language
Julia
Stars
538
Forks
128
Avg merge
10h 25m
Merged PRs (30d)
2

Description

Description of bug
Describe the bug clearly and concisely.

The documentation to Johnson's all-pairs shortest path algorithm is stated as O(|V||E|). This cannot be true, in particular if Dijkstra's algorithm is finally called for weighted graphs. If Dijkstra's algorithm uses a Fibonacci heap (I didn't look if this is the case here), the runtime is O(|V|^2 log |V|+|V|⋅|E|), which is a big difference for sparse graphs.
Only in case of an unweighted graph, one can achieve time O(|V|
|E|) by calling breadth first search from each node.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the documentation for Johnson's all-pairs shortest path algorithm and read the referenced complexity statement alongside the algorithm's treatment of weighted and unweighted graphs. Verify the appropriate bounds for the implementation, then update the documentation to distinguish the weighted and unweighted cases and confirm the stated complexity is accurate.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.