FINDING THE SHORTEST PATH IN POSTGRESQL DATABASE USING MODIFIED DIJKSTRA ALGORITHM
M.A. Davydovskiy · 2025
The article proposes an algorithm for finding the shortest path in a graph based on Dijkstra's algorithm. The algorithm uses a graph whose edges are ordered by their lengths. At each step of the algorithm, the next edge outgoing from the vertex is selected. A proof of the correctness of this algorithm is given. The algorithm is implemented in C programming language in the PostgreSQL database management system. The efficiency of this algorithm is shown in comparison with Dijkstra's algorithm of the pgRouting library.