This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Chapter 5 Solutions 5.1 The PrimDijkstra Algorithm Arbitrarily select node e as the initiaJ frag ment. Arcs are added in the following order: (d,e), (b,d), (b,c) {tie with (a,b) is broken arbitrarily}, (a, b), (a, J). Kruskal's Algorithm Start with each node as a fragment. Arcs are added in the following order: (a,f), (b,d), (a,b) {tie with (b,c) is broken arbitrarily}, (b,c), (d,e). The weight of the MST in both cases is 15. 5.2 The BellmanFord Algorithm By convention, D~h) = 0, for aJI h. Initially DP) = d li , for all i :# 1. For each successive h ?: 1 we compute D~h+l) = minj[Djh) + d ji ), for all i :f 1. The results are summarized in the following table. D~ D 2 D3 D~ D~ Shortest path arcst t t t 1 2 4 4 4 4 4 (1,2) 3 5 5 5 5 5 (1,3) 4 00 7 7 7 7 (2,4) 5 00 14 13 12 12 (6,5) 6 00 14 10 10 10 (4,6) 7 00 00 16 12 12 (6,7) tThe arcs on the shortest path tree are computed after running the Bellman Ford aJgorithm. For each i:f 1 we include in the shortest path tree one arc U,i) that minimizes Bellman's equation. Dijkstra's Algorithm Refer to the algorithm description in the text. Ini tially: D 1 = 0; D; = d u for i :f 1; P = {l}. The state after each iteration is Next assume A=l and Cl=O. On the arrival of an idle slot in the downstream direction, 1) Place the frame in the idle slot, setting the busy bit; 2) If there is a waiting frame in the supplementary queue, put it in the vinu::ti queue, place C2 in counter 1 and set C2 to 0; 3) If there is no waiting frame, set A=O. On the arrival of a request bit in the upstream direction, increment C2. Next assume A=O. On the arrival of an idle slot in the downstream direction, decrement C2. On the arrival of a request bit in the upstream direction, increment C2. On the arrival of a frame to be transmitted, put it in the vinual queue, place C2 in counter 1 and set C2 to O. shown in the table below. P is not shown but can be inferred from i. Only the Dj's which are updated at each step are shown. Iteration i Dl D 2 D 3 D 4 Ds D s D 7 Arc added initial 4 5 00 00 00 00 1 2 5 7 14 00 00 (1,2) 2 3 7 14 14 00 (1,3) 3 4 13 10 00 (2,4) 4 6 12 12 (4,6) 5 5 12 (6,5) 6 7 (6,7) 5.3 Let Pij be the probability that link (i, j) fails during the lifetime of a virtual circuit. Let PA: be the probability that a path k = (A, i, ... ,j, B) remains intact. Since links fail independently we have: We want to find the path k for which PA: is maximized. Equivalently, we can find the path k for whichIn PA: is minimized. Since the arc weights Pij are small, 1  Pij is close to 1 and we may use the approximation In z ::::: z 1. This gives:In PA: ::::: PAi + ... + PjB Therefore, the most reliable path from A to B is the shortest path using the weights given in the figure. Applying Dijkstra's algorithm gives the shortest path tree. We proceed as in problem 5.2....
View Full
Document
 Fall '09
 Biswas

Click to edit the document details