Presentation is loading. Please wait.

Presentation is loading. Please wait.

15.082J & 6.855J & ESD.78J Radix Heap Animation

Similar presentations


Presentation on theme: "15.082J & 6.855J & ESD.78J Radix Heap Animation"— Presentation transcript:

1 15.082J & 6.855J & ESD.78J Radix Heap Animation
Obtain a network, and use the same network to illustrate the shortest path problem for communication networks, the max flow problem, the minimum cost flow problem, and the multicommodity flow problem. This will be a very efficient way of introducing the four problems. (Perhaps under 10 minutes of class time.)

2 An Example from AMO (with a small change)
Initialize distance labels 1 2 4 5 3 6 13 8 15 20 9 Initialize buckets and their ranges. Insert nodes into buckets. 1 2-3 4-7 8-15 16-31 32-63 2 3 1 4 5 6

3 Find Min Bucket ∞ Find Min Non-Empty Bucket 1 2 4 5 3 6
13 8 15 20 9 If the bucket has width 1 or a single element then select a node of the bucket. 1 1 2-3 4-7 8-15 16-31 32-63 2 3 1 4 5 6

4 Update ∞ Scan arcs out of node 1. 2 4
13 15 Scan arcs out of node 1. 5 2 4 15 2 13 Update the distance labels and buckets. 1 1 6 20 8 9 3 5 20 1 2-3 4-7 8-15 16-31 32-63 2 3 1 4 5 6

5 Find Min Bucket ∞ Find Min Non-Empty Bucket 2 4
13 15 Find Min Non-Empty Bucket 5 2 4 15 2 13 If the bucket has width 1 or a single element then select a node of the bucket. 1 1 6 20 8 9 3 3 5 20 1 2-3 4-7 8-15 16-31 32-63 3 2 5 4 6

6 Update ∞ Scan arcs out of node 3 and update distances and buckets. 2 4
13 15 Scan arcs out of node 3 and update distances and buckets. 5 2 4 15 2 13 1 1 6 20 8 9 3 3 5 9 20 1 2-3 4-7 8-15 16-31 32-63 3 2 5 4 6

7 Find Min Bucket ∞ 2 4 1 1 6 3 5 Find Min Non-Empty Bucket
13 15 Find Min Non-Empty Bucket 5 2 4 15 2 13 If the bucket has width 1 or a single element then select a node of the bucket. Else, redistribute the range of the bucket. 1 1 6 20 8 9 3 5 9 20 9 1 10 11-12 2-3 13-15 4-7 8-15 16-31 32-63 2 5 4 6

8 Find Min Bucket ∞ 2 4 1 1 6 3 5 5 Find Min Non-Empty Bucket
13 15 Find Min Non-Empty Bucket 5 2 4 15 2 13 If the bucket has width 1 or a single element then select a node of the bucket. 1 1 6 20 8 9 3 5 5 9 20 9 10 1 11-12 2-3 13-15 4-7 8-15 16-31 32-63 2 5 4 6

9 Update ∞ Scan arcs out of node 5 and update distances and buckets. 2 4
13 15 Scan arcs out of node 5 and update distances and buckets. 5 2 4 15 2 13 17 1 1 6 20 8 9 3 5 5 9 20 9 10 1 11-12 2-3 13-15 4-7 8-15 16-31 32-63 2 5 4 6

10 Find Min Bucket 2 4 1 1 6 3 5 Find Min Non-Empty Bucket
13 15 Find Min Non-Empty Bucket 5 2 4 15 2 13 If the bucket has width 1 or a single element then select a node of the bucket. Else, redistribute the range of the bucket. 17 1 1 6 20 8 9 3 5 20 9 9 13 10 1 14 11-12 15 2-3 13-15 4-7 8-15 16-31 32-63 2 6 4

11 Find Min Bucket 2 2 4 1 1 6 3 5 Find Min Non-Empty Bucket
13 15 Find Min Non-Empty Bucket 5 2 2 4 15 2 13 If the bucket has width 1 or a single element then select a node of the bucket. 17 1 1 6 20 8 9 3 5 9 20 9 13 14 10 1 11-12 15 2-3 13-15 4-7 8-15 16-31 32-63 2 6 4

12 Update Scan arcs out of node 5 and update distances and buckets. 2 2 4
13 15 Scan arcs out of node 5 and update distances and buckets. 5 2 2 4 15 2 13 17 1 1 6 20 8 9 3 5 20 9 9 13 10 1 14 11-12 15 2-3 13-15 4-7 8-15 16-31 32-63 2 6 4

13 Find Min Bucket 2 4 4 1 1 6 3 5 Find Min Non-Empty Bucket
13 15 Find Min Non-Empty Bucket 5 2 4 4 15 2 13 If the bucket has width 1 or a single element then select a node of the bucket. 17 1 1 6 20 8 9 3 5 20 9 13 9 14 1 10 15 11-12 2-3 13-15 4-7 8-15 16-31 32-63 6 4

14 Update Scan arcs out of node 4 and update distances and buckets. 2 4 4
13 15 Scan arcs out of node 4 and update distances and buckets. 5 2 4 4 15 2 13 17 1 1 6 20 8 9 3 5 9 20 13 9 1 14 10 15 11-12 2-3 13-15 4-7 8-15 16-31 32-63 6 4

15 Find Min Bucket 2 4 1 1 6 6 3 5 Find Min Non-Empty Bucket
13 15 Find Min Non-Empty Bucket 5 2 4 15 2 13 If the bucket has width 1 or a single element then select a node of the bucket. 17 1 1 6 6 20 8 9 3 5 9 20 9 13 14 1 10 15 11-12 2-3 13-15 4-7 8-15 16-31 32-63 6

16 Update Scan arcs out of node 4 and update distances and buckets. 2 4 1
13 15 Scan arcs out of node 4 and update distances and buckets. 5 2 4 15 2 13 17 1 1 6 6 20 8 9 3 5 20 9 9 13 14 1 10 11-12 15 2-3 13-15 4-7 8-15 16-31 32-63 6

17 Termination 13 15 All nodes are permanently labeled. The algorithm terminates 5 2 4 15 2 13 17 1 1 6 20 8 9 3 5 20 9 13 9 10 1 14 11-12 15 2-3 13-15 4-7 8-15 16-31 32-63

18 15.082J / 6.855J / ESD.78J Network Optimization
MITOpenCourseWare 15.082J / 6.855J / ESD.78J Network Optimization Fall 2010 For information about citing these materials or our Terms of Use, visit:


Download ppt "15.082J & 6.855J & ESD.78J Radix Heap Animation"

Similar presentations


Ads by Google