SlideShare a Scribd company logo
1 of 13
Present by: Abdul Ahad Abro
1
Graph Theory in Computer Applications
Computer Engineering Department, Ege University, Turkey
Shortest-Path Problems
Shortest-Path Problems
Many problems can be modeled using graphs with weights assigned to their
edges. Consider how an airlines system can be modeled. The graph model
representing cities by vertices and flights by edges. Problems involving distances
can be modeled by assigning distances between cities to the edges. Problems
involving flight time can be modeled by assigning flight to edges. Problems involving
fares can be modeled by assigning fares to the edges.
2
3
Figure 1: Displays three different assignments of weights to the edges of a graph representing distances,
flight times and fares respectively.
Graphs that have a number assigned to each edge are called
weighted graphs. Weighted graph are used to model computer
networks.
4
Figure 2: Weighted graphs that represent three ways to assign weights to the edges of a graph of a
computer network, corresponding to distance, response time and cost.
Determine the path of least length between two vertices in
network.
Shortest Path in air distance between Boston and Los Angeles?
Smallest total flight time?
Cheapest fare?
Circuit of Shortest total length that visits every vertex of a
complete graph exactly once. This is the famous traveling
salesmen problem.
5
Fig: 03 A Weighted Simple Graph
A Shortest-Path Algorithms
There are several different algorithms that find a shortest path between two vertices in a weighted
graph. Algorithm discovered by Dutch mathematician Edsger Dijkstra. Which used undirected weighted
graphs. Although the shortest path is easily found by inspection.
Shortest path between a and z. Path of length 6 , namely, a,d,e,z.
6
Dijkstra's Algorithm
This algorithm relies on a series of iterations. A distinguished set of vertices is constructed by adding one
vertex set at each iteration. A labeling procedure, a vertex w is labeled with the length of a shortest
path from a to w that containonly vertices already in the distinguishedset.
7
Fig: 04 Dijkstra's Algorithm
8
Fig: 05 Using Dijkstra's Algorithm to find a shortest path from a to z.
9
Theorem 1
DiJkstra’s algorithm finds the length of a shortest path between two vertices in a
connected simple undirected weighted graph.
10
Theorem 2
Dijkstra's algorithm uses O (n2) operations additions and comparisons to find the
length of a shortest path between two vertices in a connected simple undirected
weighted graph with n vertices.
11
The Traveling Salesman Problem
A travelingsalesman wants to visiteachof n citiesexactlyonce and returnto his startingpoint. For-example,
supposethat the salesmanwants to visitDetroit, Toledo, Saginaw, GrandRapids and Kalamaoo. In which order
should he visit these cities to travel the minimumtotal distance? To solve this problemwe can assumethe
salesman starts in Detroit. There are 24 such circuits, but becausewe travel the samedistance whenwe travel a
circuitin reverse order, we need onlyconsider12 different circuits to find the minimumtotal distancehe must
travel.
Fig: 06 The Graph showing the distances between five cities.
12
The Traveling Salesman Problem
Fig: 07 12 different circuits.
13

More Related Content

What's hot

Applications of Linear Algebra in Computer Sciences
Applications of Linear Algebra in Computer SciencesApplications of Linear Algebra in Computer Sciences
Applications of Linear Algebra in Computer SciencesAmir Sharif Chishti
 
Minimum spanning tree (mst)
Minimum spanning tree (mst)Minimum spanning tree (mst)
Minimum spanning tree (mst)Pradeep Behera
 
BFS & Interval Graph Introduction
BFS & Interval Graph IntroductionBFS & Interval Graph Introduction
BFS & Interval Graph Introductionnazlitemu
 
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPTHOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPTAhtesham Ullah khan
 
Dijkstra’S Algorithm
Dijkstra’S AlgorithmDijkstra’S Algorithm
Dijkstra’S Algorithmami_01
 
Analysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer ApplicationAnalysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer ApplicationIRJET Journal
 
Dijkstra s algorithm
Dijkstra s algorithmDijkstra s algorithm
Dijkstra s algorithmmansab MIRZA
 
Application of Dijkstra Algorithm in Robot path planning
Application of Dijkstra Algorithm in Robot path planningApplication of Dijkstra Algorithm in Robot path planning
Application of Dijkstra Algorithm in Robot path planningDarling Jemima
 
Djikstra's Algorithm
Djikstra's Algorithm Djikstra's Algorithm
Djikstra's Algorithm Samar Kenkre
 
Discrete Mathematics Presentation
Discrete Mathematics PresentationDiscrete Mathematics Presentation
Discrete Mathematics PresentationSalman Elahi
 
Lattice Network | Computer Science
Lattice Network | Computer ScienceLattice Network | Computer Science
Lattice Network | Computer ScienceTransweb Global Inc
 
Digital Logic Design-Lecture 5
Digital Logic Design-Lecture 5Digital Logic Design-Lecture 5
Digital Logic Design-Lecture 5Samia Sultana
 
Graph Matching
Graph MatchingGraph Matching
Graph Matchinggraphitech
 
Dijkstra algorithm
Dijkstra algorithmDijkstra algorithm
Dijkstra algorithmare you
 
mathpsy2012 poster_Shweta_3(1)
mathpsy2012 poster_Shweta_3(1)mathpsy2012 poster_Shweta_3(1)
mathpsy2012 poster_Shweta_3(1)Shweta Gupte
 

What's hot (20)

Applications of Linear Algebra in Computer Sciences
Applications of Linear Algebra in Computer SciencesApplications of Linear Algebra in Computer Sciences
Applications of Linear Algebra in Computer Sciences
 
Minimum spanning tree (mst)
Minimum spanning tree (mst)Minimum spanning tree (mst)
Minimum spanning tree (mst)
 
BFS & Interval Graph Introduction
BFS & Interval Graph IntroductionBFS & Interval Graph Introduction
BFS & Interval Graph Introduction
 
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPTHOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
HOMOGENEOUS CO-ORDINATES IN COMPUTER GRAPHICS PPT
 
Shortest path algorithm
Shortest  path algorithmShortest  path algorithm
Shortest path algorithm
 
Dijkstra's Algorithm
Dijkstra's Algorithm Dijkstra's Algorithm
Dijkstra's Algorithm
 
Dijkstra’S Algorithm
Dijkstra’S AlgorithmDijkstra’S Algorithm
Dijkstra’S Algorithm
 
Analysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer ApplicationAnalysis of Impact of Graph Theory in Computer Application
Analysis of Impact of Graph Theory in Computer Application
 
1 sollins algorithm
1 sollins algorithm1 sollins algorithm
1 sollins algorithm
 
Dijkstra s algorithm
Dijkstra s algorithmDijkstra s algorithm
Dijkstra s algorithm
 
Application of Dijkstra Algorithm in Robot path planning
Application of Dijkstra Algorithm in Robot path planningApplication of Dijkstra Algorithm in Robot path planning
Application of Dijkstra Algorithm in Robot path planning
 
Applications of linear algebra in field of it
Applications of linear algebra in field of itApplications of linear algebra in field of it
Applications of linear algebra in field of it
 
Djikstra's Algorithm
Djikstra's Algorithm Djikstra's Algorithm
Djikstra's Algorithm
 
Discrete Mathematics Presentation
Discrete Mathematics PresentationDiscrete Mathematics Presentation
Discrete Mathematics Presentation
 
Lattice Network | Computer Science
Lattice Network | Computer ScienceLattice Network | Computer Science
Lattice Network | Computer Science
 
Digital Logic Design-Lecture 5
Digital Logic Design-Lecture 5Digital Logic Design-Lecture 5
Digital Logic Design-Lecture 5
 
Graph Matching
Graph MatchingGraph Matching
Graph Matching
 
Dijkstra algorithm
Dijkstra algorithmDijkstra algorithm
Dijkstra algorithm
 
mathpsy2012 poster_Shweta_3(1)
mathpsy2012 poster_Shweta_3(1)mathpsy2012 poster_Shweta_3(1)
mathpsy2012 poster_Shweta_3(1)
 
UTSlides
UTSlidesUTSlides
UTSlides
 

Similar to Shortest-Path Problems - Graph Theory in Computer Applications

The shortest not necessarily the best. other path on the basis of the optimal...
The shortest not necessarily the best. other path on the basis of the optimal...The shortest not necessarily the best. other path on the basis of the optimal...
The shortest not necessarily the best. other path on the basis of the optimal...eSAT Journals
 
The shortest not necessarily the best other path on the basis of the optimal ...
The shortest not necessarily the best other path on the basis of the optimal ...The shortest not necessarily the best other path on the basis of the optimal ...
The shortest not necessarily the best other path on the basis of the optimal ...eSAT Publishing House
 
Flight-schedule using Dijkstra's algorithm with comparison of routes findings
Flight-schedule using Dijkstra's algorithm with comparison of  routes findingsFlight-schedule using Dijkstra's algorithm with comparison of  routes findings
Flight-schedule using Dijkstra's algorithm with comparison of routes findingsIJECEIAES
 
Spanning Tree in data structure and .pptx
Spanning Tree in data structure and .pptxSpanning Tree in data structure and .pptx
Spanning Tree in data structure and .pptxasimshahzad8611
 
Node Path Visualizer Using Shortest Path Algorithms
Node Path Visualizer Using Shortest Path AlgorithmsNode Path Visualizer Using Shortest Path Algorithms
Node Path Visualizer Using Shortest Path AlgorithmsIRJET Journal
 
Implementation of D* Path Planning Algorithm with NXT LEGO Mindstorms Kit for...
Implementation of D* Path Planning Algorithm with NXT LEGO Mindstorms Kit for...Implementation of D* Path Planning Algorithm with NXT LEGO Mindstorms Kit for...
Implementation of D* Path Planning Algorithm with NXT LEGO Mindstorms Kit for...idescitation
 
Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Krishna Nanda
 
AN EFFECT OF USING A STORAGE MEDIUM IN DIJKSTRA ALGORITHM PERFORMANCE FOR IDE...
AN EFFECT OF USING A STORAGE MEDIUM IN DIJKSTRA ALGORITHM PERFORMANCE FOR IDE...AN EFFECT OF USING A STORAGE MEDIUM IN DIJKSTRA ALGORITHM PERFORMANCE FOR IDE...
AN EFFECT OF USING A STORAGE MEDIUM IN DIJKSTRA ALGORITHM PERFORMANCE FOR IDE...ijcsit
 
Shortest path by using suitable algorithm.pdf
Shortest path by using suitable algorithm.pdfShortest path by using suitable algorithm.pdf
Shortest path by using suitable algorithm.pdfzefergaming
 
application of graph theory in air traffic control.pptx
application of graph theory in air traffic control.pptxapplication of graph theory in air traffic control.pptx
application of graph theory in air traffic control.pptxmathematicssac
 
LogicProgrammingShortestPathEfficiency
LogicProgrammingShortestPathEfficiencyLogicProgrammingShortestPathEfficiency
LogicProgrammingShortestPathEfficiencySuraj Nair
 
IRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET Journal
 
Algo labpresentation a_group
Algo labpresentation a_groupAlgo labpresentation a_group
Algo labpresentation a_groupUmme habiba
 
IRJET- Survey on Implementation of Graph Theory in Routing Protocols of Wired...
IRJET- Survey on Implementation of Graph Theory in Routing Protocols of Wired...IRJET- Survey on Implementation of Graph Theory in Routing Protocols of Wired...
IRJET- Survey on Implementation of Graph Theory in Routing Protocols of Wired...IRJET Journal
 
1 s2.0-s0030402611000131-main
1 s2.0-s0030402611000131-main1 s2.0-s0030402611000131-main
1 s2.0-s0030402611000131-mainumere15
 

Similar to Shortest-Path Problems - Graph Theory in Computer Applications (20)

The shortest not necessarily the best. other path on the basis of the optimal...
The shortest not necessarily the best. other path on the basis of the optimal...The shortest not necessarily the best. other path on the basis of the optimal...
The shortest not necessarily the best. other path on the basis of the optimal...
 
The shortest not necessarily the best other path on the basis of the optimal ...
The shortest not necessarily the best other path on the basis of the optimal ...The shortest not necessarily the best other path on the basis of the optimal ...
The shortest not necessarily the best other path on the basis of the optimal ...
 
Flight-schedule using Dijkstra's algorithm with comparison of routes findings
Flight-schedule using Dijkstra's algorithm with comparison of  routes findingsFlight-schedule using Dijkstra's algorithm with comparison of  routes findings
Flight-schedule using Dijkstra's algorithm with comparison of routes findings
 
Spanning Tree in data structure and .pptx
Spanning Tree in data structure and .pptxSpanning Tree in data structure and .pptx
Spanning Tree in data structure and .pptx
 
E017512630
E017512630E017512630
E017512630
 
06_AJMS_334_21.pdf
06_AJMS_334_21.pdf06_AJMS_334_21.pdf
06_AJMS_334_21.pdf
 
Node Path Visualizer Using Shortest Path Algorithms
Node Path Visualizer Using Shortest Path AlgorithmsNode Path Visualizer Using Shortest Path Algorithms
Node Path Visualizer Using Shortest Path Algorithms
 
Shortest path analysis
Shortest path analysis Shortest path analysis
Shortest path analysis
 
Fakhre alam
Fakhre alamFakhre alam
Fakhre alam
 
Implementation of D* Path Planning Algorithm with NXT LEGO Mindstorms Kit for...
Implementation of D* Path Planning Algorithm with NXT LEGO Mindstorms Kit for...Implementation of D* Path Planning Algorithm with NXT LEGO Mindstorms Kit for...
Implementation of D* Path Planning Algorithm with NXT LEGO Mindstorms Kit for...
 
Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1Computer Communication Networks-Routing protocols 1
Computer Communication Networks-Routing protocols 1
 
AN EFFECT OF USING A STORAGE MEDIUM IN DIJKSTRA ALGORITHM PERFORMANCE FOR IDE...
AN EFFECT OF USING A STORAGE MEDIUM IN DIJKSTRA ALGORITHM PERFORMANCE FOR IDE...AN EFFECT OF USING A STORAGE MEDIUM IN DIJKSTRA ALGORITHM PERFORMANCE FOR IDE...
AN EFFECT OF USING A STORAGE MEDIUM IN DIJKSTRA ALGORITHM PERFORMANCE FOR IDE...
 
Shortest path by using suitable algorithm.pdf
Shortest path by using suitable algorithm.pdfShortest path by using suitable algorithm.pdf
Shortest path by using suitable algorithm.pdf
 
application of graph theory in air traffic control.pptx
application of graph theory in air traffic control.pptxapplication of graph theory in air traffic control.pptx
application of graph theory in air traffic control.pptx
 
LogicProgrammingShortestPathEfficiency
LogicProgrammingShortestPathEfficiencyLogicProgrammingShortestPathEfficiency
LogicProgrammingShortestPathEfficiency
 
Ijcnc050213
Ijcnc050213Ijcnc050213
Ijcnc050213
 
IRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing AlgorithmsIRJET- Survey on Adaptive Routing Algorithms
IRJET- Survey on Adaptive Routing Algorithms
 
Algo labpresentation a_group
Algo labpresentation a_groupAlgo labpresentation a_group
Algo labpresentation a_group
 
IRJET- Survey on Implementation of Graph Theory in Routing Protocols of Wired...
IRJET- Survey on Implementation of Graph Theory in Routing Protocols of Wired...IRJET- Survey on Implementation of Graph Theory in Routing Protocols of Wired...
IRJET- Survey on Implementation of Graph Theory in Routing Protocols of Wired...
 
1 s2.0-s0030402611000131-main
1 s2.0-s0030402611000131-main1 s2.0-s0030402611000131-main
1 s2.0-s0030402611000131-main
 

More from Dr. Abdul Ahad Abro

More from Dr. Abdul Ahad Abro (9)

DBMS & RDBMS
DBMS & RDBMSDBMS & RDBMS
DBMS & RDBMS
 
Outlier Detection
Outlier DetectionOutlier Detection
Outlier Detection
 
AI vs Human
AI vs HumanAI vs Human
AI vs Human
 
Artificial intelligence - AI Complete Concept
Artificial intelligence - AI Complete ConceptArtificial intelligence - AI Complete Concept
Artificial intelligence - AI Complete Concept
 
Edge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloringEdge Coloring & K-tuple coloring
Edge Coloring & K-tuple coloring
 
Graph Coloring
Graph ColoringGraph Coloring
Graph Coloring
 
Data mining , Knowledge Discovery Process, Classification
Data mining , Knowledge Discovery Process, ClassificationData mining , Knowledge Discovery Process, Classification
Data mining , Knowledge Discovery Process, Classification
 
Regression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms ExcelRegression with Microsoft Azure & Ms Excel
Regression with Microsoft Azure & Ms Excel
 
Expert System - Artificial intelligence
Expert System - Artificial intelligenceExpert System - Artificial intelligence
Expert System - Artificial intelligence
 

Recently uploaded

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Recently uploaded (20)

Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

Shortest-Path Problems - Graph Theory in Computer Applications

  • 1. Present by: Abdul Ahad Abro 1 Graph Theory in Computer Applications Computer Engineering Department, Ege University, Turkey Shortest-Path Problems
  • 2. Shortest-Path Problems Many problems can be modeled using graphs with weights assigned to their edges. Consider how an airlines system can be modeled. The graph model representing cities by vertices and flights by edges. Problems involving distances can be modeled by assigning distances between cities to the edges. Problems involving flight time can be modeled by assigning flight to edges. Problems involving fares can be modeled by assigning fares to the edges. 2
  • 3. 3 Figure 1: Displays three different assignments of weights to the edges of a graph representing distances, flight times and fares respectively. Graphs that have a number assigned to each edge are called weighted graphs. Weighted graph are used to model computer networks.
  • 4. 4 Figure 2: Weighted graphs that represent three ways to assign weights to the edges of a graph of a computer network, corresponding to distance, response time and cost. Determine the path of least length between two vertices in network. Shortest Path in air distance between Boston and Los Angeles? Smallest total flight time? Cheapest fare? Circuit of Shortest total length that visits every vertex of a complete graph exactly once. This is the famous traveling salesmen problem.
  • 5. 5 Fig: 03 A Weighted Simple Graph A Shortest-Path Algorithms There are several different algorithms that find a shortest path between two vertices in a weighted graph. Algorithm discovered by Dutch mathematician Edsger Dijkstra. Which used undirected weighted graphs. Although the shortest path is easily found by inspection. Shortest path between a and z. Path of length 6 , namely, a,d,e,z.
  • 6. 6 Dijkstra's Algorithm This algorithm relies on a series of iterations. A distinguished set of vertices is constructed by adding one vertex set at each iteration. A labeling procedure, a vertex w is labeled with the length of a shortest path from a to w that containonly vertices already in the distinguishedset.
  • 8. 8 Fig: 05 Using Dijkstra's Algorithm to find a shortest path from a to z.
  • 9. 9 Theorem 1 DiJkstra’s algorithm finds the length of a shortest path between two vertices in a connected simple undirected weighted graph.
  • 10. 10 Theorem 2 Dijkstra's algorithm uses O (n2) operations additions and comparisons to find the length of a shortest path between two vertices in a connected simple undirected weighted graph with n vertices.
  • 11. 11 The Traveling Salesman Problem A travelingsalesman wants to visiteachof n citiesexactlyonce and returnto his startingpoint. For-example, supposethat the salesmanwants to visitDetroit, Toledo, Saginaw, GrandRapids and Kalamaoo. In which order should he visit these cities to travel the minimumtotal distance? To solve this problemwe can assumethe salesman starts in Detroit. There are 24 such circuits, but becausewe travel the samedistance whenwe travel a circuitin reverse order, we need onlyconsider12 different circuits to find the minimumtotal distancehe must travel. Fig: 06 The Graph showing the distances between five cities.
  • 12. 12 The Traveling Salesman Problem Fig: 07 12 different circuits.
  • 13. 13

Editor's Notes

  1. .