SlideShare a Scribd company logo
1 of 18
Click to edit Master title style
1
Design & Analysis of
Algorithm
Click to edit Master title style
2
Bellman Ford’s Algorithm
S u b m i t t e d B y :
 H a s n a i n K h a l i d .
 M u s t a n s a r G u l .
2
Click to edit Master title style
3
Table of contents
• Introduction
• Comparison
• Working Mechanism
• Example Problem
• Algorithm
• Pseudocode
• Algorithm Complexity
• Applications
• Conclusion
3
Click to edit Master title style
4
Introduction
4
What is Bellman Ford’s Algorithm?
• Bellman Ford is an algorithm that is used to find the shortest path from a vertex to
all other vertices of a weighted graph.
• It is similar to Dijkstra's algorithm but it can work with graphs in which edges can
have negative weights.
• If it has not converged after V(G) -1 iterations, then there cannot be a shortest path
tree.
• So, there must be a negative weight cycle
Click to edit Master title style
5
Dijkstras Vs Bellman Ford
5
• Dijkstra doesn’t work for Graphs with negative weight edges.
• Bellman-Ford works for such graphs.
• Both Algorithms are quite similar but the time complexity of bellman ford algorithm is more
than Dijkstra.
Click to edit Master title style
6
Working Mechanism
6
• It works by overestimating the length of the path from the starting vertex to all other
vertices.
• Then it iteratively relaxes those estimates by finding new paths that are shorter than the
previously overestimated paths.
• By doing this repeatedly for all vertices, we can guarantee that the result is optimized.
Click to edit Master title style
7
Example Problem
7
• Step No. 1: Starting with the weighted graph.
Click to edit Master title style
8
Cont..
8
• Step No. 02: Choose a starting vertex and assign infinity path values to all other
vertices.
Click to edit Master title style
9
Cont..
9
• Step No. 03: Visit each edge and relax path distances if they are inaccurate.
Click to edit Master title style
10
Cont..
10
• Step No. 04: We need to do this V times because in the worst case, a vertex’s path length
might need to be readjusted V times.
Click to edit Master title style
11
Cont..
11
• Step No. 05: Notice how the vertex at the top right corner had its path length
adjusted.
Click to edit Master title style
12
Cont..
12
• Step No. 06: After all the vertices have their path lengths, we check if a negative cycle is
present.
Click to edit Master title style
13
Algorithm
13
• For Bellman Ford’s Algorithm, We need to maintain the path distance of every
vertex.
• We can store that in an array of size v, where v is the number of vertices.
• We also want to be able to get the shortest path, not only know the length of the
shortest path
• For this, we map each vertex to the vertex that last updated its path length.
• Once the algorithm is over, we can backtrack from the destination vertex to the
source vertex to find the path.
Click to edit Master title style
14
Pseudocode
14
function bellmanFord(G, S)
for each vertex V in G
distance[V] <- infinite
previous[V] <- NULL
distance[S] <- 0
for each vertex V in G
for each edge (U,V) in G
tempDistance <- distance[U] +
edge_weight(U, V)
if tempDistance < distance[V]
distance[V] <- tempDistance
previous[V] <- U
for each edge (U,V) in G
If distance[U] + edge_weight(U, V) <
distance[V}
Error: Negative Cycle Exists
return distance[ ], previous[ ]
Click to edit Master title style
15
Bellman Ford's Complexity
15
Time Complexity Space Complexity
• Best Case Complexity is O(E)
• Average Case Complexity is O(VE)
• Worst Case Complexity is O(VE)
• And, the space complexity is O(V).
Click to edit Master title style
16
Applications
16
• A version of Bellman-Ford is used in the distance-vector routing protocol. This protocol
decides how to route packets of data on a network.
• And for finding the shortest path.
Click to edit Master title style
17
Conclusion
17
• After analyzing the both algorithm we have concluded that the main advantage of the Bellman-
Ford algorithm is its capability to handle negative weights. However, it has a considerably larger
complexity than Dijkstra's algorithm.
Click to edit Master title style
18
Thank You !

More Related Content

Similar to Hasnain_Khalid_DAA_ppt.pptx

Single sourceshortestpath by emad
Single sourceshortestpath by emadSingle sourceshortestpath by emad
Single sourceshortestpath by emadKazi Emad
 
An overview of gradient descent optimization algorithms.pdf
An overview of gradient descent optimization algorithms.pdfAn overview of gradient descent optimization algorithms.pdf
An overview of gradient descent optimization algorithms.pdfvudinhphuong96
 
Undecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation AlgorithmsUndecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation AlgorithmsMuthu Vinayagam
 
Geometric design of highway
Geometric design of highwayGeometric design of highway
Geometric design of highwayBhavya Jaiswal
 
Introduction to Nastran SOL 200 Size Optimization
Introduction to Nastran SOL 200 Size OptimizationIntroduction to Nastran SOL 200 Size Optimization
Introduction to Nastran SOL 200 Size OptimizationChristian Aparicio
 
Automated Laser Reflection Report
Automated Laser Reflection ReportAutomated Laser Reflection Report
Automated Laser Reflection ReportNan Li
 
shortestpathalgorithm-180109112405 (1).pdf
shortestpathalgorithm-180109112405 (1).pdfshortestpathalgorithm-180109112405 (1).pdf
shortestpathalgorithm-180109112405 (1).pdfzefergaming
 
OpenCV presentation series- part 5
OpenCV presentation series- part 5OpenCV presentation series- part 5
OpenCV presentation series- part 5Sairam Adithya
 
nalyzing culverts from a hydraulics perspective can be daunting.docx
nalyzing culverts from a hydraulics perspective can be daunting.docxnalyzing culverts from a hydraulics perspective can be daunting.docx
nalyzing culverts from a hydraulics perspective can be daunting.docxShahzadAliDurraniSch
 
Discrete Computaional Geometry
Discrete Computaional GeometryDiscrete Computaional Geometry
Discrete Computaional GeometrySaurav Mistry
 
An overview of gradient descent optimization algorithms
An overview of gradient descent optimization algorithms An overview of gradient descent optimization algorithms
An overview of gradient descent optimization algorithms Hakky St
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERmuthukrishnavinayaga
 
Shortest path algorithm
Shortest path algorithmShortest path algorithm
Shortest path algorithmsana younas
 
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...Khoa Mac Tu
 

Similar to Hasnain_Khalid_DAA_ppt.pptx (20)

8783733
87837338783733
8783733
 
Shortest path
Shortest pathShortest path
Shortest path
 
Single sourceshortestpath by emad
Single sourceshortestpath by emadSingle sourceshortestpath by emad
Single sourceshortestpath by emad
 
Lec 6 bsc csit
Lec 6 bsc csitLec 6 bsc csit
Lec 6 bsc csit
 
An overview of gradient descent optimization algorithms.pdf
An overview of gradient descent optimization algorithms.pdfAn overview of gradient descent optimization algorithms.pdf
An overview of gradient descent optimization algorithms.pdf
 
Undecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation AlgorithmsUndecidable Problems and Approximation Algorithms
Undecidable Problems and Approximation Algorithms
 
DAA_Presentation - Copy.pptx
DAA_Presentation - Copy.pptxDAA_Presentation - Copy.pptx
DAA_Presentation - Copy.pptx
 
Geometric design of highway
Geometric design of highwayGeometric design of highway
Geometric design of highway
 
Introduction to Nastran SOL 200 Size Optimization
Introduction to Nastran SOL 200 Size OptimizationIntroduction to Nastran SOL 200 Size Optimization
Introduction to Nastran SOL 200 Size Optimization
 
Automated Laser Reflection Report
Automated Laser Reflection ReportAutomated Laser Reflection Report
Automated Laser Reflection Report
 
shortestpathalgorithm-180109112405 (1).pdf
shortestpathalgorithm-180109112405 (1).pdfshortestpathalgorithm-180109112405 (1).pdf
shortestpathalgorithm-180109112405 (1).pdf
 
OpenCV presentation series- part 5
OpenCV presentation series- part 5OpenCV presentation series- part 5
OpenCV presentation series- part 5
 
Ppt 1
Ppt 1Ppt 1
Ppt 1
 
Topological Sort
Topological SortTopological Sort
Topological Sort
 
nalyzing culverts from a hydraulics perspective can be daunting.docx
nalyzing culverts from a hydraulics perspective can be daunting.docxnalyzing culverts from a hydraulics perspective can be daunting.docx
nalyzing culverts from a hydraulics perspective can be daunting.docx
 
Discrete Computaional Geometry
Discrete Computaional GeometryDiscrete Computaional Geometry
Discrete Computaional Geometry
 
An overview of gradient descent optimization algorithms
An overview of gradient descent optimization algorithms An overview of gradient descent optimization algorithms
An overview of gradient descent optimization algorithms
 
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWERUndecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
Undecidable Problems - COPING WITH THE LIMITATIONS OF ALGORITHM POWER
 
Shortest path algorithm
Shortest path algorithmShortest path algorithm
Shortest path algorithm
 
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
A study on_contrast_and_comparison_between_bellman-ford_algorithm_and_dijkstr...
 

Recently uploaded

GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jNeo4j
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024SimonedeGijt
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringPrakhyath Rai
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Andreas Granig
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckMarc Lester
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConNatan Silnitsky
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMarkus Moeller
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationElement34
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfSrushith Repakula
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024MulesoftMunichMeetup
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfkalichargn70th171
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfWSO2
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfICS
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksJinanKordab
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxNeo4j
 

Recently uploaded (20)

GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Jax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined DeckJax, FL Admin Community Group 05.14.2024 Combined Deck
Jax, FL Admin Community Group 05.14.2024 Combined Deck
 
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
Abortion Pill Prices Mthatha (@](+27832195400*)[ 🏥 Women's Abortion Clinic In...
 
Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
A Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdfA Deep Dive into Secure Product Development Frameworks.pdf
A Deep Dive into Secure Product Development Frameworks.pdf
 
Transformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with LinksTransformer Neural Network Use Cases with Links
Transformer Neural Network Use Cases with Links
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 

Hasnain_Khalid_DAA_ppt.pptx

  • 1. Click to edit Master title style 1 Design & Analysis of Algorithm
  • 2. Click to edit Master title style 2 Bellman Ford’s Algorithm S u b m i t t e d B y :  H a s n a i n K h a l i d .  M u s t a n s a r G u l . 2
  • 3. Click to edit Master title style 3 Table of contents • Introduction • Comparison • Working Mechanism • Example Problem • Algorithm • Pseudocode • Algorithm Complexity • Applications • Conclusion 3
  • 4. Click to edit Master title style 4 Introduction 4 What is Bellman Ford’s Algorithm? • Bellman Ford is an algorithm that is used to find the shortest path from a vertex to all other vertices of a weighted graph. • It is similar to Dijkstra's algorithm but it can work with graphs in which edges can have negative weights. • If it has not converged after V(G) -1 iterations, then there cannot be a shortest path tree. • So, there must be a negative weight cycle
  • 5. Click to edit Master title style 5 Dijkstras Vs Bellman Ford 5 • Dijkstra doesn’t work for Graphs with negative weight edges. • Bellman-Ford works for such graphs. • Both Algorithms are quite similar but the time complexity of bellman ford algorithm is more than Dijkstra.
  • 6. Click to edit Master title style 6 Working Mechanism 6 • It works by overestimating the length of the path from the starting vertex to all other vertices. • Then it iteratively relaxes those estimates by finding new paths that are shorter than the previously overestimated paths. • By doing this repeatedly for all vertices, we can guarantee that the result is optimized.
  • 7. Click to edit Master title style 7 Example Problem 7 • Step No. 1: Starting with the weighted graph.
  • 8. Click to edit Master title style 8 Cont.. 8 • Step No. 02: Choose a starting vertex and assign infinity path values to all other vertices.
  • 9. Click to edit Master title style 9 Cont.. 9 • Step No. 03: Visit each edge and relax path distances if they are inaccurate.
  • 10. Click to edit Master title style 10 Cont.. 10 • Step No. 04: We need to do this V times because in the worst case, a vertex’s path length might need to be readjusted V times.
  • 11. Click to edit Master title style 11 Cont.. 11 • Step No. 05: Notice how the vertex at the top right corner had its path length adjusted.
  • 12. Click to edit Master title style 12 Cont.. 12 • Step No. 06: After all the vertices have their path lengths, we check if a negative cycle is present.
  • 13. Click to edit Master title style 13 Algorithm 13 • For Bellman Ford’s Algorithm, We need to maintain the path distance of every vertex. • We can store that in an array of size v, where v is the number of vertices. • We also want to be able to get the shortest path, not only know the length of the shortest path • For this, we map each vertex to the vertex that last updated its path length. • Once the algorithm is over, we can backtrack from the destination vertex to the source vertex to find the path.
  • 14. Click to edit Master title style 14 Pseudocode 14 function bellmanFord(G, S) for each vertex V in G distance[V] <- infinite previous[V] <- NULL distance[S] <- 0 for each vertex V in G for each edge (U,V) in G tempDistance <- distance[U] + edge_weight(U, V) if tempDistance < distance[V] distance[V] <- tempDistance previous[V] <- U for each edge (U,V) in G If distance[U] + edge_weight(U, V) < distance[V} Error: Negative Cycle Exists return distance[ ], previous[ ]
  • 15. Click to edit Master title style 15 Bellman Ford's Complexity 15 Time Complexity Space Complexity • Best Case Complexity is O(E) • Average Case Complexity is O(VE) • Worst Case Complexity is O(VE) • And, the space complexity is O(V).
  • 16. Click to edit Master title style 16 Applications 16 • A version of Bellman-Ford is used in the distance-vector routing protocol. This protocol decides how to route packets of data on a network. • And for finding the shortest path.
  • 17. Click to edit Master title style 17 Conclusion 17 • After analyzing the both algorithm we have concluded that the main advantage of the Bellman- Ford algorithm is its capability to handle negative weights. However, it has a considerably larger complexity than Dijkstra's algorithm.
  • 18. Click to edit Master title style 18 Thank You !