90 likes | 99 Views
This article introduces the concept of routing and shortest path algorithms in advanced networking, including Dijkstra's algorithm and constrained shortest path algorithms.
E N D
Routing and Shortest Path AlgorithmsNeil Tang2/18/2009 CS541 Advanced Networking
Outline • Network Model • Link and Path Costs • Routing Problems • Dijkstra’s Shortest Path Algorithm • Constrained Shortest Path Algorithms CS541 Advanced Networking
Network Model • A network is usually modeled as a graph such that the networking problems, such as routing and scheduling, can be transformed to the corresponding problems in a graph and solved by algorithms in graph theory. • A vertex in the graph represents a router. • In a wired network, there is an edge (A,B) between a pair of vertices A and B if there is a physical link in between. • Disk graph: In a wireless network, there is an edge (A,B) between a pair of vertices A and B if their Euclidean distance is no more than the transmission range of node A. CS541 Advanced Networking
Link and Path Cost • There is usually one or multiple cost parameters associated with each link, which indicate its transmission cost, bandwidth, delay and so on. • Some of parameters are bottleneck parameters (e.g. bandwidth), i.e., the cost of the path in terms of this parameter depends on the minimum link cost along the path. • Some of parameters are additive parameters (e.g. delay), i.e., the cost of the path in terms of this parameter is equal to the summation of the costs of all links along the path. CS541 Advanced Networking
Routing Problems • Basic routing problem: Givena source and a destination, the basic routing problem seeks a source-destination route such that it has the minimum cost among all possible source-destination routes. • QoS routing problem: Givena source and destination along with one or multiple QoS constrains (e.g, bandwidth, delay), a QoS routing problem seeks a source-destination route such that it has the minimum cost among all source-destination routes which can satisfy all QoS constraints. CS541 Advanced Networking
B D 1 1 1 1 1 1 8 8 8 8 13 9 14 9 10 10 10 10 10 10 10 3 3 3 3 9 9 9 9 3 3 9 9 0 0 0 0 6 6 6 6 A 0 0 6 6 5 5 5 5 5 5 5 5 5 5 7 7 7 7 5 2 2 2 2 2 2 C E Dijkstra’s Shortest Path Algorithm Time complexity: |E|+|V|log|V| CS541 Advanced Networking
Typical QoS Routing Problems • Find a minimum cost path subject to a bottleneck (e.g., bandwidth) constraint. • Find a minimum cost path subject to an additive (e.g. delay) constraint. This problem is NP-hard. CS541 Advanced Networking
Constrained Shortest Path Algorithms Find a shortest path subject to a bottleneck (e.g., bandwidth) constraint: ρ= (A,D), Threshold=3 (4,4) D B (2,4) (3,4) (5,2) A (3,2) C CS541 Advanced Networking
Constrained Shortest Path Algorithms Find a shortest path subject to an additive (e.g., delay) constraint: ρ= (A,D), Threshold=4 B0 D0 2 4 4 5 3 0 B1 D1 5 A0 C0 5 3 0 3 2 B2 D2 A1 C1 5 5 (4,4) B D 3 0 (2,4) B3 D3 (3,4) 3 A2 C2 (5,2) A 5 3 0 (3,2) 3 C B4 D4 A3 C3 3 A4 C4 CS541 Advanced Networking