1 / 18

15.082J & 6.855J & ESD.78J

15.082J & 6.855J & ESD.78J. Radix Heap Animation. ∞. ∞. 5. 2. 4. 15. 2. 13. 0. ∞. 1. 6. 20. 0. 8. 9. 3. 5. ∞. ∞. ∞. An Example from AMO (with a small change). Initialize distance labels. Initialize buckets and their ranges. Insert nodes into buckets. 2-3. 4-7. 8-15.

mqualls
Download Presentation

15.082J & 6.855J & ESD.78J

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

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

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

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

  5. Find Min 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. 0 ∞ 1 1 6 20 0 8 9 3 3 5 ∞ ∞ 0 20 2-3 4-7 8-15 16-31 32-63 0 1 3 2 5 4 6

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

  7. Find Min 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. 0 ∞ 1 1 6 20 0 8 9 3 5 ∞ 0 20 9 9 10 11-12 2-3 13-15 4-7 8-15 16-31 32-63 0 1 2 5 4 6

  8. Find Min 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. 0 ∞ 1 1 6 20 0 8 9 5 3 5 ∞ 0 20 9 9 10 11-12 2-3 13-15 4-7 8-15 16-31 32-63 0 1 2 5 4 6

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

  10. Find Min 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 0 ∞ 1 1 6 20 0 8 9 3 5 ∞ 0 9 20 9 13 10 14 15 11-12 2-3 13-15 4-7 8-15 16-31 32-63 0 1 2 6 4

  11. Find Min 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 0 ∞ 1 1 6 20 0 8 9 3 5 ∞ 0 9 20 13 9 14 10 15 11-12 2-3 13-15 4-7 8-15 16-31 32-63 0 1 2 6 4

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

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

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

  15. Find Min 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 0 ∞ 6 1 1 6 20 0 8 9 3 5 ∞ 0 9 20 9 13 10 14 11-12 15 2-3 13-15 4-7 8-15 16-31 32-63 0 1 6

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

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

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

More Related