today rules for school maximum weight matching
play

Today Rules for School... Maximum Weight Matching. or...Rules for - PowerPoint PPT Presentation

Today Rules for School... Maximum Weight Matching. or...Rules for taking duals Bipartite Graph G = ( V , E ) , w : E Z . Canonical Form. Find maximum weight perfect matching. Solution: x e indicates whether edge e is in matching.


  1. Today Rules for School... Maximum Weight Matching. or...”Rules for taking duals” Bipartite Graph G = ( V , E ) , w : E → Z . Canonical Form. Find maximum weight perfect matching. Solution: x e indicates whether edge e is in matching. Primal LP Dual LP max ∑ w e x e min y T b max c · x e ∀ v : ∑ y T A ≥ c x e = 1 p v Quickly: Matrix View, Taking Dual. Ax ≤ b e =( u , v ) x ≥ 0 y ≥ 0 Matching, algebra, geometry. x e ≥ 0 Dual. Facility Location. Standard: Variable for each constraint. p v unrestricted. Ax ≤ b , max cx , x ≥ 0 ↔ y T A ≥ c , min by , y ≥ 0. Constraint for each variable. Edge e , p u + p v ≥ w e Objective function from right hand side. min ∑ v p v min ↔ max min ∑ v p v ≥↔≤ ∀ e = ( u , v ) : p u + p v ≥ w e “inequalities” ↔ “nonnegative variables” Weak duality? Price function upper bounds matching. “nonnegative variables” ↔ “inequalities” ∑ e ∈ M w e x e ≤ ∑ e =( u , v ) ∈ M p u + p v ≤ ∑ v p u . Another useful trick: Equality constraints. “equalities” ↔ Strong Duality? Same value solutions. Hungarian algorithm !!! “unrestricted variables.” Matrix View. Complementary Slackness. Multicommodity Flow. x e variable for e = ( u , v ) . Given G = ( V , E ) , and capacity function c : E → Z , and pairs x e rhs ( s 1 , t 1 ) ,..., ( s k , t k ) with demands d 1 ,..., d k . · ··· 0 ··· 1 max ∑ w e x e Route D i flow for each s i , t i pair, so every edge has ≤ µ c ( e ) flow with . . . . . . . . e . . . . 1 minimum µ . ∀ v : ∑ x e = 1 p v · ··· ··· p u 1 1 variables: f p flow on path p . e =( u , v ) · ··· 0 ··· 1 P i -set of paths with endpoints s i , t i . . . . . x e ≥ 0 . . . . . . . . 1 · ··· 0 ··· 1 p v · ··· 1 ··· 1 min µ · ··· 0 ··· 1 ∀ e : ∑ Dual: f p ≤ µ c e . . . . . . . . . . . . 1 min ∑ v p v p ∋ e ∀ i : ∑ ∀ e = ( u , v ) : p u + p v ≥ w e obj · · w e · f p = D i p ∈ P i Complementary slackness: Row equation: ∑ e =( u , v ) x e = 1. Row (dual) variable: p u . f p ≥ 0 Only match on tight edges. Column variable: x e . Column (dual) constraint: p u + p v ≥ 1 . Nonzero p u on matched u . Exercise: objectives?

  2. Take the dual. Dual. Matrix View min µ f p variable for path e 1 , e 2 ,..., e k . p connects s i , t i . ∀ e : µ c e − ∑ f p ≥ 0 d e f p µ rhs p ∋ e min µ · ··· 0 ··· · 0 ∀ i : ∑ f p = D i d i ∀ e : ∑ . . . . . f p ≤ µ c e . . . . . p ∈ P i . . . . . 0 p ∋ e d e 1 · ··· -1 ··· c e 1 0 f p ≥ 0 ∀ i : ∑ f p = D i . . . . . Introduce variable for each constraint. . . . . . . . . . . 0 p ∈ P i Introduce constraint for each var: · ··· ··· d e 2 -1 c e 2 0 f p ≥ 0 µ → ∑ e c e d e = 1. f p → ∀ p ∈ P i d i − ∑ e ∈ p d e ≤ 0 . . . . . . . . . . . Objective: right hand sides. max ∑ i D i d i . . . . . 0 Modify to make it ≥ , which “go with min. d e k · ··· -1 ··· c e k 0 And only constants on right hand side. max ∑ . . . . . D i d i . . . . . . . . . . 0 i d i · · 1 · ··· D i ∀ p ∈ P i : d i ≤ ∑ ∑ d ( e ) c e d e = 1 min µ obj 1 1 1 1 e ∈ p e ∀ e : µ c e − ∑ f p ≥ 0 Row constraint: c e µ − ∑ p ∋ e f p ≥ 0. Row (dual) variable: d e . d i - shortest s i , t i path length. Toll problem! p ∋ e Row constraint: ∑ p ∈ P i f p = D i . Row (dual) variable: d i . Weak duality: toll lower bounds routing. ∀ i : ∑ f p = D i Strong Duality. Tight lower bound. First lecture. Or Experts. Column variable: f p . Column (dual) constraint: d i − ∑ e ∈ p d e ≤ 0. p ∈ P i Complementary Slackness: only route on shortest paths f p ≥ 0 Column variable: µ . Column (dual) constraint: ∑ e d ( e ) c ( e ) = 1 . only have toll on congested edges. Exercise: objectives? Exponential size. Maximum matching and simplex. Facility location Multicommodity flow. min µ ∀ e : µ c e − ∑ f p ≥ 0 max x + y + z Set of facilities: F , opening cost f i for facility i p ∋ e x ≤ 1 ∀ i : ∑ z Set of clients: D . f p = d i x + z ≤ 1 a = 1 p ∈ P i X d ij - distance between i and j . z + y ≤ 1 b = 1 f p ≥ 0 (notation abuse: clients/facility confusion.) . 7 . 3 x 0 0 0 1 0 X 0 1 y ≤ 1 Dual is. Triangle inequality: d ij ≤ d ik + d kj . X X . 3 . 7 . 3 . 7 z 0 0 max ∑ 1 D i d i x ≥ 0 X 1 0 i y ≥ 0 X y . 7 . 3 0 0 1 0 0 ∀ p ∈ P i : d i ≤ ∑ d ( e ) y z ≥ 0 c = 1 e ∈ p X x Exponential sized programs? Blue constraints redundant. Blue constraints intersect. Blue constraints tight. Answer 1: We solved anyway! Answer 2: Ellipsoid algorithm. Sum: x + 2 z + y . Find violated constraint → poly time algorithm. + 1 − 1 + 1 Answer 3: there is polynomial sized formulation. Augmenting Path. Via Gaussian Elimination! Question: what is it?

  3. Facility Location Integer Solution? Round solution? Linear program relaxation: “Decision Variables”. min ∑ y i f i + ∑ x ij d ij min ∑ y i f i + ∑ y i - facility i open? x ij d ij i ∈ F i ∈ F , j ∈ D x ij - client j assigned to facility i . i ∈ F i ∈ F , j ∈ D ∀ j ∈ D ∑ x ij ≥ 1 ∀ j ∈ D ∑ x ij ≥ 1 i ∈ F i ∈ F ∀ i ∈ F , j ∈ D x ij ≤ y i , min ∑ y i f i + ∑ x ij d ij ∀ i ∈ F , j ∈ D x ij ≤ y i , i ∈ F i ∈ F , j ∈ D x ij , y i ≥ 0 x ij , y i ≥ 0 ∀ j ∈ D ∑ x ij ≥ 1 i ∈ F x ij = 1 2 edges. Round independently? 1 ∀ i ∈ F , j ∈ D x ij ≤ y i , y i = 1 2 edges. y i and x ij separately? Assign to closed facility! x ij , y i ≥ 0 client Facility Cost: 3 2 Connection Cost: 3 Round x ij and open facilities? Any one Facility: Facility opening cost. Different clients force different facilities open. Facility Cost: 1 Client Cost: 3 . 7 Client Connnection cost. facility Make it worse? Sure. Not as pretty! Must connect each client. Any ideas? Only connect to open facility. Use Dual! The dual. Interpretation of Dual? Use Dual. min cx , Ax ≥ b ↔ max bx , y T A ≤ c . max ∑ α j min ∑ y i f i + ∑ x ij d ij j i ∈ F i ∈ F , j ∈ D ∑ ∀ i ∈ F β ij ≤ f i ∀ j ∈ D ∑ x ij ≥ 1 min ∑ y i f i + ∑ j ∈ D x ij d ij i ∈ F 1. Find solution to primal, ( x , y ) . and dual, ( α , β ) . i ∈ F i ∈ F , j ∈ D ∀ i ∈ F , j ∈ D α j − β ij ≤ d ij x ij ∀ i ∈ F , j ∈ D x ij ≤ y i , ∀ j ∈ D ∑ x ij ≥ 1 α j , β ij ≤ 0 2. For smallest (remaining) α j , x ij , y i ≥ 0 i ∈ F (a) Let N j = { i : x ij > 0 } . ∀ i ∈ F , j ∈ D x ij ≤ y i , α j charge to client. (b) Open cheapest facility i in N j . Every client j ′ with N j ′ ∩ N j � = / maximize price paid by client to α j ′ 0 assigned to i . connect! α j 3. Removed assigned clients, goto 2. min ∑ y i f i + ∑ j ′ Objective: ∑ j α j total payment. max ∑ α j x ij d ij β ij i ′ β i ′ j Client j travels or pays to open facility i . j i ∈ F i ∈ F , j ∈ D ∀ j ∈ D ∑ Costs client d ij to get to there. i ∑ j ∀ i β ij ≤ f i ; y i β i ′ j ′ x ij ≥ 1 ; α j Savings is α j − d ij . j ∈ D i ∈ F Willing to pay β ij = α j − d ij . ∀ i ∈ F , j ∈ D y i − x ij ≥ 0 ; β ij ∀ i ∈ F , j ∈ D α i − β ij ≤ d ij ; x ij Total payment to facility i at most f i before opening. x ij , y i ≥ 0 β ij , α j ≥ 0 Complementary slackness: x ij ≥ 0 if and only if α j ≥ d ij . only assign client to “paid to” facilities.

Recommend


More recommend