Did you know Cards Games

Johnson's algorithm

Johnson's algorithm (1977): algorithm to find shortest paths between all pairs of vertices in a sparse, edge-weighted (possibly negatively), directed graph; uses the Bellman–Ford algorithm to remove negative weights and Dijkstra’s algorithm on the rest. No. 265,599 of 4,515,532 cards by fame.

Johnson's algorithm: quick facts

Description
Algorithm to find shortest paths between all pairs of vertices in a sparse, edge-weighted (possibly negatively), directed graph; uses the Bellman–Ford algorithm to remove negative weights and Dijkstra’s algorithm on the rest
Published
1977
Invented
Donald B. Johnson
Rarity in the game
Epic card
In its topic
No. 2,599 of 10,238 “Mathematics” cards
Wikipedia
article in 16 languages
Wikidata
Q2345824
Wikipedia page views
about 1,700 a month (November 2025 – October 2026)

Fame score: Wikipedia page views (July 2015 – October 2026, 39 languages). Updated .

Do you know?

Johnson's algorithm: what year was it published?

Show the answer

Right answer: 1977

Another question: play “Do you know?” → · More questions: Mega Quizz →

Play Masterpiece: match works to their artist →

Picture illustrating “Johnson's algorithm”
Photo: Emma-Nuel019, CC0 (Wikimedia Commons)

Johnson's algorithm: summary

Johnson's algorithm is a way to find the shortest paths between all pairs of vertices in an edge-weighted directed graph. It allows some of the edge weights to be negative numbers, but no negative-weight cycles may exist. It works by using the Bellman–Ford algorithm to compute a transformation of the input graph that removes all negative weights, allowing Dijkstra's algorithm to be used on the transformed graph.

Source: Wikipedia (CC BY-SA 4.0)

More cards: Mathematics

The best-known of the 10,238 “Mathematics” cards

This card's topics

“Johnson's algorithm” is one of the 4,515,532 cards of Did you know Cards, the free Wikipedia card game where you learn as you play: every card is a piece of knowledge from Wikipedia. Open boosters, complete your albums and challenge other players to duels.