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

Slides:



Advertisements
Similar presentations
and 6.855J Cycle Canceling Algorithm. 2 A minimum cost flow problem , $4 20, $1 20, $2 25, $2 25, $5 20, $6 30, $
Advertisements

and 6.855J Dijkstras Algorithm with simple buckets (also known as Dials algorithm)
and 6.855J Modified Label Correcting Algorithm.
15.082J & 6.855J & ESD.78J Shortest Paths 2: Bucket implementations of Dijkstra’s Algorithm R-Heaps.
and 6.855J February 25, 2003 Radix Heap Animation.
Lecture 6 Shortest Path Problem. s t Dynamic Programming.
Management Science 461 Lecture 2b – Shortest Paths September 16, 2008.
& 6.855J & ESD.78J Algorithm visualizations Modified Label Correcting Algorithm.
15.082J, 6.855J, and ESD.78J September 21, 2010 Eulerian Walks Flow Decomposition and Transformations.
and 6.855J The Capacity Scaling Algorithm.
15.082J & 6.855J & ESD.78J September 23, 2010 Dijkstra’s Algorithm for the Shortest Path Problem.
& 6.855J & ESD.78J Algorithm Visualization The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem.
The Ford-Fulkerson Augmenting Path Algorithm for the Maximum Flow Problem Thanks to Jim Orlin & MIT OCW.
and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem.
15.082J & 6.855J & ESD.78J September 30, 2010 The Label Correcting Algorithm.
EMIS 8374 The Ford-Fulkerson Algorithm (aka the labeling algorithm) Updated 4 March 2008.
15.082J and 6.855J and ESD.78J Network Simplex Animations.
Cycle Canceling Algorithm
Network Optimization J.B. Orlin
Shortest Paths CONTENTS Introduction to Shortest Paths (Section 4.1)
Network Simplex Animations
EMIS 8374 Dijkstra’s Algorithm Updated 18 February 2008
Dijkstra’s Algorithm with two levels of buckets
Party-by-Night Problem
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Introduction to Maximum Flows
Introduction to Maximum Flows
15.082J & 6.855J & ESD.78J Visualizations
Dijkstra’s Algorithm for the Shortest Path Problem
15.082J & 6.855J & ESD.78J Visualizations
Lecture 6 Shortest Path Problem.
Dijkstra’s Algorithm for the Shortest Path Problem
Breadth first search animation
Lecture 4 Graph Search.
Lecture 19-Problem Solving 4 Incremental Method
Introduction to Minimum Cost Flows
Spanning Tree Algorithms
and 6.855J Flow Decomposition
Primal-Dual Algorithm
Successive Shortest Path Algorithm
Successive Shortest Path Algorithm
and 6.855J March 6, 2003 Maximum Flows 2
Network Optimization Depth First Search
Introduction to Algorithms
Min Global Cut Animation
Network Optimization Flow Decomposition.
Dijkstra’s Algorithm for Shortest Paths
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Reading before Lecture 13
The Shortest Augmenting Path Algorithm for the Maximum Flow Problem
Network Optimization Topological Ordering
and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem Obtain a network, and use the same network to illustrate the.
and 6.855J Dijkstra’s Algorithm
Visualizations Dijkstra’s Algorithm
Introduction to Maximum Flows
Network Simplex Animations
and 6.855J The Goldberg-Tarjan Preflow Push Algorithm for the Maximum Flow Problem Obtain a network, and use the same network to illustrate the.
Eulerian Cycles in directed graphs
and 6.855J Topological Ordering
15.082J & 6.855J & ESD.78J Visualizations
Implementation of Dijkstra’s Algorithm
The Minimum Cost Spanning Tree Problem
and 6.855J Depth First Search
Dijkstra Algorithm examples
Breadth first search animation
OPIM 915 Fall 2010 Data Structures 23-38,
Introduction to Maximum Flows
Max Flows 3 Preflow-Push Algorithms
Class 11 Max Flows Obtain a network, and use the same network to illustrate the shortest path problem for communication networks, the max flow.
15.082J & 6.855J & ESD.78J Visualizations
Presentation transcript:

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.)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

15.082J / 6.855J / ESD.78J Network Optimization 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.