Ministry of Higher Education
Jazan University, Jazan | |
A DIJKSTRA SHORTEST PATH ALGORITHM
Faculty of Computer Science & Information system
ABSTRACT
Dijkstra Algorithm is utilized to compute shortest path in a network. It is essential to explain the different types of connected, directed and weighted graphs. Tree is also discussed with the help of graph.
Dijkstra shortest path is shown and described with the example. Pseudo code and algorithm are also included along with their efficiency and applications. The different aspects of related algorithms were discussed, such as A* algorithm, Bellman–Ford algorithm and Prim’s algorithm
Keywords – Algorithm, Network, Tree, Pseudo code
INTRODUCTION
Graphs ➢ G (V, E) where: - V is vertex set - E is edge set: every e in E connects two vertices -If (i, j) connected they are said adjacent -Edge e = (i, j) is said incident to i and j -|V| = cardinality of the vertex set ➢ A graph G(V, E) can be represented by |V| x |V| adjacency matrix ➢ A path between vertices i and j is a sequence of vertices and edges starting with vertex i and ending in j, such that every edge is incident to the preceding and following vertices. ➢ A path is simple if every node/edge appears only once. ➢ Distance between vertices i and j: minimum number of edges along a path from i to j ➢ Cycle: simple path where starting vertex coincides with ending vertex ➢ A graph is connected if there exists a path between any possible vertex pair i and j ➢ A graph is directed if edges have a direction. In this case, (i, j) belonging to E does not imply that (j, i) belongs to E. Edges are called arcs in this case ➢ A graph is weighted if every edge (or arc) comes with a number .
Tree
Graph T is a tree if: ➢ One and only one simple path between every
References: 1. http://tide4javascript.com/?s=Dijkstra 2. http://www.cs.sunysb.edu/~skiena/combinatorica/animations/dijkstra.html 3. http://www.unf.edu/~wkloster/foundations/DijkstraApplet/DijkstraApp l et.htm 4. http://www.cs.auckland.ac.nz/software/AlgAnim/dijkstra.html 5. http://www.cs.mcgill.ca/~cs251/OldCourses/1997/topic29/ 6. http://en.wikipedia.org/wiki/Dijkstra 's_algorithm