The Necessary and Sufficient Condition for Dijkstra’s Algorithm Applicability

Authors

  • Федор Александрович Новиков SPbSU, St. Petersburg, Russia
  • Сергей Сергеевич Лебедев SPbSU, St. Petersburg, Russia

Keywords:

shortest path problem, Dijkstra's algorithm, negative weight, necessary and sufficient condition

Abstract

Dijkstra’s algorithm is one of the most popular and fundamental algorithms solving the shortest path problem in directed graphs (digraphs). It is well known that Dijkstra’s algorithm is applicable to digraphs with non-negative weighted arcs. But as simple observations show there are many digraphs and even classes of digraphs with negatively weighted arcs for which the Dijkstra’s algorithm is also applicable. Thus the non-negative weight of the arcs condition is not a necessary condition but only a sufficient one. pagebreak The necessary condition for applicability of Dijkstra’s algorithm was unknown. In this paper, we present and prove a necessary and sufficient condition for the applicability of Dijkstra’s algorithm. The condition is based on the notion of a path's record that we introduce.

Author Biographies

  • Федор Александрович Новиков, SPbSU, St. Petersburg, Russia

    Novikov Fedor Alexandrovich: Technical science doctor, professor of the applied math departement of SPbPU

  • Сергей Сергеевич Лебедев, SPbSU, St. Petersburg, Russia

    Lebedev Sergei Sergeevich: student, SPbPU

Downloads

Published

2017-07-20

Issue

Section

Computer science

How to Cite

[1]
Ф. А. Новиков and С. С. Лебедев, “The Necessary and Sufficient Condition for Dijkstra’s Algorithm Applicability”, Computer Tools in Education, no. 4, pp. 5–13, Jul. 2017, Accessed: Sep. 15, 2026. Available: http://cte.eltech.ru/ojs/index.php/kio/article/view/1500

Most read articles by the same author(s)