SlideShare a Scribd company logo
8
Most read
9
Most read
12
Most read
Routing Algorithm
Routing Algorithm
Routing Algorithm
Routing Algorithm
Routing Algorithm
Routing Algorithm
Routing Algorithm
Routing Algorithm
Routing Algorithm
Routing Algorithm
Network Layer 4-11
1
23
IP destination address in
arriving packet’s header
routing algorithm
local forwarding table
dest address output link
address-range 1
address-range 2
address-range 3
address-range 4
3
2
2
1
Interplay between routing, forwarding
routing algorithm determines
end-end-path through network
forwarding table determines
local forwarding at this router
Network Layer 4-12
Routing algorithm classification
Q: global or decentralized
information?
global:
• all routers have complete
topology, link cost info
• “link state” algorithms
decentralized:
• router knows physically-
connected neighbors, link
costs to neighbors
• iterative process of
computation, exchange of
info with neighbors
Q: static or dynamic?
static:
 routes change slowly over
time
dynamic:
 routes change more
quickly
 periodic update
 in response to link cost
changes
Network Layer 4-13
A Link-State Routing Algorithm
Dijkstra’s algorithm
• net topology, link costs
known to all nodes
– accomplished via “link
state broadcast”
– all nodes have same info
• computes least cost paths
from one node (‘source”)
to all other nodes
– gives forwarding table for
that node
• iterative: after k
iterations, know least cost
path to k dest.’s
notation:
• c(x,y): link cost from node
x to y; = ∞ if not direct
neighbors
• D(v): current value of cost
of path from source to dest.
v
• p(v): predecessor node
along path from source to v
• N': set of nodes whose
least cost path definitively
known
Network Layer 4-14
Routing algorithm classification
Q: global or decentralized
information?
global:
• all routers have complete
topology, link cost info
• “link state” algorithms
decentralized:
• router knows physically-
connected neighbors, link
costs to neighbors
• iterative process of
computation, exchange of
info with neighbors
Q: static or dynamic?
static:
 routes change slowly over
time
dynamic:
 routes change more
quickly
 periodic update
 in response to link cost
changes
Network Layer 4-15
w3
4
v
x
u
5
3
7 4
y
8
z
2
7
9
Dijkstra’s algorithm: example
Step N'
D(v)
p(v)
0
1
2
3
4
5
D(w)
p(w)
D(x)
p(x)
D(y)
p(y)
D(z)
p(z)
u ∞∞7,u 3,u 5,u
uw ∞11,w6,w 5,u
14,x11,w6,wuwx
uwxv 14,x10,v
uwxvy 12,y
notes:
 construct shortest path tree
by tracing predecessor
nodes
 ties can exist (can be broken
arbitrarily)
uwxvyz
Network Layer 4-16
Dijkstra’s algorithm: another example
Step
0
1
2
3
4
5
N'
u
ux
uxy
uxyv
uxyvw
uxyvwz
D(v),p(v)
2,u
2,u
2,u
D(w),p(w)
5,u
4,x
3,y
3,y
D(x),p(x)
1,u
D(y),p(y)
∞
2,x
D(z),p(z)
∞
∞
4,y
4,y
4,y
u
yx
wv
z
2
2
1
3
1
1
2
5
3
5
Network Layer 4-17
Dijkstra’s algorithm: example (2)
u
yx
wv
z
resulting shortest-path tree from u:
v
x
y
w
z
(u,v)
(u,x)
(u,x)
(u,x)
(u,x)
destination link
resulting forwarding table in u:
Network Layer 4-18
Distance vector algorithm
Bellman-Ford equation (dynamic
programming)
let
dx(y) := cost of least-cost path from x to y
then
dx(y) = min {c(x,v) + dv(y) }
v
cost to neighbor v
min taken over all neighbors v of x
cost from neighbor v to destination y
Network Layer 4-19
Bellman-Ford example
u
yx
wv
z
2
2
1
3
1
1
2
5
3
5
clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3
du(z) = min { c(u,v) + dv(z),
c(u,x) + dx(z),
c(u,w) + dw(z) }
= min {2 + 5,
1 + 3,
5 + 3} = 4
B-F equation says:
Network Layer 4-20
key idea:
from time-to-time, each node sends its
own distance vector estimate to neighbors
when x receives new DV estimate from
neighbor, it updates its own DV using B-F
equation:
Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N
 under minor, natural conditions, the estimate
Dx(y) converge to the actual least cost dx(y)
Distance vector algorithm
Network Layer 4-21
iterative, asynchronous:
each local iteration
caused by:
• local link cost change
• DV update message from
neighbor
distributed:
• each node notifies
neighbors only when its
DV changes
– neighbors then notify their
neighbors if necessary
wait for (change in local link
cost or msg from neighbor)
recompute estimates
if DV to any dest has changed,
notify neighbors
each node:
Distance vector algorithm
Network Layer 4-22
x y z
x
y
z
0 2 7
∞∞ ∞
∞∞ ∞
from
cost to
fromfrom
x y z
x
y
z
0
x y z
x
y
z
∞ ∞
∞∞ ∞
cost to
x y z
x
y
z
∞∞ ∞
7 1 0
cost to
∞
2 0 1
∞ ∞ ∞
2 0 1
7 1 0
time
x z
12
7
y
node x
table
Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)}
= min{2+0 , 7+1} = 2
Dx(z) = min{c(x,y) +
Dy(z), c(x,z) + Dz(z)}
= min{2+1 , 7+0} = 3
32
node y
table
node z
table
cost to
from
Network Layer 4-23
x y z
x
y
z
0 2 3
from
cost to
x y z
x
y
z
0 2 7
from
cost to
x y z
x
y
z
0 2 3
from
cost to
x y z
x
y
z
0 2 3
from
cost to
x y z
x
y
z
0 2 7
from
cost to
2 0 1
7 1 0
2 0 1
3 1 0
2 0 1
3 1 0
2 0 1
3 1 0
2 0 1
3 1 0
time
x y z
x
y
z
0 2 7
∞∞ ∞
∞∞ ∞
from
cost to
fromfrom
x y z
x
y
z
0
x y z
x
y
z
∞ ∞
∞∞ ∞
cost to
x y z
x
y
z
∞∞ ∞
7 1 0
cost to
∞
2 0 1
∞ ∞ ∞
2 0 1
7 1 0
time
x z
12
7
y
node x
table
Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)}
= min{2+0 , 7+1} = 2
Dx(z) = min{c(x,y) +
Dy(z), c(x,z) + Dz(z)}
= min{2+1 , 7+0} = 3
32
node y
table
node z
table
cost to
from

More Related Content

What's hot (20)

PDF
Mobile Network Layer
Rahul Hada
 
PPT
iso osi model
vishnu1204
 
PPT
Error Detection And Correction
Renu Kewalramani
 
PPTX
Presentation Routing algorithm
Basit Hussain
 
PPT
Switching
Shankar Gangaju
 
PPTX
Routing algorithm
Bushra M
 
PPTX
Computer Network - Network Layer
Manoj Kumar
 
PPTX
Shortest path algorithm
Subrata Kumer Paul
 
PPTX
Introduction of tcp, ip & udp
rahul kundu
 
PPTX
Link state routing protocol
Aung Thu Rha Hein
 
PPTX
Routing ppt
ArpiSaxena1
 
PPTX
Destination Sequenced Distance Vector Routing (DSDV)
ArunChokkalingam
 
PPTX
Routing Protocols in WSN
Darpan Dekivadiya
 
PPT
Selective repeat protocol
Manusha Dilan
 
PPT
Unit 3 Network Layer PPT
KalpanaC14
 
PPTX
ASYNCHRONOUS TRANSFER MODE (ATM)
ZillayHuma Mehmood
 
PPT
Topic : X.25, Frame relay and ATM
Dr Rajiv Srivastava
 
PPT
Ppt for tranmission media
Manish8976
 
PPTX
TCP/IP 3-way Handshake
Alok Tripathi
 
Mobile Network Layer
Rahul Hada
 
iso osi model
vishnu1204
 
Error Detection And Correction
Renu Kewalramani
 
Presentation Routing algorithm
Basit Hussain
 
Switching
Shankar Gangaju
 
Routing algorithm
Bushra M
 
Computer Network - Network Layer
Manoj Kumar
 
Shortest path algorithm
Subrata Kumer Paul
 
Introduction of tcp, ip & udp
rahul kundu
 
Link state routing protocol
Aung Thu Rha Hein
 
Routing ppt
ArpiSaxena1
 
Destination Sequenced Distance Vector Routing (DSDV)
ArunChokkalingam
 
Routing Protocols in WSN
Darpan Dekivadiya
 
Selective repeat protocol
Manusha Dilan
 
Unit 3 Network Layer PPT
KalpanaC14
 
ASYNCHRONOUS TRANSFER MODE (ATM)
ZillayHuma Mehmood
 
Topic : X.25, Frame relay and ATM
Dr Rajiv Srivastava
 
Ppt for tranmission media
Manish8976
 
TCP/IP 3-way Handshake
Alok Tripathi
 

Similar to Routing Algorithm (20)

PDF
Lec12 on Computer Networks by Tarun Mangla.pdf
ShivamSawarn2
 
PPTX
Module 3- transport_layer .pptx
hariprasad279825
 
PPTX
numeric network in the world of heart then ay iks jsns
kassemKhalil1
 
PPTX
Computer networks chapter 5 network layer : control plane
laibaiqbal450
 
PDF
P5 - Routing Protocols
Kurniawan Dwi Irianto
 
PPTX
5.2_video_slides.pptx
DennyHermawan15
 
PPT
Chapter 5 - Computer Networking a top-down Approach 7th
Andy Juan Sarango Veliz
 
PDF
Cnetwork
ADARSHN40
 
PPTX
Network Layer: Control Plane (Computer Network Course)
okuwobi
 
PPT
Introduction to Computer Networks
Venkatesh Iyer
 
PPT
Intro 2 Computer Networks
rakeshgoswami
 
PPT
Data Communications and Networks Network Layer
SunilKumar481222
 
PDF
Lecture set 5
Gopi Saiteja
 
PPTX
Week13 lec2
syedhaiderraza
 
PPTX
Chapter_5_v8.0Routing Protocol for Computer network from kurose and ross
dutt2309
 
PPT
Bellmanford
Abhijeet Gokhale
 
PDF
08-routing-1-slides.pdf
AdhiRizal2
 
PPT
routing1 1X3 Router (capable of routing the data packets.ppt
JANARTHANANS22
 
PDF
Dijkstra
David Wood
 
PDF
Dijkstra's Algorithm
guest862df4e
 
Lec12 on Computer Networks by Tarun Mangla.pdf
ShivamSawarn2
 
Module 3- transport_layer .pptx
hariprasad279825
 
numeric network in the world of heart then ay iks jsns
kassemKhalil1
 
Computer networks chapter 5 network layer : control plane
laibaiqbal450
 
P5 - Routing Protocols
Kurniawan Dwi Irianto
 
5.2_video_slides.pptx
DennyHermawan15
 
Chapter 5 - Computer Networking a top-down Approach 7th
Andy Juan Sarango Veliz
 
Cnetwork
ADARSHN40
 
Network Layer: Control Plane (Computer Network Course)
okuwobi
 
Introduction to Computer Networks
Venkatesh Iyer
 
Intro 2 Computer Networks
rakeshgoswami
 
Data Communications and Networks Network Layer
SunilKumar481222
 
Lecture set 5
Gopi Saiteja
 
Week13 lec2
syedhaiderraza
 
Chapter_5_v8.0Routing Protocol for Computer network from kurose and ross
dutt2309
 
Bellmanford
Abhijeet Gokhale
 
08-routing-1-slides.pdf
AdhiRizal2
 
routing1 1X3 Router (capable of routing the data packets.ppt
JANARTHANANS22
 
Dijkstra
David Wood
 
Dijkstra's Algorithm
guest862df4e
 
Ad

More from Kamal Acharya (20)

PPTX
Programming the basic computer
Kamal Acharya
 
PPTX
Computer Arithmetic
Kamal Acharya
 
PPTX
Introduction to Computer Security
Kamal Acharya
 
PPTX
Session and Cookies
Kamal Acharya
 
PPTX
Functions in php
Kamal Acharya
 
PPTX
Web forms in php
Kamal Acharya
 
PPTX
Making decision and repeating in PHP
Kamal Acharya
 
PPTX
Working with arrays in php
Kamal Acharya
 
PPTX
Text and Numbers (Data Types)in PHP
Kamal Acharya
 
PPTX
Introduction to PHP
Kamal Acharya
 
PPTX
Capacity Planning of Data Warehousing
Kamal Acharya
 
PPTX
Data Warehousing
Kamal Acharya
 
PPTX
Search Engines
Kamal Acharya
 
PPTX
Web Mining
Kamal Acharya
 
PPTX
Information Privacy and Data Mining
Kamal Acharya
 
PPTX
Cluster Analysis
Kamal Acharya
 
PPTX
Association Analysis in Data Mining
Kamal Acharya
 
PPTX
Classification techniques in data mining
Kamal Acharya
 
PPTX
Data Preprocessing
Kamal Acharya
 
PPTX
Introduction to Data Mining and Data Warehousing
Kamal Acharya
 
Programming the basic computer
Kamal Acharya
 
Computer Arithmetic
Kamal Acharya
 
Introduction to Computer Security
Kamal Acharya
 
Session and Cookies
Kamal Acharya
 
Functions in php
Kamal Acharya
 
Web forms in php
Kamal Acharya
 
Making decision and repeating in PHP
Kamal Acharya
 
Working with arrays in php
Kamal Acharya
 
Text and Numbers (Data Types)in PHP
Kamal Acharya
 
Introduction to PHP
Kamal Acharya
 
Capacity Planning of Data Warehousing
Kamal Acharya
 
Data Warehousing
Kamal Acharya
 
Search Engines
Kamal Acharya
 
Web Mining
Kamal Acharya
 
Information Privacy and Data Mining
Kamal Acharya
 
Cluster Analysis
Kamal Acharya
 
Association Analysis in Data Mining
Kamal Acharya
 
Classification techniques in data mining
Kamal Acharya
 
Data Preprocessing
Kamal Acharya
 
Introduction to Data Mining and Data Warehousing
Kamal Acharya
 
Ad

Recently uploaded (20)

PDF
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
PPTX
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
PPTX
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPT
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
PPTX
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PDF
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPTX
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
PPTX
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PPTX
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PPTX
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
PDF
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
PPTX
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PDF
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 
Isharyanti-2025-Cross Language Communication in Indonesian Language
Neny Isharyanti
 
Unit 2 COMMERCIAL BANKING, Corporate banking.pptx
AnubalaSuresh1
 
Stereochemistry-Optical Isomerism in organic compoundsptx
Tarannum Nadaf-Mansuri
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
Talk on Critical Theory, Part One, Philosophy of Social Sciences
Soraj Hongladarom
 
SPINA BIFIDA: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
CONCURSO DE POESIA “POETUFAS – PASSOS SUAVES PELO VERSO.pdf
Colégio Santa Teresinha
 
Dimensions of Societal Planning in Commonism
StefanMz
 
I AM MALALA The Girl Who Stood Up for Education and was Shot by the Taliban...
Beena E S
 
Cultivation practice of Litchi in Nepal.pptx
UmeshTimilsina1
 
PATIENT ASSIGNMENTS AND NURSING CARE RESPONSIBILITIES.pptx
PRADEEP ABOTHU
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
ASRB NET 2023 PREVIOUS YEAR QUESTION PAPER GENETICS AND PLANT BREEDING BY SAT...
Krashi Coaching
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
CATEGORIES OF NURSING PERSONNEL: HOSPITAL & COLLEGE
PRADEEP ABOTHU
 
QNL June Edition hosted by Pragya the official Quiz Club of the University of...
Pragya - UEM Kolkata Quiz Club
 
How to Handle Salesperson Commision in Odoo 18 Sales
Celine George
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
ARAL_Orientation_Day-2-Sessions_ARAL-Readung ARAL-Mathematics ARAL-Sciencev2.pdf
JoelVilloso1
 

Routing Algorithm

  • 11. Network Layer 4-11 1 23 IP destination address in arriving packet’s header routing algorithm local forwarding table dest address output link address-range 1 address-range 2 address-range 3 address-range 4 3 2 2 1 Interplay between routing, forwarding routing algorithm determines end-end-path through network forwarding table determines local forwarding at this router
  • 12. Network Layer 4-12 Routing algorithm classification Q: global or decentralized information? global: • all routers have complete topology, link cost info • “link state” algorithms decentralized: • router knows physically- connected neighbors, link costs to neighbors • iterative process of computation, exchange of info with neighbors Q: static or dynamic? static:  routes change slowly over time dynamic:  routes change more quickly  periodic update  in response to link cost changes
  • 13. Network Layer 4-13 A Link-State Routing Algorithm Dijkstra’s algorithm • net topology, link costs known to all nodes – accomplished via “link state broadcast” – all nodes have same info • computes least cost paths from one node (‘source”) to all other nodes – gives forwarding table for that node • iterative: after k iterations, know least cost path to k dest.’s notation: • c(x,y): link cost from node x to y; = ∞ if not direct neighbors • D(v): current value of cost of path from source to dest. v • p(v): predecessor node along path from source to v • N': set of nodes whose least cost path definitively known
  • 14. Network Layer 4-14 Routing algorithm classification Q: global or decentralized information? global: • all routers have complete topology, link cost info • “link state” algorithms decentralized: • router knows physically- connected neighbors, link costs to neighbors • iterative process of computation, exchange of info with neighbors Q: static or dynamic? static:  routes change slowly over time dynamic:  routes change more quickly  periodic update  in response to link cost changes
  • 15. Network Layer 4-15 w3 4 v x u 5 3 7 4 y 8 z 2 7 9 Dijkstra’s algorithm: example Step N' D(v) p(v) 0 1 2 3 4 5 D(w) p(w) D(x) p(x) D(y) p(y) D(z) p(z) u ∞∞7,u 3,u 5,u uw ∞11,w6,w 5,u 14,x11,w6,wuwx uwxv 14,x10,v uwxvy 12,y notes:  construct shortest path tree by tracing predecessor nodes  ties can exist (can be broken arbitrarily) uwxvyz
  • 16. Network Layer 4-16 Dijkstra’s algorithm: another example Step 0 1 2 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v) 2,u 2,u 2,u D(w),p(w) 5,u 4,x 3,y 3,y D(x),p(x) 1,u D(y),p(y) ∞ 2,x D(z),p(z) ∞ ∞ 4,y 4,y 4,y u yx wv z 2 2 1 3 1 1 2 5 3 5
  • 17. Network Layer 4-17 Dijkstra’s algorithm: example (2) u yx wv z resulting shortest-path tree from u: v x y w z (u,v) (u,x) (u,x) (u,x) (u,x) destination link resulting forwarding table in u:
  • 18. Network Layer 4-18 Distance vector algorithm Bellman-Ford equation (dynamic programming) let dx(y) := cost of least-cost path from x to y then dx(y) = min {c(x,v) + dv(y) } v cost to neighbor v min taken over all neighbors v of x cost from neighbor v to destination y
  • 19. Network Layer 4-19 Bellman-Ford example u yx wv z 2 2 1 3 1 1 2 5 3 5 clearly, dv(z) = 5, dx(z) = 3, dw(z) = 3 du(z) = min { c(u,v) + dv(z), c(u,x) + dx(z), c(u,w) + dw(z) } = min {2 + 5, 1 + 3, 5 + 3} = 4 B-F equation says:
  • 20. Network Layer 4-20 key idea: from time-to-time, each node sends its own distance vector estimate to neighbors when x receives new DV estimate from neighbor, it updates its own DV using B-F equation: Dx(y) ← minv{c(x,v) + Dv(y)} for each node y ∊ N  under minor, natural conditions, the estimate Dx(y) converge to the actual least cost dx(y) Distance vector algorithm
  • 21. Network Layer 4-21 iterative, asynchronous: each local iteration caused by: • local link cost change • DV update message from neighbor distributed: • each node notifies neighbors only when its DV changes – neighbors then notify their neighbors if necessary wait for (change in local link cost or msg from neighbor) recompute estimates if DV to any dest has changed, notify neighbors each node: Distance vector algorithm
  • 22. Network Layer 4-22 x y z x y z 0 2 7 ∞∞ ∞ ∞∞ ∞ from cost to fromfrom x y z x y z 0 x y z x y z ∞ ∞ ∞∞ ∞ cost to x y z x y z ∞∞ ∞ 7 1 0 cost to ∞ 2 0 1 ∞ ∞ ∞ 2 0 1 7 1 0 time x z 12 7 y node x table Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2 Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 3 32 node y table node z table cost to from
  • 23. Network Layer 4-23 x y z x y z 0 2 3 from cost to x y z x y z 0 2 7 from cost to x y z x y z 0 2 3 from cost to x y z x y z 0 2 3 from cost to x y z x y z 0 2 7 from cost to 2 0 1 7 1 0 2 0 1 3 1 0 2 0 1 3 1 0 2 0 1 3 1 0 2 0 1 3 1 0 time x y z x y z 0 2 7 ∞∞ ∞ ∞∞ ∞ from cost to fromfrom x y z x y z 0 x y z x y z ∞ ∞ ∞∞ ∞ cost to x y z x y z ∞∞ ∞ 7 1 0 cost to ∞ 2 0 1 ∞ ∞ ∞ 2 0 1 7 1 0 time x z 12 7 y node x table Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)} = min{2+0 , 7+1} = 2 Dx(z) = min{c(x,y) + Dy(z), c(x,z) + Dz(z)} = min{2+1 , 7+0} = 3 32 node y table node z table cost to from