A Fast Incremental Cycle Ratio Algorithm Gang Wu and Chris Chu Iowa State University
Outline • Introduction • Previous Works • Background • Our Proposed Algorithm • Experimental Results • Conclusion 1
Introduction (1/2) • Cycle Ratio Cost a Transit 12,6 6,3 18,3 c b 3,1.5 2,1 d • Maximum Cycle Ratio (MCR) Problem 2
Introduction (1/2) • Cycle Ratio Cost a Transit 12,6 6,3 18,3 c b 3,1.5 2,1 d • Maximum Cycle Ratio (MCR) Problem 3
Introduction (1/2) • Cycle Ratio Cost a Transit 12,6 6,3 18,3 c b 3,1.5 2,1 d • Maximum Cycle Ratio (MCR) Problem 4
Introduction (1/2) • Cycle Ratio Cost a Transit 12,6 6,3 18,3 c b 3,1.5 2,1 d • Maximum Cycle Ratio (MCR) Problem 4
Introduction (2/2) • Applications of MCR Problem: • Timing analysis: • Asynchronous circuits • Synchronous circuits with retiming or clock skew scheduling techniques • Concurrent systems, graph theory, etc. • Incremental MCR Problem • Many optimizations are performed incrementally in EDA applications: • Gate Sizing • Detailed Placement • Faster runtime can be expected by calculating MCR incrementally 5
Previous Works (1/2) • Cannot enumerate all the cycles in large graphs • Total # of cycles is exponential to graph size • Solve as a linear program: • J. Magott, Performance Evaluation of Concurrent Systems using Petri Nets, Information Processing Letters, 1984. • Solve using traditional MCR Algorithms: • Howards algorithm R. A. Howard, Dynamic Programming And Markov Process, The M.I.T Press, 1960. • Karp and Orlin’s algorithm R. M. Karp and J. B. Orlin, Parametric Shortest Path Algorithms with An Application to Cyclic Staffing, Discrete Applied Mathematics, 1981. • Lawler’s algorithm E. L. Lawler, Combinatorial Optimization: Networks and Matroids, Holt, Rinehart and Winston, 1976. 6
Previous Works (2/2) • Most recent study about MCR algorithms • A. Dasdan, Experimental Analysis of The Fastest Optimum Cycle Ratio and Mean Algorithms, TODAES, 2004 • Existing incremental MCR Algorithm • N. Chandrachoodan et al., Adaptive Negative Cycle Detection in Dynamic Graphs, ISCAS 2001 • Based on Lawler’s binary search idea • Only performed experiments on small graphs 7
Background (1/3) • Transfer the MCR problem into positive cycle detecting / longest path tree problem • Original graph: cost(e), transit(e) • New graph: length(e) = cost(e) - 𝛖 * transit(e) Cost a a Length Transition 12,6 6,3 12 - τ *6 6 - τ *3 18,3 18 - τ *3 c b c b 2,1 3,1.5 2 - τ *1 3 - τ *1.5 d d • Interesting features of the transformed graph: • Contains positive length cycles τ < MCR • Contains zero / negative length cycles τ = MCR • Only contains negative length cycles τ > MCR 8
Background (2/3) • Howards algorithm (HOW) Start with a small τ : All cycles have positive length a 12 - τ *6 6 - τ *3 18 - τ *3 c b Find an arbitrary positive length cycle 2 - τ *1 3 - τ *1.5 d Increase τ to make the cycle become zero length 9
Background (2/3) • Howards algorithm (HOW) Start with a small τ : All cycles have 𝛖 = 0 positive length a 12 - 0*6 6 - 0*3 18 - 0*3 c b Find an arbitrary positive length cycle 2 - 0*1 3 - 0*1.5 d Increase τ to make the cycle become zero length 9
Background (2/3) • Howards algorithm (HOW) Start with a small τ : All cycles have 𝛖 = 0 positive length a 12 6 18 c b Find an arbitrary positive length cycle 2 3 d Increase τ to make the cycle become zero length 9
Background (2/3) • Howards algorithm (HOW) Start with a small τ : All cycles have 𝛖 = 0 positive length a 12 6 18 c b Find an arbitrary positive length cycle 2 3 d Increase τ to make the cycle become zero length 9
Background (2/3) • Howards algorithm (HOW) Start with a small τ : All cycles have 𝛖 = 2 positive length a 12 - 2*6 6 - 2*3 18 - 2*3 c b Find an arbitrary positive length cycle 2 - 2*1 3 - 2*1.5 d Increase τ to make the cycle become zero length 9
Background (2/3) • Howards algorithm (HOW) Start with a small τ : All cycles have 𝛖 = 2 positive length a 0 0 12 c b Find an arbitrary positive length cycle 0 0 d Increase τ to make the cycle become zero length 9
Background (2/3) • Howards algorithm (HOW) Start with a small τ : All cycles have 𝛖 = 2 positive length a 0 0 12 c b Find an arbitrary positive length cycle 0 0 d Increase τ to make the cycle become zero length 9
Background (2/3) • Howards algorithm (HOW) Start with a small τ : All cycles have 𝛖 = 3 positive length a -6 -3 9 c b Find an arbitrary positive length cycle -1.5 -1 d Increase τ to make the cycle become zero length 9
Background (2/3) • Howards algorithm (HOW) Start with a small τ : All cycles have 𝛖 = 3 positive length a -6 -3 9 c b Find an arbitrary positive length cycle -1.5 -1 d Increase τ to make the cycle become zero length 9
Background (3/3) • Karp and Orlin’s algorithm (KO) a 12,6 6,3 Add an arbitrary node s 18,3 and a set of edges c b 2,1 3,1.5 d τ 0 = +¥ Update key values in the s (0,0) max heap a c d b (0,1) (0,1) (0,1) (0,1) Update longest path tree 10
Background (3/3) • Karp and Orlin’s algorithm (KO) edge key a (a,b) 2 12,6 6,3 Add an arbitrary node s 18,3 (b,c) 6 and a set of edges c b (c,a) 2 2,1 3,1.5 (b,d) 2 d (d,c) 2 τ 0 = +¥ Update key values in the s (0,0) max heap a c d b (0,1) (0,1) (0,1) (0,1) Update longest path tree 10
Background (3/3) • Karp and Orlin’s algorithm (KO) a 12,6 6,3 18,3 edge key c b (a,b) 2 Add an arbitrary node s 3,1.5 2,1 (b,c) 6 and a set of edges d (c,a) 2 (b,d) 2 (d,c) 2 τ 1 = 6 s (0,0) Update key values in the max heap a d b (0,1) (0,1) (0,1) c (18,4) Update longest path tree 10
Background (3/3) • Karp and Orlin’s algorithm (KO) edge key a (a,b) 2 12,6 6,3 Add an arbitrary node s - ¥ 18,3 (b,c) and a set of edges c b (c,a) 3.3 2,1 3,1.5 (b,d) 2 - ¥ d (d,c) τ 1 = 6 Update key values in the (0,0) s max heap a d b (0,1) (0,1) (0,1) c Update longest path tree (18,4) 10
Background (3/3) • Karp and Orlin’s algorithm (KO) edge key a (a,b) 2 12,6 6,3 Add an arbitrary node s - ¥ 18,3 (b,c) and a set of edges c b (c,a) 3.3 2,1 3,1.5 (b,d) 2 - ¥ d (d,c) τ 2 = 3.3 Update key values in the s (0,0) max heap b d (0,1) (0,1) (18,4) c Update longest path tree a (30,10) 10
Background (3/3) • Karp and Orlin’s algorithm (KO) edge key a (a,b) 3 12,6 6,3 Add an arbitrary node s - ¥ 18,3 (b,c) and a set of edges c b - ¥ (c,a) 2,1 3,1.5 (b,d) 2 - ¥ d (d,c) τ 2 = 3.3 Update key values in the s (0,0) max heap b d (0,1) (0,1) (18,4) c Update longest path tree a (30,10) 10
Background (3/3) • Karp and Orlin’s algorithm (KO) edge key a (a,b) 3 12,6 6,3 Add an arbitrary node s - ¥ 18,3 (b,c) and a set of edges c b - ¥ (c,a) 2,1 3,1.5 (b,d) 2 - ¥ d (d,c) τ 3 = 3 Update key values in the s (0,0) max heap d b (0,1) (0,1) (18,4) c Update longest path tree a (30,10) 10
Our Incremental MCR Algorithm • Considering changes at one node • Input: • Previous maximum cycle ratio ( τ*(G) ). • Previous most critical cycle (c*). • Output: • Cycle ratio and critical cycle after the graph change. • HOW and KO are not suitable to calculate MCR incrementally • The middle information is calculated on transformed graph (G τ ) and is subject to change. • Can only search τ from one direction. • Basic idea of our algorithm: • When MCR is increased, searching new MCR upward, similar to HOW. • When MCR is decreased, searching new MCR downward, similar to KO. 11
Algorithm Overview τ *(G), c* Cycle Detection Global Downward Search Local Upward Search Cost Shifting Transfer G to G v Build/Update Heap Update τ i to τ i+1 Update T Vs Construct T Vs Construct T Vs < 0 N > 0 > 0 Loop? d(v t ) ? d(v t ) ? = 0 Y = 0 τ*(G’), c*’ 12
Algorithm Overview τ *(G), c* Cycle Detection Global Downward Search Local Upward Search Cost Shifting Transfer G to G v Build/Update Heap Update τ i to τ i+1 Update T Vs Construct T Vs Construct T Vs < 0 N > 0 > 0 Loop? d(v t ) ? d(v t ) ? = 0 Y = 0 τ*(G’), c*’ 12
Algorithm Overview τ *(G), c* Cycle Detection Global Downward Search Local Upward Search Cost Shifting Transfer G to G v Build/Update Heap Update τ i to τ i+1 Update T Vs Construct T Vs Construct T Vs < 0 N > 0 > 0 Loop? d(v t ) ? d(v t ) ? = 0 Y = 0 τ*(G’), c*’ 12
Cycle Detection (1/4) Cycle Detection • Cost Shifting • If a decreasing change happens on Cost Shifting non-critical edges, the MCR will not be affected. a Transfer G to G v 12,6 6,3 18,3 c b Construct T Vs 3,1.5 0,1.5 2,1 d < 0 > 0 • Shift the change of the cost to better d(v t ) ? detect the above case: = 0 shift 9 cost from fanout to fanin 13
Recommend
More recommend