0% found this document useful (0 votes)
110 views2 pages

Case Study: Dijkstra's Algorithm

Dijkstra's algorithm is used to find the shortest path between nodes in a weighted graph. It works by beginning at the source node and examining the graph to determine the shortest distance from that node to all other nodes. The algorithm tracks the shortest recognized distance from each node to the source and updates if a shorter path is found. It marks visited nodes and adds them to the path until all nodes are included, creating the shortest path from source to each destination node. Dijkstra's algorithm is applied in Google Maps to find the shortest driving routes between locations, modeling cities as nodes and routes as edges. It is also used in social networks to efficiently suggest friends a user may know by finding the shortest paths between users based on connections

Uploaded by

Sahil Sarwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views2 pages

Case Study: Dijkstra's Algorithm

Dijkstra's algorithm is used to find the shortest path between nodes in a weighted graph. It works by beginning at the source node and examining the graph to determine the shortest distance from that node to all other nodes. The algorithm tracks the shortest recognized distance from each node to the source and updates if a shorter path is found. It marks visited nodes and adds them to the path until all nodes are included, creating the shortest path from source to each destination node. Dijkstra's algorithm is applied in Google Maps to find the shortest driving routes between locations, modeling cities as nodes and routes as edges. It is also used in social networks to efficiently suggest friends a user may know by finding the shortest paths between users based on connections

Uploaded by

Sahil Sarwar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Case Study

Name – Sahil Sarwar


PRN - 150
Div – c

Dijkstra’s Algorithm
Dijkstra’s algorithm is mainly used to find the shortest path from a starting
node/point to the target node/point in a weighted graph. When Dijkstra’s
algorithm is applied, it creates a tree of the shortest path from a starting
vertex/source to all the other nodes in the graph. A few constraints for the
application of Dijkstra’s algorithm, the graph must be a weighted graph with
non-negative weighted edges. It can be either a directed or undirected graph.

Application -
Digital Mapping Services in Google Maps: Many times we have tried to find
the distance in G-Maps, from one city to another, or from your location to the
nearest desired location. There encounters the Shortest Path Algorithm, as
there are various routes/paths connecting them but it has to show the
minimum distance, so Dijkstra’s Algorithm is used to find the minimum
distance between two locations along the path. Consider India as a graph and
represent a city/place with a vertex and the route between two cities/places as
an edge, then by using this algorithm, the shortest routes between any two
cities/places or from one city/place to another city/place can be calculated.

Working-

 Basically, the Dijkstra’s algorithm begins from the node to be selected,


the source node, and it examines the entire graph to determine the
shortest path among that node and all the other nodes in the graph. 
 The algorithm maintains the track of the currently recognized shortest
distance from each node to the source code and updates these values if
it identifies another shortest path.
 Once the algorithm has determined the shortest path amid the source
code to another node, the node is marked as “visited” and can be added
to the path.
 This process is being continued till all the nodes in the graph have been
added to the path, as this way, a path gets created that connects the
source node to all the other nodes following the plausible shortest path
to reach each node.

Another application -
Social Networking Applications: In many applications you might have seen
the app suggests the list of friends that a particular user may know. How do
you think many social media companies implement this feature efficiently,
especially when the system has over a billion users. The standard Dijkstra
algorithm can be applied using the shortest path between users measured
through handshakes or connections among them. When the social networking
graph is very small, it uses standard Dijkstra’s algorithm along with some other
features to find the shortest paths, and however, when the graph is becoming
bigger and bigger, the standard algorithm takes a few several seconds to count
and alternate advanced algorithms are used.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy