Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 TCOM 5143 Telecommunications Analysis, Planning and Design Lecture 6 Network Design and Graph Theory: part 2 Shortest Path trees and Tours.

Similar presentations


Presentation on theme: "1 TCOM 5143 Telecommunications Analysis, Planning and Design Lecture 6 Network Design and Graph Theory: part 2 Shortest Path trees and Tours."— Presentation transcript:

1 1 TCOM 5143 Telecommunications Analysis, Planning and Design Lecture 6 Network Design and Graph Theory: part 2 Shortest Path trees and Tours

2 2 Definition: Shortest path: Given a weighted graph G(V,E); i.e., each edge has a weight W(e), and two nodes u and v, the shortest path from u to v is a path P from u to v such that the total weight of edges in the path P is minimum. Shortest paths have the following “optimal nest” property: Every subpath of a shortest path is a shortest path (between its own endvertices).

3 3 Definition: Shortest path Tree Given a weighted graph G(V,E) and a specified node r in the graph (called root node), a shortest-path (spanning) tree T is a spanning tree of G such that for all v  V, the unique path from r to v in T is a shortest path from r to v in G.

4 4 Dijkstra’s algorithm is a greedy algorithm that solves the shortest-path tree problem. In the Dijkstra’s algorithm, each node v will have two elements:  a label, denoted dist(v): this is a number that represents the shortest distance from the root r to that node v, and  a predecessor, denoted pred(v): this is the preceding node on the path from the root r to the node v in question.

5 5 Dijkstra’s algorithm: Step 1. Mark the root node r as scanned and set the label of the root r to zero and set its predecessor to itself. The root is the only node that is its own predecessor. Step 2. Mark all nodes except the root in the graph as unscanned and set their labels to . For each node v adjacent to the root, set the label of the node to the weight of edge between the root and the node; i.e, dist(v)=W(r,v). Set pred(v)=r.

6 6 Step 3. Repeat the following until all nodes are scanned:  Find the node v* with the smallest label. Mark this node as scanned.  For every node v adjacent to v*, check:  If dist(v*) + w(v*,v) < dist(v) then update the label of v as dist(v*) + w(v*,v) and set the predecessor of v to v*. Step 4. When the loop in step 3 finishes, we have the minimal shortest path tree rooted at r stored in pred format.

7 7 Notes: when the weights of all edges are positive, once a node is marked as scanned, then it need never be rescanned. If the label of a node changes, it must be rescanned.

8 8 Example: Find shortest paths from A to all other nodes in the graph below. 6 A B D E F C 5 1 3 5 1 4 2

9 9 Step 1 and 2: Scanned nodes: A Step 3: v* is C because C has the lowest label. Scan C. So, scanned nodes are A,C Label of B becomes 4 because 3+1 < 5. And Pred(B)=C. Label of D becomes 6 because 5+1 < . And Pred(D)=C. ,, A B D E F C 5 1 3 5 6 1 4 2 0,A 5,A ,, 1,A ,, Label pred

10 10 Step 3: Scan B because it has the lowest label (4). So, scanned nodes are A,B,C. The label of D becomes 5 (=4+1). Pred(D)=B The label of E becomes 10 (=4+6). Pred(E)=B ,, A B D E F C 5 1 3 5 6 1 4 2 0,A 4,C ,, 1,A6,C

11 11 Step 3: Scan D because it has the lowest label (5). So, the scanned nodes are A,B,C,D. Update the label of F as 9 (=5+4). And set pred(F)=D 10,B A B D E F C 5 1 3 5 6 1 4 2 0,A 4,C ,, 1,A5,B

12 12 Step 3: Scan F because it has the lowest label 9. So, the scanned nodes are A,B,C,D,F.. Do we update the label of E? no, because 9+2 is not < 10. 10,B A B D E F C 5 1 3 5 6 1 4 2 0,A 4,C 9,D 1,A5,B

13 13 Step 3: Scan E and we are done. The scanned nodes are A,B,C,D,E,F. 10,B A B D E F C 5 1 3 5 6 1 4 2 0,A 4,C 9,D 1,A5,B

14 14 The final solution is: 10,B A B D E F C 5 1 3 5 6 1 4 2 0,A 4,C 9,D 1,A5,B

15 15 The shortest path spanning tree for the example graph is therefore the following: The tree is made of the six nodes connected with the large, blue links. 10,B A B D E F C 5 1 3 5 6 1 4 2 0,A 4,C 9,D 1,A5,B In Delite, we can run Dijkstra’s algorithm by invoking Prim-Dijkstra from Delite with  =1. (  is explained below.)

16 16 Comparing MSTs and SPTs: cost versus delay Recall that for the 20-node MST in figure 3.4 in Cahn textbook, the total link cost is $48,686/month, and its average delay over the network is The shortest-path spanning tree produced by Dijkstra’s algorithm in figure 3.7 in Cahn textbook is a star centered at the node N14. Its total link cost is $88,612/ month, and its average delay over the network is Note that in general the shortest-path spanning trees produced by Dijkstra’s algorithm are not stars.

17 17 Tradeoffs between Total Link Cost and If we compare MSTs and SPTs (Shortest path trees), we find that MSTs have optimal (lowest) cost, but high average number of hops for large graph; SPTs do not have optimal (lowest) cost, but they have reasonable average number of hops for all graphs.

18 18 Prim-Dijkstra Trees One way to to produce designs that are not as expensive as the SPTs or that are not associated with as high delays as the MSTs is to use the following labeling scheme in Dijkstra’s algorithm: Consider the scenario after the augmentation of the tree T (i.e., the vertex v has just been included), the update of label (u) for every neighbor u of v not in T is: Prim’slabel(u) = min {label(u), w(v, u)} Dijkstra’slabel(u) = min {label(u), label(v) + w(v, u)}.

19 19 Prim’slabel(u) = min {label(u), w(v, u)} Dijkstra’slabel(u) = min {label(u), label(v) + w(v, u)}. A unified labeling scheme is label(u) = min {label(u),  label(v) + w(v, u)}, where   [0, 1] is a parameter to yield the desired tradeoffs. For  = 0, the unified algorithm reduces to Prim’s algorithm for MSTs. For  = 1, the unified algorithm reduces to Dijkstra’s algorithm for shortest-path spanning trees.

20 20 Table 3.12 in Cahn textbook shows a range of tradeoffs for a 100-node tree design over a range of  -values in [0, 1].

21 21 Comparing Candidate Designs: Dominance Among Designs Goal: Select the best designs based the following factors: network cost and performance (i.e., delay, reliability). Definition: For two candidate designs D 1 and D 2 with cost-performance (C 1, P 1 ) and (C 2, P 2 ), respectively, we say that D 1 dominates D 2 when C 1 < C 2 and P 1 is better than P 2.

22 22 Notes: 1.The interpretation of “P 1 is better than P 2 ” depends on the context of performance: P 1 P 2 when P measures network reliability. 2.The dominance relation, denoted by <, on a set S of candidate designs, is irreflexive, i.e., for D  S, D is not dominated by D; anti-symmetric, i.e., for D 1, D 2  S, D 1 < D 2  D 2 is not < D 1 ; transitive, i.e., for D 1, D 2, D 3  S, D 1 < D 2 and D 2 < D 3  D 1 < D 3.

23 23 3.Two candidate designs D 1 and D 2 may not be comparable: D 1 is not < D 2 and D 2 is not < D 1, that is, D 1 and D 2 exhibit a tradeoff in cost and performance.

24 24 The following table shows the dominance among the designs for the 100-node Prim-Disjksta trees

25 25 We should discard candidate designs N0, N1, and N2 because they are dominated by other candidates. The remaining candidate designs are pairwise noncomparable candidate designs: They exhibit tradeoffs between cost and performance (delay). Each candidate can be used as a valid design.

26 26 One way to select among pairwise noncomparable candidate designs is use the marginal cost of performance defined as follows:


Download ppt "1 TCOM 5143 Telecommunications Analysis, Planning and Design Lecture 6 Network Design and Graph Theory: part 2 Shortest Path trees and Tours."

Similar presentations


Ads by Google