Acerca del Algoritmo de Dijkstra

Acerca del Algoritmo de Dijkstra
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

In this paper we prove the correctness of Dijkstra’s algorithm. We also discuss it and at the end we show an application.


💡 Research Summary

The paper presents a thorough examination of Dijkstra’s algorithm for finding single‑source shortest paths in a directed graph with non‑negative edge weights. It begins by defining the basic graph terminology: a finite set of vertices V, a set of directed edges E, and a positive weight function p(u,v) for each edge. The cost of a path is the sum of its edge weights, and a shortest‑path is one whose cost is minimal among all possible paths between two vertices.

The core of the algorithm is described step by step. Initially, the source vertex a receives a label L(a)=0 while every other vertex receives L(v)=∞. Two sets are maintained: S, the set of vertices whose shortest‑path distance from a has been finalized, and T=V\S, the remaining vertices. In each iteration the algorithm selects the vertex u in T with the smallest label, moves u to S, and relaxes all outgoing edges (u,v) by updating L(v)←min{L(v), L(u)+p(u,v)}. This process repeats until the target vertex z enters S or all vertices have been processed.

The correctness proof is organized around Theorem 1, which has two parts: (A) for every vertex u in S (except the source) any a‑to‑u path has cost at least L(u); (B) there exists an a‑to‑u path whose cost equals L(u). The proof proceeds by induction on the number of vertices added to S. The base case shows that after the first iteration the source a is in S and its immediate neighbors receive labels equal to the corresponding edge weights, satisfying both (A) and (B). The inductive step assumes the theorem holds for the first k vertices in S and shows it also holds for the (k+1)‑st vertex. By considering an arbitrary a‑to‑v path and identifying the first vertex y on that path that lies outside S_k, the authors demonstrate that L(v) cannot exceed the true shortest‑path cost, establishing (A). Simultaneously, because y’s label was updated when its predecessor entered S, L(v) can be expressed as L(u_j)+p(u_j,v) for some earlier vertex u_j, which yields a concrete shortest‑path of that exact cost, establishing (B).

Termination is guaranteed because each iteration adds a distinct vertex to S, and there are only |V| vertices. Consequently the algorithm finishes after at most |V| iterations, and the final label L(z) equals the minimum cost from a to z.

Beyond the basic algorithm, the paper discusses a simple modification that records, together with each distance label, the predecessor vertex that caused the last update. This pair (distance, predecessor) enables reconstruction of the actual shortest‑path after the algorithm terminates by back‑tracking from the target to the source.

An illustrative example is provided using an undirected weighted graph (shown in Figure 4). Applying the algorithm from vertex a to vertex z yields the shortest‑path a‑b‑c‑d‑z with total weight 10, confirming the theoretical results with a concrete computation. The authors also note that in asymmetric graphs (e.g., transportation costs that differ by direction) the distance from a to z may differ from that from z to a, while in symmetric (undirected) graphs the distances are identical.

In summary, the paper rigorously proves the correctness of Dijkstra’s algorithm, explains its implementation details, extends it to recover full paths, and demonstrates its practical use on a sample graph, offering a comprehensive resource for both theoretical understanding and applied work.


Comments & Academic Discussion

Loading comments...

Leave a Comment