Download Hwk 5 Soln

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

CAN bus wikipedia , lookup

Airborne Networking wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Routing in delay-tolerant networking wikipedia , lookup

Kademlia wikipedia , lookup

Dijkstra's algorithm wikipedia , lookup

Transcript
Network Problems
You need to take a trip by car to another town that you have never visited before. Therefore, you
are studying a map to determine the shortest route to your destination. Depending on which route
you choose, there are five other towns (call them A, B, C, D, E) that you might pass through on the
way. The map shows the mileage along each road that directly connects two towns without any
intervening towns. These numbers are summarized in the following table, where a dash indicates
that there is no road directly connecting these two towns without going through any other towns.
Formulate this problem as a shortest-path problem by drawing a network where nodes represent towns,
links represent roads, and numbers indicate the length of each link in miles.
A
40
O
60
70
10
55
D
B
10
40
50
E
20
C
50
60
T
80
[40]
A
[0]
O
40
60
70
10
55
D
B
10
40
50
60
T
80
E
20
50
C
[40]
A
[0]
O
40
60
70
10
[50]
B
55
D
10
40
50
E
20
C
[50]
50
60
T
80
[40]
A
[0]
O
40
60
70
10
[50]
B
55
D
60
10
40
50
T
80
E
20
50
C
[90]
[50]
[40]
A
[0]
O
40
60
70
10
[50]
B
55
[100]
D
10
40
50
E
20
C
[50]
60
50
[90]
T
80
[40]
A
[0]
O
40
60
70
10
[50]
B
55
[100]
D
10
40
50
60 [160]
T
80
E
20
50
C
[90]
[50]
[40]
A
[0]
40
[50]
B
O
[100]
D
10
10
40
50
60 [160]
E
C
[50]
[90]
T
Use the algorithm described in Sec . 9.3 to find the shortest path through each of the following networks,
where the numbers represent actual distances between the corresponding nodes.
[4]
[10]
[0]
[16]
[5]
[9]
[5]
[4]
[10]
[7]
[0]
[8]
[11]
[6]
[3]
[9]
[14]
[17]
For networks (a) and (b), use the augmenting path algorithm described in Sec. 9.5 to find the flow
pattern giving the maximum flow from the source to the sink, given that the arc capacity from
node i to node j is the number nearest node i along the arc between these nodes.
(flow, cap remaining)
(4,2)
[4]
(4,0)
x
(4,0)
x
[-4]
(flow, cap remaining)
(4,0)
(4,2)
[7]
x
(4,0)
x
(3,1)
[-7]
(3,0)
x
(3,6)
(flow, cap remaining)
(4,0)
(4,2)
[8]
x
(4,0)
x
(4,0)
x
[-8]
(3,0)
x
(1,2)
(4,5)
(1,3)
(flow, cap remaining)
(4,0)
(4,2)
[9]
x
(4,0)
x
(1,0)
x
(4,0)
x
(3,0)
(1,2)
x
(2,2)
(5,4)
[-9]
Min cut = 9
[9]
[-9]