140 likes | 147 Views
Learn about graph algorithms and their applications in solving routing and scheduling problems in computer networks. Topics include Dijkstra's shortest path algorithm, constrained shortest path algorithms, and more.
E N D
Graph Algorithms and Their Applications on Computer NetworksNeil Tang2/6/2010
Outline • Network Model • Link and Path Costs • Routing Problems • Dijkstra’s Shortest Path Algorithm • Constrained Shortest Path Algorithms • Another Approach: LP and ILP CS223 Advanced Data Structures and Algorithms
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. CS223 Advanced Data Structures and Algorithms
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. CS223 Advanced Data Structures and Algorithms
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. CS223 Advanced Data Structures and Algorithms
B D 1 1 1 1 1 1 8 8 8 8 9 13 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| CS223 Advanced Data Structures and Algorithms
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. CS223 Advanced Data Structures and Algorithms
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 CS223 Advanced Data Structures and Algorithms
Constrained Shortest Path Algorithms Find a shortest path subject to an additive (e.g., delay) constraint: ρ= (A,D), Threshold=4 (4,4) D B (2,4) (3,4) (5,2) A (3,2) C CS223 Advanced Data Structures and Algorithms
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 CS223 Advanced Data Structures and Algorithms
Maximum Flow Problem - LP CS223 Advanced Data Structures and Algorithms
Multi-Commodity Flow Problem - LP CS223 Advanced Data Structures and Algorithms
Shortest Path Problem - ILP CS223 Advanced Data Structures and Algorithms
Constrained Shortest Path Problem - ILP CS223 Advanced Data Structures and Algorithms