Circulations with demands G = ( V , E ) . − 3 ∀ v ∈ V there is a demand d v : 3 3 Part I ◮ d v > 0 : sink requiring d v flow into this node. 2 2 − 3 ◮ d v < 0 : source with Circulations with demands 2 − d v units of flow 2 leaving it. 4 ◮ d v = 0 : regular node. S set of source vertices T : set of sink vertices. A circulation with demands: example Definition: Circulation with demands A valid circulation for the given instance Definition circulation with demands { d v } is a function R + : f : E ( G ) → I − 3 ◮ Capacity condition: ∀ e ∈ E we have f ( e ) ≤ c ( e ) . 2 / ◮ Conservation condition: ∀ v ∈ V we have 1 / 3 3 f in ( v ) − f out ( v ) = d v . 2 / Where: 2 2 − 3 1. f in ( v ) flow into v . 2 / 2 2. f out ( v ) : flow out of v . 2 / 2 Problem 4 Is there a circulation that comply with the demand requirements?
Feasible circulation lemma Computing circulations ∃ feasible circulation only if Lemma If there is a feasible circulation with demands { d v } , then � � D = d v = − d v . v d v = 0 . � v , d v > 0 v , d v < 0 Proof. Algorithm for computing circulation Since it is a circulation, we have that d v = f in ( v ) − f out ( v ) . v f in ( v ) − � v f out ( v ) . Summing over all vertices: � v d v = � (A) G = ( V , E ) : input flow network with demands on The flow on every edge is summed twice, one with positive vertices. (B) Check D = v , d v > 0 d v = v , d v < 0 − d v . sign, one with negative sign. As such, � � (C) Create super source s . Connect to all v with d v < 0 . Set f in ( v ) − f out ( v ) = 0 , � � � d v = capacity ( s → v ) to − d v . v v v (D) Create super sink t . Connect to all vertices u with d u > 0 . Set capacity ( u → t ) to d u . which implies the claim. (E) H : new network flow. Compute max-flow f in H from s to t . (F) If | f | = D = ⇒ ∃ valid circulation. Easy to recover. Result: Circulations with demands Theorem ∃ feasible circulation with demands { d v } in G ⇐ ⇒ Part II max-flow in H has value D . Integrality : If all capacities and demands in G are integers, and there is a feasible circulation, then there is a feasible Circulations with demands and circulation that is integer valued. lower bounds
Circulations with demands and lower bounds Circulations with demands and lower bounds 1. circulation and demands + for each edge a lower bound Lemma on flow. ∃ feasible circulation in G ⇐ ⇒ there is a feasible circulation 2. ∀ e ∈ E ( G ) : ℓ ( e ) ≤ c ( e ) . in G ′ . 3. Compute f such that ∀ e ℓ ( e ) ≤ f ( e ) ≤ c ( e ) . Integrality : If all numbers are integers = ⇒ ∃ integral 4. Be stupid! Consider flow: ∀ e f 0 ( e ) = ℓ ( e ) . feasible circulation. 5. f 0 violates conservation of flow! Proof. L v = f in 0 ( v ) − f out � � Let f ′ be a circulation in G ′ . Let f ( e ) = f 0 ( e ) + f ′ ( e ) . ( v ) = ℓ ( e ) − ℓ ( e ) . 0 e into v e out of v Clearly, f satisfies the capacity condition in G , and the lower 6. If L v = d v , then no problem. bounds. d ′ 7. Fix-up demand: ∀ v v = d v − L v . f in ( v ) − f out ( v ) = � e into v ( ℓ ( e ) + f ′ ( e )) − Fix-up capacity: c ′ ( e ) = c ( e ) − ℓ ( e ) . e out of v ( ℓ ( e ) + f ′ ( e )) = L v +( d v − L v ) = d v . � 8. G ′ : new network w. new demands/capacities (no lower f : valid circulation in G . Then f ′ ( e ) = f ( e ) − ℓ ( e ) is a valid circulation for G ′ . bounds!) 9. Compute circulation f ′ on G ′ . ⇒ The flow f = f 0 + f ′ , is a legal circulation, = Survey design 1. Ask “Consumer i : what did you think of product j ?” 2. i th consumer willing to answer between c i to c ′ i questions. 3. For each product j : at least p j opinions, no more than p ′ Part III j opinions. 4. Full knowledge which consumers can be asked on which products. Applications 5. Problem: How to assign questions to consumers?
Survey design... Result... Products Products Consumers Consumers 0 , 1 Lemma c i , c ′ p j , p ′ Given n consumers and u products with their constraints i j c 1 , c ′ 1 , c 2 , c ′ 2 , . . . , c n , c ′ n , p 1 , p ′ 1 , . . . , p u , p ′ u and a list of s t length m of which products where used by which consumers. An algorithm can compute a valid survey under these constraints, if such a survey exists, in time O (( n + u ) m 2 ) .
Recommend
More recommend