
Total Unimodularity Matching Problem Discrete Optimization 2010 Lecture 6 Total Unimodularity & Matchings Marc Uetz University of Twente [email protected] Lecture 6: sheet 1 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Outline 1 Total Unimodularity 2 Matching Problem Lecture 6: sheet 2 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Question Under what conditions on A and b is it true that all vertices of n P = fx 2 R j Ax ≤ b; x ≥ 0g happen to be integer? Answer: If A is totally unimodular, and b integer Lecture 6: sheet 3 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem (Totally) Unimodular Matrices Definition n×n 1 An integer square matrix B 2 Z is unimodular if det(B) = ±1 m×n 2 An integer matrix A 2 Z is totally unimodular (TU) if each square submatrix B of A has det(B) 2 f0; ±1g. Some easy facts: entries of a TU matrix are f0; ±1g by definition (1 × 1 submatrices) if A is TU, adding or deleting a row or column vector (0;:::; 1;:::; 0), the result is again TU if A is TU, multiplying any row/column by −1, the result is again TU Lecture 6: sheet 4 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Motivation n If all vertices of fx 2 R j Ax ≤ b; x ≥ 0g are integer, for any c the linear program max ct x s.t. Ax ≤ b; x ≥ 0 (if not infeasible or unbounded) has an integer optimal solution as the set of optimal solutions of P is a face of fx j Ax ≤ b; x ≥ 0g In that case, we can even solve integer linear programming problems by solving an LP only (say with Simplex), because an optimum solution (if it exists) also occurs at a vertex which happens to be integer. Lecture 6: sheet 5 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Integrality of Linear Equality Systems Theorem Let B be an integer square matrix that is nonsingular (that is, det(B) 6= 0), consider system Bx = b. Then x is integer for any integer right-hand-side b if and only if B is unimodular. "if" x = B−1b, and by Cramer's rule (Linear Algebra): det(Bj ) x = j det(B) with Bj = B, but with jth column of B replaced by b "only if" x = B−1b integer for all b, also for bt = (0;:::; 1;:::; 0) such an x exactly equals a column of B−1 so all columns of B−1 are integer, and so is det(B−1) but det(B) det(B−1) = 1, both integer, so both are ±1 Lecture 6: sheet 6 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem TU Matrices and Integrality m×n m Define for A 2 R , b 2 R n P(A) = fx 2 R j Ax ≤ b; x ≥ 0g Theorem If A is TU and b integer, then P(A) has integer vertices only. Lecture 6: sheet 7 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Proof n P(A) = fx 2 R j Ax ≤ b; x ≥ 0g If P(A) = ; nothing to prove. We write A b A P(A) = fx j x ≤ g. As A is TU, so is . −E 0 −E A vertex x of P(A) exists (see Exercise), and is defined by n linearly independent inequalities of this system, so by Aox = bo for A b non-singular subsystem Ao; bo of x ≤ . −E 0 As Ao non-singular and TU, det(Ao) = ±1, so x = (Ao)−1bo is integer. Lecture 6: sheet 8 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem The whole story: Hoffman-Kruskal Theorem n P(A) = fx 2 R j Ax ≤ b; x ≥ 0g We proved sufficiency: Theorem If A is TU and b integer, then P(A) has integer vertices only. It also holds necessity (see Literature, Theorem 6.25): Theorem If P(A) has integer vertices for all integer b, then A is totally unimodular. Lecture 6: sheet 9 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Sufficient Condition Total Unimodularity Theorem A matrix A is totally unimodular if no more than 2 nonzeros are in each column, and if the rows can be partitioned into two sets I1 and I2 such that 1 If a column has two entries of the same sign, their rows are in different sets of the partition 2 If a column has two entries of different sign, their rows are in the same set of the partition Proof: By induction on the size of the square submatrices Lecture 6: sheet 10 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Sufficient Condition Total Unimodularity!"#$%&' !! !" Lecture 6: sheet 11 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Minimum Cost Flows Theorem The node-arc incidence matrix of any directed graph G = (V ; E) is totally unimodular. Proof: Rows have one +1 and one −1, so take I1 = V , I2 = ; Consequence The linear program for Min-Cost Flow always has integer optimal solutions, as long as capacities uij and balances b(i) are integer. The dual linear program always has integer optimal solution, as long as the costs cij are integer. Lecture 6: sheet 12 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Outline 1 Total Unimodularity 2 Matching Problem Lecture 6: sheet 13 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem The Matching Problem !"#$%$&$'%( Definition !"#$%$&$'%()*)+,&-.$%/)0! 1)$%),%)2%3$4"-&"3)/4,5.)6789:1;) A matching in an undirected graph G = (V ; E) is a set M ⊆ E of $<),)<"&)'#)3$<='$%&)"3/"<>pairwise non-incident edges. !"#$%$&$'%()*)Given an undirected+,?$+,@)+,&-.$%/ graph G = (V ; E),0)$<)'%")<2-.)&.,&)0 a maximum matching is "A"B)$<) %'&),)+,&-.$%/)#'4),@@)"one with maximal cardinality.# 1C0>)*)Perfect matching:+,?$+2+)+,&-.$%/jMj = jV j=2 $<),) +,&-.$%/)'#)+,?$+2+)-,43$%,@$&D +,?$+,@ +,?$+,@)E)+,?$+2+ Lecture!"#$%$&$'%()*)+,&-.$%/)0 6: sheet 14 / 29 Marc Uetz ! 1)$<),)Discrete Optimization5"4#"-&)+,&-.$%/ $#),@@) F"4&$-"<),4")$%-$3"%&)&'),%)"3/")"# 0> !"#$%&"&'()$&*+",-(.%/01'2 ! !"#$%&%' ()*+$%)(&,%+&%- ! %' .%"#$/(")"$(&01/&,%&$234,%5$ ! 6,34&()*+$%)&5"#$(&,&/,%7Total Unimodularity Matching Problem"%5&10&)4$&.%"#$/(")"$( Special Case: Bipartite Matching ! 1%&,&(3,8$&'&9)1:;&*:&)1&%- 9<1))1=; ! >/1<8$=?&Special Case Matching in bipartite graphs G = (V ; V ; E), where E ⊆ V × V . @ A"%+&,&=,)34"%5 10&()*+$%)(&)1&.%"#$/(")"1 2 $(&(*34&)4,)&$#$/B<1+B&"(&1 2 =,)34$+C&=,7"%5&)4$&D418$&($)&10&()*+$%)(&,(&4,::B&,(&:1(("<8$ ()*+$%)( .%"#$/(")"$( V1 V2 Lecture 6: sheet 15 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Bipartite Graphs Theorem Graph G = (V ; E) is bipartite if and only if G contains no odd cycle. Proof: (w.l.o.g. assume G connected) Necessity: Trivially, a bipartite graph has no odd cycle. Sufficiency: Given G with no odd cycle. Pick vo 2 V . Define V1 = fv 2 V j dist(vo; v) eveng V2 = fv 2 V j dist(vo; v) oddg Then V1 [ V2 = V is a bipartition with no edges within V1, V2. Lecture 6: sheet 16 / 29 Marc Uetz Discrete Optimization !"#$%&'()*+(,-&#%./0)1"/&$)234"/ Total Unimodularity Matching Problem ! !"#$%&'()&&*+',%(-)"./#0 Matching!.,).'1"./'2'3' Algorithms:!4 Basic Ideas 56'%-7(',6',7'&*(&'8,7'9&',**&*'.-'2:',**'".4 ;)"<",%'-96&)<,."-70'5%1,+6'+"&%*6','#,="#,%'#,.8/"7(4 matchings are an independence system but no matroid greedy algorithm yields maximal matching, but needn't be >)-9maximum%&#0'#"(/.'(&.'6.?8@'1"./' #,.8/"7( ./,.'"67A.'#,="#?#0 for M = maximal matching, and M∗ = maximum matching, 1 ∗ jMj ≥ 2 jM j (Exercise) ! B*&,0 Idea for!.,).'1"./'6-#&'#,="#, matching algorithm: Start%'#,.8/"7('C6&&',9-<&D with maximal matching, look for augmenting56'%-7(',6' paths,%.&)7,."7(',?(#&7."7(''$,./6 8,7'9&'E-?7*:'"#$)-<&0 "2 E)&& !2 "2 !2 !2 "2 "2 !2 E)&& !2 "2 Lecture 6: sheet 17 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Alternating & Augmenting Paths !"#$%&'#(&)*'+),$&#(&)-.'#/0 !"#$%&!#'&() !M "M !M "M !M "M !*(+$&#'&() "M !M "M !M "M free free !M "M !M "M !M ,-.$%/!#'0&)12&1!*(+$&#'&(13!#41+*.#14!/$10551"$&(#46 Lecture 6: sheet 18 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Alternating Path Theorem Observation: Let M be a matching of G = (V ; E), and let P be an augmenting path (for M), then M ⊕ P is a matching with one edge more. M ⊕ P = M [ P n M \ P Theorem (Berge 1957) M is a maximum matching if and only if there are no augmenting alternating paths (for M). Proof: Necessity is clear, sufficiency: Assume matching M0 larger than M and consider M ⊕ M0. Show that this contains an augmenting alternating path for M. (see page 129, reader) Lecture 6: sheet 19 / 29 Marc Uetz Discrete Optimization Total!"#$%&%'($)"*+$+,'!"+-.$/0'12'!"#$%&%'3456 Unimodularity Matching Problem Maximum Bipartite Matching and Maximum Flow v1 w1 v1 w1 v2 w2 v2 w2 s v3 w3 t v3 w3 v4 w4 v4 w4 v5 w5 v5 w5 !""#$!%!$&'&()#(*+!"#, Lecture 6: sheet 20 / 29 Marc Uetz Discrete Optimization Total Unimodularity Matching Problem Maximum Bipartite Matching and Maximum Flow Augmenting Path Algorithm for MaxFlow Flow values are either 0 or 1 flow 1 on (v; w) , edge fv; wg 2 M any feasible flow yields matching (why?) flow value v = size of the matching jMj Computation!"#$"#%&'(%)*#+"#%&,-+./0&1"2-3+"+*&43-2./ time O( v(n + m)) 2 O( nm ) !"#$%&'(%)*+,%)*$$%-.%/01%)*+,%"22%345+6$7.%+528% v1 w1 ,"19:;5<%$6<$%,"8%/$%07$6%1+%9+51;50$%=;)%;1%$>;717? w v Question1 4 v2 w2 v1 w2 v2 What are the flow augmenting paths? w3 v5 v3 w3 red arc: flow 1, wbackward4 v3 arc win5 residual graph @2";,A%B%7:+*1$71%"0<,$51;5<%C"1:%;7%)+056%=;)%;1%$>;717? black arc: flow 0, forward arc in residual graph v4 w4 D*++)A%E%/;C"*1;1$%! 1:$*$%"*$%5+%+66%9892$7F%(+%;)%1:$*$%;7% "5%"0<,$51;5<%C"1:%71"*1;5<%"1%7+,$%-%$56;5<%"1%7+,$%3%% wwv v So,v flow augmentation = augmentingw alt.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages29 Page
-
File Size-