16_flow_mincost - Chapter 16 Network Flow V - Min-cost flow...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 16 Network Flow V - Min-cost flow By Sariel Har-Peled , October 19, 2007 Version: 1.01 16.1 Minimum Average Cost Cycle Let G = ( V , E ) be a digraph (i.e., a directed graph) with n vertices and m edges, and : E IR be a weight function on the edges. A directed cycle is closed walk C = ( v , v 1 , . . . , v t ), where v t = v and ( v i v i + 1 ) E , for i = , . . . , t- 1. The average cost of a directed cycle is AvgCost( C ) = ( C ) / t = ( e C ( e ) ) / t . For each k = , 1 , . . . , and v V , let d k ( v ) denote the minimum length of a walk with exactly k edges, ending at v . So, for each v , we have d ( v ) = and d k + 1 ( v ) = min e = ( u v ) E d k ( u ) + ( e ) . Thus, we can compute d i ( v ), for i = , . . . , n and v V ( G ) in O ( nm ) time using dynamic program- ming. Let AvgCost min ( G ) = min C is a cycle in G AvgCost( C ) denote the average cost of the minimum average cost cycle in G . The following theorem is somewhat surprising. Theorem 16.1.1 The minimum average cost of a directed cycle in G is equal to = min v V n- 1 max k = d n ( v )- d k ( v ) n- k . Namely, = AvgCost min ( G ) . Proof: Note, that adding a quantity r to the weight of every edge of G increases the average cost of a cycle AvgCost( C ) by r . Similarly, would also increase by r . In particular, we can assume that the price of the minimum average cost cycle is zero. This implies that now all cycles have non-negative (average) cost. This work is licensed under the Creative Commons Attribution-Noncommercial 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. 1 v Figure 16.1: Decomposing P n into a path and a cycle . Assume, that is realized by a vertex v . Let P n be a walk with n edges ending at v , of length d n ( v ). Since there are n vertices in G , it must be that P n must contain a cycle. So, let us decompose P n into a cycle of length n- k and a path of length k ( k depends on the length of the cycle in P n ). We have that d n ( v ) = ( P n ) = ( ) + ( ) ( ) d k ( v ) , since ( ) 0 as is a cycle. As such, we have d n ( v )- d k ( v ) 0. Let ( v ) = n- 1 max j = d n ( v )- d j ( v ) n- j d n ( v )- d k ( v ) n- k . Now, = min v ( v ) 0. v w C Next, we prove that 0. Let C = ( v , v 1 , . . . , v t ) be the directed cycle of weight 0 in the graph. Observe, that min j = d j ( v ) must be realized by an index r < n , since if it is longer, we can always shorten it by removing cycles and improve its price (since cycles have non- negative price). Let denote this walk of length r ending at v . Let w be a vertex on C reached by walking n- r edges on C starting from v , and let denote this walk (i.e., | | = n- r ). We have that d n ( w...
View Full Document

This note was uploaded on 06/14/2009 for the course CS 473 taught by Professor Viswanathan during the Fall '08 term at University of Illinois at Urbana–Champaign.

Page1 / 10

16_flow_mincost - Chapter 16 Network Flow V - Min-cost flow...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online