Routing and Shortest Path Algorithms Neil Tang 2/18/2009

9
CS541 Advanced Networking 1 Routing and Shortest Path Routing and Shortest Path Algorithms Algorithms Neil Tang Neil Tang 2/18/2009 2/18/2009

description

Routing and Shortest Path Algorithms Neil Tang 2/18/2009. Outline. Network Model Link and Path Costs Routing Problems Dijkstra’s Shortest Path Algorithm Constrained Shortest Path Algorithms. Network Model. - PowerPoint PPT Presentation

Transcript of Routing and Shortest Path Algorithms Neil Tang 2/18/2009

Page 1: Routing and Shortest Path Algorithms Neil Tang 2/18/2009

CS541 Advanced Networking 1

Routing and Shortest Path AlgorithmsRouting and Shortest Path Algorithms

Neil TangNeil Tang2/18/20092/18/2009

Page 2: Routing and Shortest Path Algorithms Neil Tang 2/18/2009

CS541 Advanced Networking 2

OutlineOutline

Network Model

Link and Path Costs

Routing Problems

Dijkstra’s Shortest Path Algorithm

Constrained Shortest Path Algorithms

Page 3: Routing and Shortest Path Algorithms Neil Tang 2/18/2009

CS541 Advanced Networking 3

Network ModelNetwork 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.

Page 4: Routing and Shortest Path Algorithms Neil Tang 2/18/2009

CS541 Advanced Networking 4

Link and Path Cost 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.

Page 5: Routing and Shortest Path Algorithms Neil Tang 2/18/2009

CS541 Advanced Networking 5

Routing Problems Routing Problems

Basic routing problem: Given a 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: Given a 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.

Page 6: Routing and Shortest Path Algorithms Neil Tang 2/18/2009

CS541 Advanced Networking 6

Dijkstra’s Shortest Path AlgorithmDijkstra’s Shortest Path Algorithm

10

5

0

10

5

2

1

936

8

5

14

0

10

5

2

1

936

7

8

5

13

0

10

5

2

1

936

7

8

5

9

0

10

5

2

1

936

7

8

5

9

0

10

5

2

1

936

7

6

1

0

10

5

2

93

A

B

C

D

E

Time complexity: |E|+|V|log|V|

Page 7: Routing and Shortest Path Algorithms Neil Tang 2/18/2009

CS541 Advanced Networking 7

Typical QoS Routing Problems 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.

Page 8: Routing and Shortest Path Algorithms Neil Tang 2/18/2009

CS541 Advanced Networking 8

Constrained Shortest Path Algorithms Constrained Shortest Path Algorithms

Find a shortest path subject to a bottleneck (e.g., bandwidth) constraint:

ρ= (A,D), Threshold=3

A

B

C

D

(2,4)

(4,4)

(3,2)

(3,4)(5,2)

Page 9: Routing and Shortest Path Algorithms Neil Tang 2/18/2009

CS541 Advanced Networking 9

Constrained Shortest Path Algorithms Constrained Shortest Path Algorithms

Find a shortest path subject to an

additive (e.g., delay) constraint:

ρ= (A,D), Threshold=4

A

B

C

D(2,4)

(4,4)

(3,2)

(3,4)(5,2)

A0

A1

A2

A3

A4

B0

B1

B2

B3

B4

C0

C1

C2

C3

C4

D0

D1

D2

D3

D4

2

23

4

3

4

3

3

3

5

5

5

5

5

5

3

3

3

0

0

0

0