SlideShare a Scribd company logo
6
Most read
7
Most read
11
Most read
Shortest Path Problem
• Given: network topology with link costs
– c(x , y): link cost from node x to node y
– Infinity if x and y are not direct neighbors
• Compute: least-cost paths to all nodes
– From a given source u to all other nodes.
3
2
1
1
4
1
4
5
3
2
A
B
C
D
E
F
G
H
Subrata paul
Roll No :- 13015411.
Department Of Computer Science & Engineering ,
University Of Rajshahi.
What Is Routing ??
•A famous quotation from RFC 791
“A name indicates what we seek.
An address indicates where it is.
A route indicates how we get there.”
-- Jon Postel
• Routing is the process of selecting best paths.
Goals Of Routing Algorithm
• We want any several properties of any routing
schema.
Property Meaning
Correctness Finds paths that work
Efficient Paths Use network bandwidth well
Fair Paths Doesn’t starve any nodes
Fast Convergence Recovers quickly after changes
Salability Works well as network grows large
What Are The Best Paths ??
• Many Possibilities :-
- Latency, avoid circuitous paths.
- Bandwidth, avoid slow links .
- Money, avoid expensive links .
- Hops, reduce switching .
A
B
C
D
E
F
G
Shortest Paths (1)
• Find the shortest path from A E.
• All links are bidirectional , with equal cost in
both direction.
Shortest Path(2)
• ABCE is a shortest path
• Dist(ABCE) = 4 + 2 + 1 = 7
• This is less than :
- Dist(ABE) = 8
- Dist(ABFE) = 9
- Dist(AE) = 10
- Dist(ABCDE) = 10
How To Compute ??
• Using Dijkstra’s Algorithm :-
- Given a network topology . We are about to
compute shortest path from a source to all
other nodes of the network.
Dijkstra’s Algorithm
• Algorithm :-
- Mark all nodes tentative , set distances from source to 0(Zero)
for source and ∞(infinity) for all other nodes
- While tentative nodes remain :
a ) Extract N , a node with lowest distance
b) Add link to N to the shortest path tree
C) Relax the distances of neighbors of N by lowering any
better distance estimates
Dijkstra’s Algorithm
A B C D E F G H
0 ∞ ∞ ∞ ∞ ∞ ∞ ∞
Dijkstra’s Algorithm
A B C D E F G H
0 4 ∞ ∞ 10 ∞ ∞ ∞
Dijkstra’s Algorithm
A B C D E F G H
0 4 6 ∞ 8 7 7 ∞
Dijkstra’s Algorithm
A B C D E F G H
0 4 6 8 7 7 7 9
Dijkstra’s Algorithm
A B C D E F G H
0 ∞ ∞ ∞ ∞ ∞ ∞ ∞
A B C D E F G H
0 4 6 8 7 7 7 9
Dijkstra’s Algorithm
A B C D E F G H
0 ∞ ∞ ∞ ∞ ∞ ∞ ∞
A B C D E F G H
0 4 6 8 7 7 7 9
Dijkstra’s Algorithm
A B C D E F G H
0 ∞ ∞ ∞ ∞ ∞ ∞ ∞
A B C D E F G H
0 4 6 8 7 7 7 9
Dijkstra’s Algorithm
A B C D E F G H
0 ∞ ∞ ∞ ∞ ∞ ∞ ∞
A B C D E F G H
0 4 6 8 7 7 7 9
Dijkstra’s Algorithm
A B C D E F G H
0 ∞ ∞ ∞ ∞ ∞ ∞ ∞
A B C D E F G H
0 4 6 8 7 7 7 9
All nodes aredonenow.
Dijkstra’s Algorithm
• So , the shortest path from source node A to all
other nodes are –
A – B = 4
A – C = 6
A – D = 8
A – E = 7
A – F = 7
A – G = 7
A – H = 9
Conclusion
• Routing is a distributed algorithm
– React to changes in the topology
– Compute the shortest paths
• Two main shortest-path algorithms
– Dijkstra
– Bellman-Ford
• Convergence process
– Changing from one topology to another
– Transient periods of inconsistency across routers
Ad

Recommended

Shortest path algorithm
Shortest path algorithm
sana younas
 
Registers and-common-bus
Registers and-common-bus
Anuj Modi
 
Data structure - Graph
Data structure - Graph
Madhu Bala
 
PPT Class 7th Science Chapter- 17 Forests - Our Lifeline
PPT Class 7th Science Chapter- 17 Forests - Our Lifeline
Swayam Khobragade
 
Dijkstra & flooding ppt(Routing algorithm)
Dijkstra & flooding ppt(Routing algorithm)
Anshul gour
 
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Forouzan-ch19-Network-Layer-Logical-Addressing.ppt
Jayaprasanna4
 
recurrence relations
recurrence relations
Anurag Cheela
 
Data Structure (Tree)
Data Structure (Tree)
Adam Mukharil Bachtiar
 
Distance vector routing
Distance vector routing
Siddique Ibrahim
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
Vimal Dewangan
 
Kruskal’s algorithm
Kruskal’s algorithm
Abdul Moiz Lakhani
 
Dijkstra’S Algorithm
Dijkstra’S Algorithm
ami_01
 
Routing algorithms
Routing algorithms
Parameswaran Selvakumar
 
Network layer - design Issues
Network layer - design Issues
قصي نسور
 
Routing algorithm
Routing algorithm
Bushra M
 
switching techniques in data communication and networking
switching techniques in data communication and networking
Harshita Yadav
 
First order logic
First order logic
Rushdi Shams
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentation
Subid Biswas
 
Selective repeat protocol
Selective repeat protocol
Manusha Dilan
 
Dijkstra's Algorithm
Dijkstra's Algorithm
Rashik Ishrak Nahian
 
Network Layer,Computer Networks
Network Layer,Computer Networks
guesta81d4b
 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platforms
Syed Zaid Irshad
 
Distance Vector Routing
Distance Vector Routing
ShouvikDhali
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Dr. SELVAGANESAN S
 
ELEMENTS OF TRANSPORT PROTOCOL
ELEMENTS OF TRANSPORT PROTOCOL
Shashank Rustagi
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and Examples
Fahim Ferdous
 
Approximation Algorithms
Approximation Algorithms
Nicolas Bettenburg
 
Shortest Path in Graph
Shortest Path in Graph
Dr Sandeep Kumar Poonia
 
Shortest path problem
Shortest path problem
Ifra Ilyas
 
Conservation of codon optimality
Conservation of codon optimality
Alistair Martin
 

More Related Content

What's hot (20)

Distance vector routing
Distance vector routing
Siddique Ibrahim
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
Vimal Dewangan
 
Kruskal’s algorithm
Kruskal’s algorithm
Abdul Moiz Lakhani
 
Dijkstra’S Algorithm
Dijkstra’S Algorithm
ami_01
 
Routing algorithms
Routing algorithms
Parameswaran Selvakumar
 
Network layer - design Issues
Network layer - design Issues
قصي نسور
 
Routing algorithm
Routing algorithm
Bushra M
 
switching techniques in data communication and networking
switching techniques in data communication and networking
Harshita Yadav
 
First order logic
First order logic
Rushdi Shams
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentation
Subid Biswas
 
Selective repeat protocol
Selective repeat protocol
Manusha Dilan
 
Dijkstra's Algorithm
Dijkstra's Algorithm
Rashik Ishrak Nahian
 
Network Layer,Computer Networks
Network Layer,Computer Networks
guesta81d4b
 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platforms
Syed Zaid Irshad
 
Distance Vector Routing
Distance Vector Routing
ShouvikDhali
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Dr. SELVAGANESAN S
 
ELEMENTS OF TRANSPORT PROTOCOL
ELEMENTS OF TRANSPORT PROTOCOL
Shashank Rustagi
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and Examples
Fahim Ferdous
 
Approximation Algorithms
Approximation Algorithms
Nicolas Bettenburg
 
Shortest Path in Graph
Shortest Path in Graph
Dr Sandeep Kumar Poonia
 
Leaky Bucket & Tocken Bucket - Traffic shaping
Leaky Bucket & Tocken Bucket - Traffic shaping
Vimal Dewangan
 
Dijkstra’S Algorithm
Dijkstra’S Algorithm
ami_01
 
Network layer - design Issues
Network layer - design Issues
قصي نسور
 
Routing algorithm
Routing algorithm
Bushra M
 
switching techniques in data communication and networking
switching techniques in data communication and networking
Harshita Yadav
 
Dijkstra's algorithm presentation
Dijkstra's algorithm presentation
Subid Biswas
 
Selective repeat protocol
Selective repeat protocol
Manusha Dilan
 
Network Layer,Computer Networks
Network Layer,Computer Networks
guesta81d4b
 
Dichotomy of parallel computing platforms
Dichotomy of parallel computing platforms
Syed Zaid Irshad
 
Distance Vector Routing
Distance Vector Routing
ShouvikDhali
 
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Computer Networks Unit 2 UNIT II DATA-LINK LAYER & MEDIA ACCESS
Dr. SELVAGANESAN S
 
ELEMENTS OF TRANSPORT PROTOCOL
ELEMENTS OF TRANSPORT PROTOCOL
Shashank Rustagi
 
BackTracking Algorithm: Technique and Examples
BackTracking Algorithm: Technique and Examples
Fahim Ferdous
 

Viewers also liked (20)

Shortest path problem
Shortest path problem
Ifra Ilyas
 
Conservation of codon optimality
Conservation of codon optimality
Alistair Martin
 
Discrete Mathematics Presentation
Discrete Mathematics Presentation
Salman Elahi
 
Tranmission
Tranmission
spaz329
 
Shortest Path Search in Real Road Networks with pgRouting
Shortest Path Search in Real Road Networks with pgRouting
Daniel Kastl
 
Shortest path search for real road networks and dynamic costs with pgRouting
Shortest path search for real road networks and dynamic costs with pgRouting
antonpa
 
I pv6(internet protocol version 6)
I pv6(internet protocol version 6)
Subrata Kumer Paul
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithm
meisamstar
 
Genetic algorithms for shortest path routing
Genetic algorithms for shortest path routing
Bala Narayanan
 
Solving The Shortest Path Tour Problem
Solving The Shortest Path Tour Problem
Nozir Shokirov
 
Dynamic Vs Static
Dynamic Vs Static
melbournepatterns
 
Classful ip address (ip address picture book 4 from visual land animations)
Classful ip address (ip address picture book 4 from visual land animations)
vl11111
 
Internet and intranet
Internet and intranet
Subrata Kumer Paul
 
Cctv camera
Cctv camera
Subrata Kumer Paul
 
Dynamic vs static
Dynamic vs static
Nicole Ryan
 
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Mohanlal Sukhadia University (MLSU)
 
Dynamic vs static stretching
Dynamic vs static stretching
dangermansam
 
Dynamic Programming
Dynamic Programming
contact2kazi
 
Cable landing station
Cable landing station
choudhurygargi
 
NAT and Subnetting
NAT and Subnetting
Saad Tanvir
 
Shortest path problem
Shortest path problem
Ifra Ilyas
 
Conservation of codon optimality
Conservation of codon optimality
Alistair Martin
 
Discrete Mathematics Presentation
Discrete Mathematics Presentation
Salman Elahi
 
Tranmission
Tranmission
spaz329
 
Shortest Path Search in Real Road Networks with pgRouting
Shortest Path Search in Real Road Networks with pgRouting
Daniel Kastl
 
Shortest path search for real road networks and dynamic costs with pgRouting
Shortest path search for real road networks and dynamic costs with pgRouting
antonpa
 
I pv6(internet protocol version 6)
I pv6(internet protocol version 6)
Subrata Kumer Paul
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithm
meisamstar
 
Genetic algorithms for shortest path routing
Genetic algorithms for shortest path routing
Bala Narayanan
 
Solving The Shortest Path Tour Problem
Solving The Shortest Path Tour Problem
Nozir Shokirov
 
Classful ip address (ip address picture book 4 from visual land animations)
Classful ip address (ip address picture book 4 from visual land animations)
vl11111
 
Dynamic vs static
Dynamic vs static
Nicole Ryan
 
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Shortest path (Dijkistra's Algorithm) & Spanning Tree (Prim's Algorithm)
Mohanlal Sukhadia University (MLSU)
 
Dynamic vs static stretching
Dynamic vs static stretching
dangermansam
 
Dynamic Programming
Dynamic Programming
contact2kazi
 
NAT and Subnetting
NAT and Subnetting
Saad Tanvir
 
Ad

Similar to Shortest path algorithm (20)

Routing algorithm network layer
Routing algorithm network layer
sambhenilesh
 
All pairs shortest path algorithm
All pairs shortest path algorithm
Srikrishnan Suresh
 
12 routing
12 routing
Sanjay Thakare
 
Routing and IP in Advance Computer Network,Vikram Snehi
Routing and IP in Advance Computer Network,Vikram Snehi
MR. VIKRAM SNEHI
 
Lec12 on Computer Networks by Tarun Mangla.pdf
Lec12 on Computer Networks by Tarun Mangla.pdf
ShivamSawarn2
 
Lecture set 5
Lecture set 5
Gopi Saiteja
 
11-RoutingThe development of wireless systems traces its roots .ppt
11-RoutingThe development of wireless systems traces its roots .ppt
vimalgaur7
 
Computer Networking Michaelmas/Lent Term M/W/F 11:00-12:00 LT1 in Gates Buil...
Computer Networking Michaelmas/Lent Term M/W/F 11:00-12:00 LT1 in Gates Buil...
moaminmarey2001
 
11 routing
11 routing
shefali84
 
Routing Protocols notes document .pptx.pdf
Routing Protocols notes document .pptx.pdf
stefanrowlings
 
NetworkAlgorithms.ppt
NetworkAlgorithms.ppt
21121A0594
 
Network layer. pptx
Network layer. pptx
MiniT2
 
Network layer of osi model .pptx
Network layer of osi model .pptx
MiniT2
 
routing1 1X3 Router (capable of routing the data packets.ppt
routing1 1X3 Router (capable of routing the data packets.ppt
JANARTHANANS22
 
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
DKTaxation
 
Data Communications and Networks Network Layer
Data Communications and Networks Network Layer
SunilKumar481222
 
Dijkstra's Algorithm
Dijkstra's Algorithm
Tamzida_Azad
 
DIJKSTRA_123.pptx
DIJKSTRA_123.pptx
KrishnaSawant8
 
Dijkstra Shortest Path Visualization
Dijkstra Shortest Path Visualization
IRJET Journal
 
Network Layer
Network Layer
reshmadayma
 
Routing algorithm network layer
Routing algorithm network layer
sambhenilesh
 
All pairs shortest path algorithm
All pairs shortest path algorithm
Srikrishnan Suresh
 
Routing and IP in Advance Computer Network,Vikram Snehi
Routing and IP in Advance Computer Network,Vikram Snehi
MR. VIKRAM SNEHI
 
Lec12 on Computer Networks by Tarun Mangla.pdf
Lec12 on Computer Networks by Tarun Mangla.pdf
ShivamSawarn2
 
11-RoutingThe development of wireless systems traces its roots .ppt
11-RoutingThe development of wireless systems traces its roots .ppt
vimalgaur7
 
Computer Networking Michaelmas/Lent Term M/W/F 11:00-12:00 LT1 in Gates Buil...
Computer Networking Michaelmas/Lent Term M/W/F 11:00-12:00 LT1 in Gates Buil...
moaminmarey2001
 
Routing Protocols notes document .pptx.pdf
Routing Protocols notes document .pptx.pdf
stefanrowlings
 
NetworkAlgorithms.ppt
NetworkAlgorithms.ppt
21121A0594
 
Network layer. pptx
Network layer. pptx
MiniT2
 
Network layer of osi model .pptx
Network layer of osi model .pptx
MiniT2
 
routing1 1X3 Router (capable of routing the data packets.ppt
routing1 1X3 Router (capable of routing the data packets.ppt
JANARTHANANS22
 
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
01-05-2023, SOL_DU_MBAFT_6202_Dijkstra’s Algorithm Dated 1st May 23.pdf
DKTaxation
 
Data Communications and Networks Network Layer
Data Communications and Networks Network Layer
SunilKumar481222
 
Dijkstra's Algorithm
Dijkstra's Algorithm
Tamzida_Azad
 
Dijkstra Shortest Path Visualization
Dijkstra Shortest Path Visualization
IRJET Journal
 
Ad

More from Subrata Kumer Paul (20)

Chapter 9. Classification Advanced Methods.ppt
Chapter 9. Classification Advanced Methods.ppt
Subrata Kumer Paul
 
Chapter 13. Trends and Research Frontiers in Data Mining.ppt
Chapter 13. Trends and Research Frontiers in Data Mining.ppt
Subrata Kumer Paul
 
Chapter 8. Classification Basic Concepts.ppt
Chapter 8. Classification Basic Concepts.ppt
Subrata Kumer Paul
 
Chapter 2. Know Your Data.ppt
Chapter 2. Know Your Data.ppt
Subrata Kumer Paul
 
Chapter 12. Outlier Detection.ppt
Chapter 12. Outlier Detection.ppt
Subrata Kumer Paul
 
Chapter 7. Advanced Frequent Pattern Mining.ppt
Chapter 7. Advanced Frequent Pattern Mining.ppt
Subrata Kumer Paul
 
Chapter 11. Cluster Analysis Advanced Methods.ppt
Chapter 11. Cluster Analysis Advanced Methods.ppt
Subrata Kumer Paul
 
Chapter 10. Cluster Analysis Basic Concepts and Methods.ppt
Chapter 10. Cluster Analysis Basic Concepts and Methods.ppt
Subrata Kumer Paul
 
Chapter 6. Mining Frequent Patterns, Associations and Correlations Basic Conc...
Chapter 6. Mining Frequent Patterns, Associations and Correlations Basic Conc...
Subrata Kumer Paul
 
Chapter 5. Data Cube Technology.ppt
Chapter 5. Data Cube Technology.ppt
Subrata Kumer Paul
 
Chapter 3. Data Preprocessing.ppt
Chapter 3. Data Preprocessing.ppt
Subrata Kumer Paul
 
Chapter 4. Data Warehousing and On-Line Analytical Processing.ppt
Chapter 4. Data Warehousing and On-Line Analytical Processing.ppt
Subrata Kumer Paul
 
Chapter 1. Introduction.ppt
Chapter 1. Introduction.ppt
Subrata Kumer Paul
 
Data Mining Lecture_8(a).pptx
Data Mining Lecture_8(a).pptx
Subrata Kumer Paul
 
Data Mining Lecture_13.pptx
Data Mining Lecture_13.pptx
Subrata Kumer Paul
 
Data Mining Lecture_9.pptx
Data Mining Lecture_9.pptx
Subrata Kumer Paul
 
Data Mining Lecture_7.pptx
Data Mining Lecture_7.pptx
Subrata Kumer Paul
 
Data Mining Lecture_10(b).pptx
Data Mining Lecture_10(b).pptx
Subrata Kumer Paul
 
Data Mining Lecture_8(b).pptx
Data Mining Lecture_8(b).pptx
Subrata Kumer Paul
 
Data Mining Lecture_6.pptx
Data Mining Lecture_6.pptx
Subrata Kumer Paul
 
Chapter 9. Classification Advanced Methods.ppt
Chapter 9. Classification Advanced Methods.ppt
Subrata Kumer Paul
 
Chapter 13. Trends and Research Frontiers in Data Mining.ppt
Chapter 13. Trends and Research Frontiers in Data Mining.ppt
Subrata Kumer Paul
 
Chapter 8. Classification Basic Concepts.ppt
Chapter 8. Classification Basic Concepts.ppt
Subrata Kumer Paul
 
Chapter 12. Outlier Detection.ppt
Chapter 12. Outlier Detection.ppt
Subrata Kumer Paul
 
Chapter 7. Advanced Frequent Pattern Mining.ppt
Chapter 7. Advanced Frequent Pattern Mining.ppt
Subrata Kumer Paul
 
Chapter 11. Cluster Analysis Advanced Methods.ppt
Chapter 11. Cluster Analysis Advanced Methods.ppt
Subrata Kumer Paul
 
Chapter 10. Cluster Analysis Basic Concepts and Methods.ppt
Chapter 10. Cluster Analysis Basic Concepts and Methods.ppt
Subrata Kumer Paul
 
Chapter 6. Mining Frequent Patterns, Associations and Correlations Basic Conc...
Chapter 6. Mining Frequent Patterns, Associations and Correlations Basic Conc...
Subrata Kumer Paul
 
Chapter 5. Data Cube Technology.ppt
Chapter 5. Data Cube Technology.ppt
Subrata Kumer Paul
 
Chapter 3. Data Preprocessing.ppt
Chapter 3. Data Preprocessing.ppt
Subrata Kumer Paul
 
Chapter 4. Data Warehousing and On-Line Analytical Processing.ppt
Chapter 4. Data Warehousing and On-Line Analytical Processing.ppt
Subrata Kumer Paul
 
Data Mining Lecture_10(b).pptx
Data Mining Lecture_10(b).pptx
Subrata Kumer Paul
 

Recently uploaded (20)

FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
Shabista Imam
 
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
Mechanical Vibration_MIC 202_iit roorkee.pdf
Mechanical Vibration_MIC 202_iit roorkee.pdf
isahiliitr
 
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
 
retina_biometrics ruet rajshahi bangdesh.pptx
retina_biometrics ruet rajshahi bangdesh.pptx
MdRakibulIslam697135
 
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Mark Billinghurst
 
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
 
Unit III_One Dimensional Consolidation theory
Unit III_One Dimensional Consolidation theory
saravananr808639
 
special_edition_using_visual_foxpro_6.pdf
special_edition_using_visual_foxpro_6.pdf
Shabista Imam
 
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
hosseinihamid192023
 
60 Years and Beyond eBook 1234567891.pdf
60 Years and Beyond eBook 1234567891.pdf
waseemalazzeh
 
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
 
machine learning is a advance technology
machine learning is a advance technology
ynancy893
 
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
SAMEER VISHWAKARMA
 
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
 
Solar thermal – Flat plate and concentrating collectors .pptx
Solar thermal – Flat plate and concentrating collectors .pptx
jdaniabraham1
 
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Mark Billinghurst
 
Introduction to sensing and Week-1.pptx
Introduction to sensing and Week-1.pptx
KNaveenKumarECE
 
Stay Safe Women Security Android App Project Report.pdf
Stay Safe Women Security Android App Project Report.pdf
Kamal Acharya
 
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
 
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
FUNDAMENTALS OF COMPUTER ORGANIZATION AND ARCHITECTURE
Shabista Imam
 
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
Mechanical Vibration_MIC 202_iit roorkee.pdf
Mechanical Vibration_MIC 202_iit roorkee.pdf
isahiliitr
 
International Journal of Advanced Information Technology (IJAIT)
International Journal of Advanced Information Technology (IJAIT)
ijait
 
retina_biometrics ruet rajshahi bangdesh.pptx
retina_biometrics ruet rajshahi bangdesh.pptx
MdRakibulIslam697135
 
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Mark Billinghurst
 
System design handwritten notes guidance
System design handwritten notes guidance
Shabista Imam
 
Unit III_One Dimensional Consolidation theory
Unit III_One Dimensional Consolidation theory
saravananr808639
 
special_edition_using_visual_foxpro_6.pdf
special_edition_using_visual_foxpro_6.pdf
Shabista Imam
 
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
Call For Papers - 17th International Conference on Wireless & Mobile Networks...
hosseinihamid192023
 
60 Years and Beyond eBook 1234567891.pdf
60 Years and Beyond eBook 1234567891.pdf
waseemalazzeh
 
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
 
machine learning is a advance technology
machine learning is a advance technology
ynancy893
 
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
MATERIAL SCIENCE LECTURE NOTES FOR DIPLOMA STUDENTS
SAMEER VISHWAKARMA
 
Structured Programming with C++ :: Kjell Backman
Structured Programming with C++ :: Kjell Backman
Shabista Imam
 
Solar thermal – Flat plate and concentrating collectors .pptx
Solar thermal – Flat plate and concentrating collectors .pptx
jdaniabraham1
 
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Rapid Prototyping for XR: Lecture 4 - High Level Prototyping.
Mark Billinghurst
 
Introduction to sensing and Week-1.pptx
Introduction to sensing and Week-1.pptx
KNaveenKumarECE
 
Stay Safe Women Security Android App Project Report.pdf
Stay Safe Women Security Android App Project Report.pdf
Kamal Acharya
 
Industrial internet of things IOT Week-3.pptx
Industrial internet of things IOT Week-3.pptx
KNaveenKumarECE
 

Shortest path algorithm

  • 1. Shortest Path Problem • Given: network topology with link costs – c(x , y): link cost from node x to node y – Infinity if x and y are not direct neighbors • Compute: least-cost paths to all nodes – From a given source u to all other nodes. 3 2 1 1 4 1 4 5 3 2 A B C D E F G H
  • 2. Subrata paul Roll No :- 13015411. Department Of Computer Science & Engineering , University Of Rajshahi.
  • 3. What Is Routing ?? •A famous quotation from RFC 791 “A name indicates what we seek. An address indicates where it is. A route indicates how we get there.” -- Jon Postel • Routing is the process of selecting best paths.
  • 4. Goals Of Routing Algorithm • We want any several properties of any routing schema. Property Meaning Correctness Finds paths that work Efficient Paths Use network bandwidth well Fair Paths Doesn’t starve any nodes Fast Convergence Recovers quickly after changes Salability Works well as network grows large
  • 5. What Are The Best Paths ?? • Many Possibilities :- - Latency, avoid circuitous paths. - Bandwidth, avoid slow links . - Money, avoid expensive links . - Hops, reduce switching . A B C D E F G
  • 6. Shortest Paths (1) • Find the shortest path from A E. • All links are bidirectional , with equal cost in both direction.
  • 7. Shortest Path(2) • ABCE is a shortest path • Dist(ABCE) = 4 + 2 + 1 = 7 • This is less than : - Dist(ABE) = 8 - Dist(ABFE) = 9 - Dist(AE) = 10 - Dist(ABCDE) = 10
  • 8. How To Compute ?? • Using Dijkstra’s Algorithm :- - Given a network topology . We are about to compute shortest path from a source to all other nodes of the network.
  • 9. Dijkstra’s Algorithm • Algorithm :- - Mark all nodes tentative , set distances from source to 0(Zero) for source and ∞(infinity) for all other nodes - While tentative nodes remain : a ) Extract N , a node with lowest distance b) Add link to N to the shortest path tree C) Relax the distances of neighbors of N by lowering any better distance estimates
  • 10. Dijkstra’s Algorithm A B C D E F G H 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞
  • 11. Dijkstra’s Algorithm A B C D E F G H 0 4 ∞ ∞ 10 ∞ ∞ ∞
  • 12. Dijkstra’s Algorithm A B C D E F G H 0 4 6 ∞ 8 7 7 ∞
  • 13. Dijkstra’s Algorithm A B C D E F G H 0 4 6 8 7 7 7 9
  • 14. Dijkstra’s Algorithm A B C D E F G H 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ A B C D E F G H 0 4 6 8 7 7 7 9
  • 15. Dijkstra’s Algorithm A B C D E F G H 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ A B C D E F G H 0 4 6 8 7 7 7 9
  • 16. Dijkstra’s Algorithm A B C D E F G H 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ A B C D E F G H 0 4 6 8 7 7 7 9
  • 17. Dijkstra’s Algorithm A B C D E F G H 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ A B C D E F G H 0 4 6 8 7 7 7 9
  • 18. Dijkstra’s Algorithm A B C D E F G H 0 ∞ ∞ ∞ ∞ ∞ ∞ ∞ A B C D E F G H 0 4 6 8 7 7 7 9 All nodes aredonenow.
  • 19. Dijkstra’s Algorithm • So , the shortest path from source node A to all other nodes are – A – B = 4 A – C = 6 A – D = 8 A – E = 7 A – F = 7 A – G = 7 A – H = 9
  • 20. Conclusion • Routing is a distributed algorithm – React to changes in the topology – Compute the shortest paths • Two main shortest-path algorithms – Dijkstra – Bellman-Ford • Convergence process – Changing from one topology to another – Transient periods of inconsistency across routers