IT lexicon Programming Bellman-Ford

Bellman-Ford

Programming På svenska → Updated: 2026-05-24

Shortest-path algorithm for graphs with negative edge weights — Dijkstra's stronger cousin when Dijkstra's basic assumption doesn't hold.

Iterates V-1 times relaxing each edge. Detects negative cycles via an extra iteration. Time complexity O(V·E) — slower than Dijkstra's O((V+E) log V) but handles negative weights.

Powers RIP (Routing Information Protocol — old but still around), arbitrage detection in finance graphs, classroom scheduling. Competitor: Floyd-Warshall (all-pairs), Johnson's algorithm (sparse graphs).

← Back to the lexicon