SlideShare a Scribd company logo
PRESENTATION
DISCRETE
STRUCTURE
MAHESH SINGH MADAI
PREPARED BY
TOPICS
Hamiltonian Path and Circuit
Matching Theory
Shortest Path Problem ( Dijkstra’s Algorithm)
#1. HAMILTONIAN PATH & CIRCUIT
• Let the graph be G = (V,E); where |V|>=3 (vertices/nodes) and E denote the Edges(connector
of endpoints)
• A simple path in such graph G that passes through every vertex exactly once is called
Hamiltonian path. Every edge mayn't be used here.
• A circuit is that path where starting and endpoints are same.
• For example:
A B A B
D C
D C
Path -> A –B –C –D
Circuit -> A-B-C-D-A
More Examples:
A B
C A B C D
D E E F G H
Hamilton Path Exists Hamilton Path Does not Exists
a b
c d
#THEOROM:
Let G be a graph of n>=3 vertices, then G has a Hamiltonian path if for only two
non adjacent vertices u and v of G satisfy the following condition
deg (u) + deg (v) >= n
For example:
a b
c d
Here, total vertices (n) = 4
Take vertex a and d
deg(a) = 1 & deg(d) = 2
1+ 2 < 4  So, Hamiltonian circuit does not exists.
#2. MATCHING THEORY
• A matching graph is a subgraph of a graph where there are no edges adjacent
to each other.
• Simply, there should not be any common vertex between any two edges
• A vertex is said to be a matched if it is incident to an edge otherwise
unmatched.
• The vertices should have a degree of 1 or 0
• Notation  M(G)
• In a matching, deg(V) = 1, then (V) is said to be matched
deg(V) = 0, then (V) is said to be unmatched
MAXIMAL MATCHING
• A maximal matching is a matching M of a graph G with the property that if any
edge not in M is added to M, it is no longer a matching
• A matching M of a graph G is maximal if every edge in G has a non-empty
intersection with at least one edge in M.
• It is also known as maximum cardinality matching.
• It is a matching that contains the largest possible number of edges.
• The number of edges in the maximum matching of ‘G’ is called its matching
number.
MAXIMUM MATCHING
PERFECT MATCHING
• A matching (M) of graph (G) is said to be a perfect match, if every vertex of graph
g (G) is incident to exactly one edge of the matching
(M), i.e., deg(V) = 1 ∀V
• Every perfect matching of graph is also a maximum matching of graph, because
there is no chance of adding one more edge in a perfect matching graph.
#3. SHORTEST PATH PROBLEM
Weighted Graph(Labelled Graph):
A weighted graph is a graph G, in which each edge e, is assigned a non-
negative real number. The number is the weight of the e.
The length of a path in a weighted graph is the sum of the weights of the
edges of this path
The shortest path is the minimum length of the path.
#3.DIJKSTRA’S ALGORITHM (/DEIK-STRAS/)
• Formulated by Edsgar W. Dijkstra
• Dijkstra’s algorithm can be used to determine the shortest path from
one node in a graph to every other node within the same graph data
structure, provided that the nodes are reachable from the starting node.
• This algorithm will continue to run until all of the reachable vertices in a
graph have been visited.
• Application: Google Maps, Satellite Navigation, Finding Shortest Path
etc.
#3.DIJKSTRA’S ALGORITHM (/DEIK-STRAS/)
Steps:
a) Assign every node a tentative distance
b) Set initial node as current and mark all nodes as
unvisited.
c) For current node, consider all unvisited nodes and
calculate distance
d) Compare current and calculated distance and assign
the smaller value.
e) When all neighbors are considered, mark them
f) If the destination node is marked, Stop
Qn: Find the shortest path between a and z
THANK YOU!!!

More Related Content

What's hot

Trend and Seasonal Components
Trend and Seasonal ComponentsTrend and Seasonal Components
Trend and Seasonal Components
AnnaRevin
 
Mapanuring Pagbasa sa Akademya: Pagbuo ng Tala-Basa o Reader-Response Journal
Mapanuring Pagbasa  sa Akademya:  Pagbuo ng Tala-Basa o Reader-Response JournalMapanuring Pagbasa  sa Akademya:  Pagbuo ng Tala-Basa o Reader-Response Journal
Mapanuring Pagbasa sa Akademya: Pagbuo ng Tala-Basa o Reader-Response Journal
KokoStevan
 
Real numbers ppt
Real numbers pptReal numbers ppt
Real numbers ppt
geet bajaj
 
The paragraph as structure
The paragraph as structureThe paragraph as structure
The paragraph as structure
Tyra Ayn Locara
 
Mensuration for class 9 cbse
Mensuration for class 9 cbseMensuration for class 9 cbse
Mensuration for class 9 cbse
Ayush Vaths
 
Slideshow: Cubital Fossa
Slideshow: Cubital FossaSlideshow: Cubital Fossa
Slideshow: Cubital Fossa
The Funky Professor
 
Measuring angles
Measuring anglesMeasuring angles
Measuring anglesMark Santos
 

What's hot (7)

Trend and Seasonal Components
Trend and Seasonal ComponentsTrend and Seasonal Components
Trend and Seasonal Components
 
Mapanuring Pagbasa sa Akademya: Pagbuo ng Tala-Basa o Reader-Response Journal
Mapanuring Pagbasa  sa Akademya:  Pagbuo ng Tala-Basa o Reader-Response JournalMapanuring Pagbasa  sa Akademya:  Pagbuo ng Tala-Basa o Reader-Response Journal
Mapanuring Pagbasa sa Akademya: Pagbuo ng Tala-Basa o Reader-Response Journal
 
Real numbers ppt
Real numbers pptReal numbers ppt
Real numbers ppt
 
The paragraph as structure
The paragraph as structureThe paragraph as structure
The paragraph as structure
 
Mensuration for class 9 cbse
Mensuration for class 9 cbseMensuration for class 9 cbse
Mensuration for class 9 cbse
 
Slideshow: Cubital Fossa
Slideshow: Cubital FossaSlideshow: Cubital Fossa
Slideshow: Cubital Fossa
 
Measuring angles
Measuring anglesMeasuring angles
Measuring angles
 

Similar to Hamilton Path & Dijkstra's Algorithm

Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Mohanlal Sukhadia University (MLSU)
 
Graph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptxGraph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptx
asimshahzad8611
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithmUnit26 shortest pathalgorithm
Unit26 shortest pathalgorithmmeisamstar
 
Unit ix graph
Unit   ix    graph Unit   ix    graph
Unit ix graph
Tribhuvan University
 
Unit 9 graph
Unit   9 graphUnit   9 graph
Unit 9 graph
Dabbal Singh Mahara
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
Rashmi Bhat
 
Trees amd properties slide for presentaton
Trees amd properties slide for presentatonTrees amd properties slide for presentaton
Trees amd properties slide for presentaton
SHARANSASI1
 
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
zefergaming
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
pournima055
 
Connected and disconnected graph
Connected and disconnected graphConnected and disconnected graph
Connected and disconnected graph
ABDULLAHSHAUKAT4
 
Dijkstra.ppt
Dijkstra.pptDijkstra.ppt
Dijkstra.ppt
Ruchika Sinha
 
dijkstra algo.ppt
dijkstra algo.pptdijkstra algo.ppt
dijkstra algo.ppt
Santhosh Krishna
 
Chapter 1
Chapter   1Chapter   1
Chapter 1
MeeraMeghpara
 
FCS (graphs).pptx
FCS (graphs).pptxFCS (graphs).pptx
FCS (graphs).pptx
ShubhamBatwani
 
141205 graphulo ingraphblas
141205 graphulo ingraphblas141205 graphulo ingraphblas
141205 graphulo ingraphblas
graphulo
 
141222 graphulo ingraphblas
141222 graphulo ingraphblas141222 graphulo ingraphblas
141222 graphulo ingraphblas
MIT
 
Graph theory
Graph theoryGraph theory
Graph theory
Gaurav Yadav
 
DATA STRUCTURES.pptx
DATA STRUCTURES.pptxDATA STRUCTURES.pptx
DATA STRUCTURES.pptx
KENNEDY GITHAIGA
 

Similar to Hamilton Path & Dijkstra's Algorithm (20)

Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
 
Graph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptxGraph terminology and algorithm and tree.pptx
Graph terminology and algorithm and tree.pptx
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithmUnit26 shortest pathalgorithm
Unit26 shortest pathalgorithm
 
Unit ix graph
Unit   ix    graph Unit   ix    graph
Unit ix graph
 
Unit 9 graph
Unit   9 graphUnit   9 graph
Unit 9 graph
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Trees amd properties slide for presentaton
Trees amd properties slide for presentatonTrees amd properties slide for presentaton
Trees amd properties slide for presentaton
 
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
 
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjteUnit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
Unit II_Graph.pptxkgjrekjgiojtoiejhgnltegjte
 
Connected and disconnected graph
Connected and disconnected graphConnected and disconnected graph
Connected and disconnected graph
 
Dijkstra.ppt
Dijkstra.pptDijkstra.ppt
Dijkstra.ppt
 
dijkstra algo.ppt
dijkstra algo.pptdijkstra algo.ppt
dijkstra algo.ppt
 
Chapter 1
Chapter   1Chapter   1
Chapter 1
 
FCS (graphs).pptx
FCS (graphs).pptxFCS (graphs).pptx
FCS (graphs).pptx
 
Network Theory
Network TheoryNetwork Theory
Network Theory
 
141205 graphulo ingraphblas
141205 graphulo ingraphblas141205 graphulo ingraphblas
141205 graphulo ingraphblas
 
141222 graphulo ingraphblas
141222 graphulo ingraphblas141222 graphulo ingraphblas
141222 graphulo ingraphblas
 
Graph theory
Graph theoryGraph theory
Graph theory
 
DATA STRUCTURES.pptx
DATA STRUCTURES.pptxDATA STRUCTURES.pptx
DATA STRUCTURES.pptx
 
logic.pptx
logic.pptxlogic.pptx
logic.pptx
 

Recently uploaded

Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 

Recently uploaded (20)

Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 

Hamilton Path & Dijkstra's Algorithm

  • 2. TOPICS Hamiltonian Path and Circuit Matching Theory Shortest Path Problem ( Dijkstra’s Algorithm)
  • 3. #1. HAMILTONIAN PATH & CIRCUIT • Let the graph be G = (V,E); where |V|>=3 (vertices/nodes) and E denote the Edges(connector of endpoints) • A simple path in such graph G that passes through every vertex exactly once is called Hamiltonian path. Every edge mayn't be used here. • A circuit is that path where starting and endpoints are same. • For example: A B A B D C D C Path -> A –B –C –D Circuit -> A-B-C-D-A
  • 4. More Examples: A B C A B C D D E E F G H Hamilton Path Exists Hamilton Path Does not Exists a b c d
  • 5. #THEOROM: Let G be a graph of n>=3 vertices, then G has a Hamiltonian path if for only two non adjacent vertices u and v of G satisfy the following condition deg (u) + deg (v) >= n For example: a b c d Here, total vertices (n) = 4 Take vertex a and d deg(a) = 1 & deg(d) = 2 1+ 2 < 4  So, Hamiltonian circuit does not exists.
  • 6. #2. MATCHING THEORY • A matching graph is a subgraph of a graph where there are no edges adjacent to each other. • Simply, there should not be any common vertex between any two edges • A vertex is said to be a matched if it is incident to an edge otherwise unmatched. • The vertices should have a degree of 1 or 0 • Notation  M(G) • In a matching, deg(V) = 1, then (V) is said to be matched deg(V) = 0, then (V) is said to be unmatched
  • 7. MAXIMAL MATCHING • A maximal matching is a matching M of a graph G with the property that if any edge not in M is added to M, it is no longer a matching • A matching M of a graph G is maximal if every edge in G has a non-empty intersection with at least one edge in M. • It is also known as maximum cardinality matching. • It is a matching that contains the largest possible number of edges. • The number of edges in the maximum matching of ‘G’ is called its matching number. MAXIMUM MATCHING
  • 8. PERFECT MATCHING • A matching (M) of graph (G) is said to be a perfect match, if every vertex of graph g (G) is incident to exactly one edge of the matching (M), i.e., deg(V) = 1 ∀V • Every perfect matching of graph is also a maximum matching of graph, because there is no chance of adding one more edge in a perfect matching graph.
  • 9.
  • 10. #3. SHORTEST PATH PROBLEM Weighted Graph(Labelled Graph): A weighted graph is a graph G, in which each edge e, is assigned a non- negative real number. The number is the weight of the e. The length of a path in a weighted graph is the sum of the weights of the edges of this path The shortest path is the minimum length of the path.
  • 11.
  • 12. #3.DIJKSTRA’S ALGORITHM (/DEIK-STRAS/) • Formulated by Edsgar W. Dijkstra • Dijkstra’s algorithm can be used to determine the shortest path from one node in a graph to every other node within the same graph data structure, provided that the nodes are reachable from the starting node. • This algorithm will continue to run until all of the reachable vertices in a graph have been visited. • Application: Google Maps, Satellite Navigation, Finding Shortest Path etc.
  • 13. #3.DIJKSTRA’S ALGORITHM (/DEIK-STRAS/) Steps: a) Assign every node a tentative distance b) Set initial node as current and mark all nodes as unvisited. c) For current node, consider all unvisited nodes and calculate distance d) Compare current and calculated distance and assign the smaller value. e) When all neighbors are considered, mark them f) If the destination node is marked, Stop
  • 14.
  • 15. Qn: Find the shortest path between a and z