Subject: Discrete Mathematicsand Graph Theory
Title: Djikstra’s Algorithm application
Submitted To:
Prof. Aman Mukti
Presented by:
1) Shraddha Shukla –SA258
2) Suraj Bhandare – SA260
3) Aliza Malgi – SA203
2.
What is Shortestpath algorithm?
The shortest path problem is about finding a path between 2 vertices
in a graph such that the total sum of the edges weights is minimum.
In simpler words, To solve the shortest path problem means to find
the shortest possible route or path between two vertices (or nodes) in
a Graph.
Some Common Algorithms:
1.Dijkstra's Algorithm
2.Bellman-Ford Algorithm
3.Floyd-Warshall Algorithm
4.A* Algorithm
3.
Dijkstra's algorithm findsthe shortest path from one vertex to all
other vertices. It does so by repeatedly selecting the nearest
unvisited vertex.
The algorithm works on weighted graphs, where edges have
associated costs (e.g., distances, time, etc).
Dijkstra's algorithm is a greedy algorithm, which means that it goes
for most optimal solution available next and combines all of them.
This algorithm does not accept non-negative edges and works only
if edges have positive cost assigned to it.
This algorithm is single source.
Introduction to Djikstra’s Algorithm
4.
Some common terminologies
1.Graph:A collection of vertices and edges, where vertices are interconnected by edges.
2.Vertices (or Nodes): Represent locations or points in the graph.
3.Edges: Connecting link between vertices and having a specific weight or cost.
4.Weighted Graph: A graph where each edge has an associated weight or cost.
5.Source Node: The starting node from where shortest path calculation starts.
6. Shortest Path: The path with the least total weight (cost or distance) between two
nodes. 7. Distance: The weight or cost associated with an edge.
8.Initialization: Setting initial distances to vertices, typically infinity for all except
the source, which starts at 0.
9.Visited: A vertex that has been considered as part of the shortest path from the source.
10. Unvisited: A vertex that has not yet been considered as part of the shortest
1
2
3
0
5
6
4
2
6
5
8 10
15
2
6
6
Final Graph
Wenow have shortest distance path to every node in the graph from the
source node.
Supposedly we have to go from 0 to 6 then the path would
be 0 → 1 → 3 → 4 → 6 with total weight 19
Navigation C Maps– Finds the shortest or fastest routes in GPS
systems like Google Maps and Waze.
Network Routing – Used in internet protocols (e.g., OSPF) to
determine efficient paths for data transmission.
Transportation C Logistics – Optimizes delivery routes and travel
paths in systems like public transit or shipping.
Game Development C AI – Helps game characters or robots
navigate maps and avoid obstacles intelligently.
Emergency C Urban Planning – Assists in planning city layouts and
emergency response routes for quick access.
Real - world applications
13.
Benefits and Limitations
BENEFITS:
1.Itis used to find the shortest path in a graph.
2.It is widely used in geographical mapping systems.
3.It is used to pinpoint the graph vertices on a map.
4.It is used to determine the Open Shortest Path First in IP
routing.
5.It is utilized in telephone networks to establish connections.
LIMITATIONS:
1.It performs a blind search, which can be time-consuming.
2.It can't handle negative edges, resulting in acyclic
graphs where the optimal shortest path may not be
found.
14.
Dijkstra’s Algorithm isa powerful and efficient method for finding the
shortest path in graphs with non-negative edge weights. Its simplicity,
accuracy, and wide range of real-world applications—from GPS navigation to
network routing—make it a fundamental tool in computer science. Despite
some limitations, such as not handling negative weights, it remains one of
the most widely used and taught algorithms
CONCLUSION