SlideShare a Scribd company logo
1 of 29
Presentation
On
Graph
PRESENTED BY
TEAM ALPHA
Team Members
Kazi Emad
ID no. 191902025
01
Forhad Ahmed
ID no. 191902002
02
• Dijkstra’s Algorithm
• BFS Method
• DFS Method
• Bellman Ford Algorithm
Dijkstra’s Algorithm
Given a graph and a source vertex in the graph, find shortest paths
from source to all vertices in the given graph.
Dijkstra’s Algorithm
BFS Method
BFS follows the Queue structure.
BFS Method
Let’s solve this problem
through engaging audience
Bellman-Ford algorithm
Bellman-Ford algorithm
Initialize all the
distances
Bellman-Ford algorithm
iterate over all
edges/vertices
and apply update
rule
Bellman-Ford algorithm
Bellman-Ford algorithm
check for negative
cycles
Negative cycles
A
B
C E
D1
1
-10
5
10
3
What is the shortest path
from a to e?
Bellman-Ford algorithm
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
How many edges is
the shortest path
from s to:
A:
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
How many edges is
the shortest path
from s to:
A: 3
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
How many edges is
the shortest path
from s to:
A: 3
B:
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
How many edges is
the shortest path
from s to:
A: 3
B: 5
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
How many edges is
the shortest path
from s to:
A: 3
B: 5
D:
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
How many edges is
the shortest path
from s to:
A: 3
B: 5
D: 7
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
0 





Iteration: 0
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
0 10




8
Iteration: 1
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
0 10


12
9
8
Iteration: 2
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
0 5
10

8
9
8
Iteration: 3
A has the correct
distance and path
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
0 5
6
11
7
9
8
Iteration: 4
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
0 5
5
7
147
9
8
Iteration: 5
B has the correct
distance and path
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
0 5
5
6
107
9
8
Iteration: 6
Bellman-Ford algorithm
G
S
F
E
A
D
B
C
10
8
1
-1
-1
3
1
1
2
-2
-4
0 5
5
6
97
9
8
Iteration: 7
D (and all other
nodes) have the
correct distance
and path
Any Question?
Thank You

More Related Content

What's hot

Presentation for Gantry crane
Presentation for Gantry cranePresentation for Gantry crane
Presentation for Gantry crane
Julia Collins
 

What's hot (14)

Alpha beta pruning
Alpha beta pruningAlpha beta pruning
Alpha beta pruning
 
Progettazione e valutazione sperimentale di un sistema per la definizione ed ...
Progettazione e valutazione sperimentale di un sistema per la definizione ed ...Progettazione e valutazione sperimentale di un sistema per la definizione ed ...
Progettazione e valutazione sperimentale di un sistema per la definizione ed ...
 
P1341cle
P1341cleP1341cle
P1341cle
 
Bellman Ford Routing Algorithm-Computer Networks
Bellman Ford Routing Algorithm-Computer NetworksBellman Ford Routing Algorithm-Computer Networks
Bellman Ford Routing Algorithm-Computer Networks
 
Plugin identities
Plugin identitiesPlugin identities
Plugin identities
 
Figures
FiguresFigures
Figures
 
2.4 mst kruskal’s
2.4 mst  kruskal’s 2.4 mst  kruskal’s
2.4 mst kruskal’s
 
Midterm 2016
Midterm  2016Midterm  2016
Midterm 2016
 
Network flow problems
Network flow problemsNetwork flow problems
Network flow problems
 
Sol71
Sol71Sol71
Sol71
 
Presentation for Gantry crane
Presentation for Gantry cranePresentation for Gantry crane
Presentation for Gantry crane
 
Control and Guidance law for Guided Bomb
Control and Guidance law for Guided BombControl and Guidance law for Guided Bomb
Control and Guidance law for Guided Bomb
 
80 questc3b5es-gabarito
80 questc3b5es-gabarito80 questc3b5es-gabarito
80 questc3b5es-gabarito
 
MS Speedy
MS SpeedyMS Speedy
MS Speedy
 

More from Kazi Emad

More from Kazi Emad (8)

Comparative Analysis of Windows and Linux System
Comparative Analysis of Windows and Linux SystemComparative Analysis of Windows and Linux System
Comparative Analysis of Windows and Linux System
 
Student result management system
Student result management systemStudent result management system
Student result management system
 
Cache memory by emad
Cache memory by emadCache memory by emad
Cache memory by emad
 
Single sourceshortestpath by emad
Single sourceshortestpath by emadSingle sourceshortestpath by emad
Single sourceshortestpath by emad
 
Kazi emad on nenotech
Kazi emad on nenotechKazi emad on nenotech
Kazi emad on nenotech
 
Technologies Used in ICC CWC-2019
Technologies Used in ICC CWC-2019Technologies Used in ICC CWC-2019
Technologies Used in ICC CWC-2019
 
Kazi emad on ai
Kazi emad on aiKazi emad on ai
Kazi emad on ai
 
Entropy.ppt
Entropy.pptEntropy.ppt
Entropy.ppt
 

Recently uploaded

AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
ankushspencer015
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Dr.Costas Sachpazis
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
rknatarajan
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 

Recently uploaded (20)

Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptxBSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
BSides Seattle 2024 - Stopping Ethan Hunt From Taking Your Data.pptx
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 

Dijkstra Algo, BFS, Bellman–Ford Algo, DFS