Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Polyhedral Optimization Lecture 2 – Part 2 M. Pawan Kumar [email protected] Slides available online http://cvn.ecp.fr/personnel/pawan/ Outline • Flows and Cuts • Bipartite Matching and Vertex Cover Functions on Arcs D = (V, A) s 1 1 v1 4 6 3 3 v3 10 8 v2 7 v4 3 3 t Function f: A Reals Excess function Ef(v) 2 5 Arc capacities c(a) Incoming value Outgoing value Functions on Arcs D = (V, A) s 1 1 v1 4 6 3 3 v3 10 8 v2 7 v4 3 3 t Function f: A Reals Excess function Ef(v) 2 5 Arc capacities c(a) Σain-arcs(v) f(a) Outgoing value Functions on Arcs D = (V, A) s 1 1 v1 4 6 3 3 v3 10 8 v2 7 v4 3 3 t Function f: A Reals Excess function Ef(v) 2 5 Arc capacities c(a) Σain-arcs(v) f(a) Σaout-arcs(v) f(a) Functions on Arcs D = (V, A) s 1 1 v1 4 6 3 3 v3 10 8 v2 7 v4 3 3 t Function f: A Reals Excess function Ef(v) 2 5 Arc capacities c(a) f(in-arcs(v)) f(out-arcs(v)) Ef(v1) -6 Functions on Arcs D = (V, A) s 1 1 v1 4 6 3 3 v3 10 8 v2 7 v4 3 3 t Function f: A Reals Excess function Ef(v) 2 5 Arc capacities c(a) f(in-arcs(v)) f(out-arcs(v)) Ef(v2) 14 Excess Functions of Vertex Subsets Excess function Ef(U) s 1 1 v1 4 6 3 3 v3 10 8 v2 2 5 7 v4 3 3 t Incoming Value Outgoing Value Excess Functions of Vertex Subsets Excess function Ef(U) s 1 1 v1 4 6 3 3 v3 10 8 v2 2 5 7 v4 3 3 t Σain-arcs(U) f(a) Outgoing Value Excess Functions of Vertex Subsets Excess function Ef(U) s 1 1 v1 4 6 3 3 v3 10 8 v2 2 5 7 v4 3 3 t Σain-arcs(U) f(a) Σaout-arcs(U) f(a) Excess Functions of Vertex Subsets Excess function Ef(U) s 1 1 v1 4 6 3 3 v3 10 8 v2 2 5 7 Ef({v1,v2}) v4 3 3 t f(in-arcs(U)) f(out-arcs(U)) 8 Excess Functions of Vertex Subsets Excess function Ef(U) s 1 1 v1 4 6 3 3 v3 10 8 v2 2 5 7 Ef({v1,v2}) -6 + 14 v4 3 3 t f(in-arcs(U)) f(out-arcs(U)) Ef(U) = ΣvU Ef(v) Outline • Flows and Cuts – s-t Flow – s-t Cut – Flows vs. Cuts – Incidence Matrix – Max-Flow Problem – Dual of Max-Flow Problem • Bipartite Matching and Vertex Cover s-t Flow Function flow: A R s 1 v1 8 6 3 v3 v2 2 5 7 Flow is non-negative For all vertex expect s,t v4 3 t Flow of arc ≤ arc capacity Incoming flow = Outgoing flow s-t Flow Function flow: A R s 1 v1 8 6 3 v3 v2 2 5 7 Flow is non-negative For all vertex expect s,t v4 3 t flow(a) ≤ c(a) Incoming flow = Outgoing flow s-t Flow Function flow: A R s 1 v1 8 6 3 v3 v2 2 5 7 flow(a) ≥ 0 For all vertex expect s,t v4 3 t flow(a) ≤ c(a) Incoming flow = Outgoing flow s-t Flow Function flow: A R s 1 v1 8 6 3 v3 v2 2 5 7 flow(a) ≥ 0 For all v V \ {s,t} v4 3 t flow(a) ≤ c(a) Incoming flow = Outgoing flow s-t Flow Function flow: A R s 1 v1 8 6 3 v3 v2 2 5 7 flow(a) ≥ 0 For all v V \ {s,t} v4 3 t flow(a) ≤ c(a) Σ(u,v)A flow((u,v)) = Outgoing flow s-t Flow Function flow: A R s 1 v1 8 6 3 v3 v2 2 5 7 t flow(a) ≤ c(a) flow(a) ≥ 0 For all v V \ {s,t} v4 Σ(u,v)A flow((u,v)) 3 = Σ(v,u)A flow((v,u)) s-t Flow Function flow: A R s 1 v1 8 6 3 v3 v2 2 5 7 flow(a) ≥ 0 For all v V \ {s,t} v4 3 t flow(a) ≤ c(a) Eflow(v) = 0 s-t Flow Function flow: A R s 1 1 v1 4 6 3 3 v3 10 8 v2 2 5 7 flow(a) ≥ 0 For all v V \ {s,t} v4 3 3 t flow(a) ≤ c(a) Eflow(v) = 0 ✗ s-t Flow Function flow: A R s -1 1 v1 8 6 -1 3 v3 v2 2 5 7 flow(a) ≥ 0 For all v V \ {s,t} v4 -1 3 t flow(a) ≤ c(a) Eflow(v) = 0 ✗ s-t Flow Function flow: A R s 11 v1 8 6 13 v3 v2 2 5 7 flow(a) ≥ 0 For all v V \ {s,t} v4 13 t flow(a) ≤ c(a) Eflow(v) = 0 ✓ Value of s-t Flow s 1 v1 8 6 3 v3 v2 - Incoming flow of s 2 5 7 v4 3 t Outgoing flow of s Value of s-t Flow s 1 v1 8 6 3 v3 v2 7 v4 3 t Eflow(t) Σ(s,v)A flow((s,v)) - Σ(u,s)A flow((u,s)) 2 5 -Eflow(s) Value of s-t Flow s 11 v1 8 6 13 v3 v2 7 v4 13 t Eflow(t) Σ(s,v)A flow((s,v)) - Σ(u,s)A flow((u,s)) 2 5 -Eflow(s) Value = 1 Outline • Flows and Cuts – s-t Flow – s-t Cut – Flows vs. Cuts – Incidence Matrix – Max-Flow Problem – Dual of Max-Flow Problem • Bipartite Matching and Vertex Cover Cut D = (V, A) Let U be a subset of V 10 v1 3 v3 v2 2 5 v4 C is a set of arcs such that • (u,v) A • uU • v V\U C is a cut in the digraph D Cut D = (V, A) U 10 v1 3 v3 What is C? v2 {(v1,v2),(v1,v4)} ? 2 5 V\U {(v1,v4),(v3,v2)} ? v4 ✓ {(v1,v4)} ? Cut D = (V, A) U V\U What is C? 10 v1 3 v3 v2 ✓ 2 5 {(v1,v2),(v1,v4),(v3,v2)} ? v4 {(v4,v3)} ? {(v1,v4),(v3,v2)} ? Cut D = (V, A) V\U U What is C? 10 v1 3 v3 v2 2 5 ✓ {(v1,v2),(v1,v4),(v3,v2)} ? {(v3,v2)} ? v4 {(v1,v4),(v3,v2)} ? Cut D = (V, A) 10 v1 3 v3 v2 2 5 C = out-arcs(U) v4 Capacity of Cut 10 v1 3 v3 v2 Sum of capacity of all arcs in C 2 5 v4 Capacity of Cut 10 v1 3 v3 v2 Σa C c(a) 2 5 v4 Capacity of Cut U 10 v1 3 v3 v2 2 5 V\U v4 3 Capacity of Cut V\U U 10 v1 3 v3 v2 2 5 v4 15 s-t Cut D = (V, A) s 1 v1 8 6 3 v3 v2 A sink vertex “t” v4 C is a cut such that • sU • t V\U 2 5 7 3 t A source vertex “s” C is an s-t cut Capacity of s-t Cut s 1 v1 8 6 3 v3 v2 2 5 7 v4 3 t Σa C c(a) Capacity of s-t Cut s 1 v1 8 6 3 v3 v2 2 5 7 v4 3 t 5 Capacity of s-t Cut s 1 v1 8 6 3 v3 v2 2 5 7 v4 3 t 17 Outline • Flows and Cuts – s-t Flow – s-t Cut – Flows vs. Cuts – Incidence Matrix – Max-Flow Problem – Dual of Max-Flow Problem • Bipartite Matching and Vertex Cover Flows vs. Cuts An s-t flow function flow: A Reals An s-t cut C such that s U, t V\U Value of flow ≤ Capacity of C Flows vs. Cuts Value of flow = -Eflow(s) = -Eflow(s) - ΣvU\{s} Eflow(v) = -Eflow(U) = flow(out-arcs(U)) - flow(in-arcs(U)) ≤ Capacity of C - flow(in-arcs(U)) Max-Flow Min-Cut Theorem Value of max flow = Capacity of min cut Ford and Fulkerson, 1958 “Combinatorial” proof We want to use polyhedral techniques Outline • Flows and Cuts – s-t Flow – s-t Cut – Flows vs. Cuts – Incidence Matrix – Max-Flow Problem – Dual of Max-Flow Problem • Bipartite Matching and Vertex Cover Incidence Matrix a1 s 2 4 3 v1 v2 a2 a3 a4 s v1 v2 1 2 t n vertices m arcs t n x m matrix a5 Incidence Matrix a1 s 2 4 3 v1 1 v2 2 t n vertices m arcs s -1 v1 1 v2 0 t 0 a2 a3 a4 n x m matrix a5 Incidence Matrix a1 a2 s -1 -1 v1 1 0 v2 0 1 t 0 0 s 2 4 3 v1 1 v2 2 t n vertices m arcs a3 a4 n x m matrix a5 Incidence Matrix a1 a2 a3 s -1 -1 0 v1 1 0 -1 v2 0 1 1 t 0 0 0 s 2 4 3 v1 1 v2 2 t n vertices m arcs a4 n x m matrix a5 Incidence Matrix a1 a2 a3 a4 s -1 -1 0 0 v1 1 0 -1 -1 v2 0 1 1 0 t 0 0 0 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs n x m matrix a5 Incidence Matrix a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs n x m matrix Incidence Matrix a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs n x m matrix Incidence Matrix a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs n x m matrix ? Incidence Matrix a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 1 -1 0 v2 0 1 -1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs n x m matrix Incidence Matrix Each column contains exactly one +1 Each column contains exactly one -1 Rest of the column entries are 0 Linearly dependent rows, determinant = 0 Property Digraph D = (V,A) Incidence matrix M M is a TUM Proof? Proof Sketch Consider a submatrix S of M of size k x k Mathematical induction: det(S) ∈ {0,+1,-1} Trivial for k = 1 Assume it is true for k < m Proof Sketch Consider a submatrix S of M of size m x m Case I: S contains a column of all zeros det(S) = 0 Proof Sketch Consider a submatrix S of M of size m x m Case II: S contains a column with one non-zero ±1 sT 0 S’ Use induction assumption Proof Sketch Consider a submatrix S of M of size m x m Case III: All columns contain two non-zeros Sum of column = 0 (linearly dependent rows) Hence proved Outline • Flows and Cuts – s-t Flow – s-t Cut – Flows vs. Cuts – Incidence Matrix – Max-Flow Problem – Dual of Max-Flow Problem • Bipartite Matching and Vertex Cover Max-Flow Problem Variable x of size m x 1 s 2 4 3 v1 1 Flow in arc ‘ai’ is xi v2 2 x≥0 t n vertices m arcs Linear constraint Max-Flow Problem Capacity vector c s 2 4 3 v1 2 4 v2 x 1 ≤ 2 1 t 2 n vertices m arcs 3 Linear constraint Max-Flow Problem a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs Incidence Matrix M Max-Flow Problem s 2 a2 a3 a4 a5 1 0 -1 -1 0 x 4 3 v1 a1 1 v2 2 t n vertices m arcs v1 x1 Incoming Flow - x3 - x4 Outgoing Flow Max-Flow Problem s 2 a2 a3 a4 a5 1 0 -1 -1 0 x 4 3 v1 a1 1 v2 2 t n vertices m arcs v1 x1 - x3 Excess Flow - x4 Max-Flow Problem a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs Incidence Matrix M Max-Flow Problem s 2 a2 a3 a4 a5 0 1 1 0 -1 x 4 3 v1 a1 v2 v2 1 2 t n vertices m arcs x2 +x3 Incoming Flow - x5 Outgoing Flow Max-Flow Problem s 2 a2 a3 a4 a5 0 1 1 0 -1 x 4 3 v1 a1 v2 v2 1 2 t n vertices m arcs x2 +x3 - x5 Excess Flow Max-Flow Problem a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs Incidence Matrix M Max-Flow Problem a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs Incidence Submatrix M’ Is M’ a TUM? YES Max-Flow Problem a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs M’x = 0 Flow conversation Linear constraint Max-Flow Problem a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs Any other constraints? Max-Flow Problem a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs w Objective function? Max-Flow Problem a1 a2 a3 a4 a5 s -1 -1 0 0 0 v1 1 0 -1 -1 0 v2 0 1 1 0 -1 t 0 0 0 1 1 s 2 4 3 v1 1 v2 2 t n vertices m arcs w maxx wTx Max-Flow Problem maxx wTx s.t. 0≤x≤c M’x = 0 Integer polyhedron? No, c may not be an integer vector If c ∈ Zm, there exists an integer max flow Outline • Flows and Cuts – s-t Flow – s-t Cut – Flows vs. Cuts – Incidence Matrix – Max-Flow Problem – Dual of Max-Flow Problem • Bipartite Matching and Vertex Cover Dual of Max-Flow Problem maxx wTx s.t. 0≤x≤c M’x = 0 y≥0 z Dual of Max-Flow Problem min(y,z) cTy s.t. y≥0 yT + zTM’ ≥ wT Integer polyhedron? YES Optimal integer solution (y*,z*) Dual of Max-Flow Problem Define set U ⊆ V Source s ∈ U Sink t ∉ U Cut C separates U and V\U Capacity of C ≤ cTy* Proof? vi∈ U if z*i ≥ 0 Proof Sketch Let ai = (vj,vk) ∈ out-arcs(C) s 2 v1 4 3 1 v2 M’ = 1 0 -1 -1 0 0 1 1 0 -1 2 t w= y* ≥ 0 0 0 0 1 y*T + z*TM’ ≥ wT 1 Proof Sketch Let ai = (vj,vk) ∈ out-arcs(C) s 2 v1 4 3 1 y*1 ≥ 0 z*1 < 0 y*1 + z*1 ≥ 0 y*1 ≥ 1 v2 2 t Capacity included in cTy* y* ≥ 0 y*T + z*TM’ ≥ wT Proof Sketch Let ai = (vj,vk) ∈ out-arcs(C) s 2 v1 4 3 y*3 ≥ 0 z*1 ≥ 0, z*2 < 0 v2 y*3 + z*2 - z*1 ≥ 0 1 y*3 ≥ 1 2 t Capacity included in cTy* y* ≥ 0 y*T + z*TM’ ≥ wT Proof Sketch Let ai = (vj,vk) ∈ out-arcs(C) s 2 v1 4 3 1 y*5 ≥ 0 z*2 ≥ 0 y*5 - z*2 ≥ 1 y*5 ≥ 1 v2 2 t Capacity included in cTy* y* ≥ 0 y*T + z*TM’ ≥ wT Proof Sketch Let ai = (vj,vk) ∈ out-arcs(C) z*j ≥ 0 z*k < 0 y*i + z*k – z*j ≥ 0 Therefore y*i ≥ 1 Capacity of C ≤ cTy* Max-Flow Min-Cut Theorem Capacity of any cut ≥ Value of any flow C must be the minimum cut Strong duality Capacity of C ≤ cTy* = Value of max flow Max-Flow Min-Cut Theorem Capacity of any cut ≥ Value of any flow C must be the minimum cut Computing min cut is an “easy” problem Strong duality Capacity of C = cTy* = Value of max flow Outline • Flows and Cuts • Bipartite Matching and Vertex Cover Undirected Graph G = (V, E) v0 v1 v4 Simple graph v2 v3 v5 v6 No parallel edges No loops Parallel edges Loop Walk G = (V, E) v0 v1 v4 v2 v3 V = {v1,…,vn} v5 E = {e1,…,em} v6 Sequence P = (v0,e1,v1,…,ek,vk), ei = (vi-1,vi) v0, (v0,v4), v4, (v4,v2), v2, (v2,v5), v5, (v5,v4), v4 Path G = (V, E) v0 v1 v4 v2 v3 V = {v1,…,vn} v5 E = {e1,…,em} v6 Sequence P = (v0,e1,v1,…,ek,vk), ei = (vi-1,vi) Vertices v0,v1,…,vk are distinct Connected Graph G = (V, E) v0 v1 v4 v2 v3 V = {v1,…,vn} v5 E = {e1,…,em} v6 Connected? There exists a walk from one vertex to another Simple Connected Graphs G = (V, E) v0 v1 v4 v2 v3 v5 v6 We will assume the graph is simple We will assume the graph is connected Bipartite Graph G = (V, E) v0 v1 v4 v2 V = V1 ∪ V2 v5 V1 ∩ V2 = ϕ V1 ≠ ϕ v3 V2 ≠ ϕ v6 No edge (u,v) ∈ E such that u ∈ V1 and v ∈ V1 No edge (u,v) ∈ E such that u ∈ V2 and v ∈ V2 Bipartite Graph G = (V, E) v4 v2 V = V1 ∪ V2 v5 Bipartite? V1 ∩ V2 = ϕ V1 ≠ ϕ V2 ≠ ϕ No edge (u,v) ∈ E such that u ∈ V1 and v ∈ V1 No edge (u,v) ∈ E such that u ∈ V2 and v ∈ V2 Bipartite Graph G = (V, E) v0 v1 v4 V = V1 ∪ V2 V1 ∩ V2 = ϕ v2 Bipartite? V1 ≠ ϕ V2 ≠ ϕ No edge (u,v) ∈ E such that u ∈ V1 and v ∈ V1 No edge (u,v) ∈ E such that u ∈ V2 and v ∈ V2 Bipartite Graph G = (V, E) v0 v1 v4 v2 v5 V1 ∩ V2 = ϕ V1 ≠ ϕ Bipartite? v3 V = V1 ∪ V2 V2 ≠ ϕ v6 No edge (u,v) ∈ E such that u ∈ V1 and v ∈ V1 No edge (u,v) ∈ E such that u ∈ V2 and v ∈ V2 Outline • Flows and Cuts • Bipartite Matching and Vertex Cover – Bipartite Matching – Vertex Cover – Matching vs. Cover – Incidence Matrix – Maximum Matching Problem – Dual of Maximum Matching Problem – Generalization Bipartite Matching G = (V, E) v0 v1 v4 v2 v3 G is bipartite v5 v6 A matching is a set of disjoint edges No two edges share a vertex Bipartite Matching G = (V, E) v0 v1 v4 v2 G is bipartite v5 Matching? v3 v6 A matching is a set of disjoint edges No two edges share a vertex Bipartite Matching G = (V, E) v0 v1 v4 v2 G is bipartite v5 Matching? v3 v6 A matching is a set of disjoint edges No two edges share a vertex Bipartite Matching G = (V, E) v0 v1 v4 v2 G is bipartite v5 Matching? v3 v6 A matching is a set of disjoint edges No two edges share a vertex Size of Matching G = (V, E) v0 v1 v4 v2 G is bipartite v5 Size? v3 v6 Number of edges in the matching Size of Matching G = (V, E) v0 v1 v4 v2 G is bipartite v5 Size? v3 v6 Number of edges in the matching Bipartite Matching Problem G = (V, E) v0 v1 v4 v2 G is bipartite v5 Optimal solution? v3 v6 Find a matching with the maximum size Outline • Flows and Cuts • Bipartite Matching and Vertex Cover – Bipartite Matching – Vertex Cover – Matching vs. Cover – Incidence Matrix – Maximum Matching Problem – Dual of Maximum Matching Problem – Generalization Vertex Cover G = (V, E) v0 v1 v4 v2 v3 G is bipartite v5 C⊆V v6 No edge (u,v) ∈ E such that u ∉ C and v ∉ C C covers all the edges Vertex Cover G = (V, E) v0 v1 v4 v2 G is bipartite v5 C⊆V Vertex cover? v3 v6 No edge (u,v) ∈ E such that u ∉ C and v ∉ C C covers all the edges Vertex Cover G = (V, E) v0 v1 v4 v2 G is bipartite v5 C⊆V Vertex cover? v3 v6 No edge (u,v) ∈ E such that u ∉ C and v ∉ C C covers all the edges Vertex Cover G = (V, E) v0 v1 v4 v2 G is bipartite v5 C⊆V Vertex cover? v3 v6 No edge (u,v) ∈ E such that u ∉ C and v ∉ C C covers all the edges Size of Vertex Cover G = (V, E) v0 v1 v4 v2 G is bipartite v5 Size? v3 v6 Number of vertices in the vertex cover Size of Vertex Cover G = (V, E) v0 v1 v4 v2 G is bipartite v5 Size? v3 v6 Number of vertices in the vertex cover Vertex Cover Problem G = (V, E) v0 v1 v4 v2 G is bipartite v5 Optimal solution? v3 v6 Find a vertex cover with the minimum size Outline • Flows and Cuts • Bipartite Matching and Vertex Cover – Bipartite Matching – Vertex Cover – Matching vs. Cover – Incidence Matrix – Maximum Matching Problem – Dual of Maximum Matching Problem – Generalization Question Graph G = (V, E) Not necessarily bipartite Matching M ⊆ E Vertex Cover C ⊆ V |M| ≤ |C|? |C| ≤ |M|? Question Graph G = (V, E) Not necessarily bipartite Matching M ⊆ E Vertex Cover C ⊆ V |M| ≤ |C| Proof? Kőnig’s Theorem For bipartite graphs, Size of max matching = size of min cover Kőnig, 1931 “Combinatorial” proof We want to use polyhedral techniques Outline • Flows and Cuts • Bipartite Matching and Vertex Cover – Bipartite Matching – Vertex Cover – Matching vs. Cover – Incidence Matrix – Maximum Matching Problem – Dual of Maximum Matching Problem – Generalization Incidence Matrix v0 v1 v2 v3 n vertices m edges Incidence Matrix v0 v1 V1 v3 n vertices m edges v2 Incidence Matrix v0 v1 V2 v3 n vertices m edges v2 Incidence Matrix e1 v0 e2 e3 v0 v1 v2 v3 v1 v3 n vertices m edges v2 n x m matrix e4 Incidence Matrix e1 v0 v1 v2 v3 n vertices m edges v0 1 v3 0 v1 1 v2 0 e2 e3 n x m matrix e4 Incidence Matrix e1 e2 v0 1 1 v3 0 0 v1 1 0 v2 0 1 v0 v1 v2 v3 n vertices m edges e3 n x m matrix e4 Incidence Matrix e1 e2 e3 v0 1 1 0 v3 0 0 1 v1 1 0 1 v2 0 1 0 v0 v1 v2 v3 n vertices m edges n x m matrix e4 Incidence Matrix e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 v0 v1 v2 v3 n vertices m edges n x m matrix Incidence Matrix e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 v0 v1 v2 v3 n vertices m edges n x m matrix Incidence Matrix e1 e2 e3 e4 One 1 per column v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 V1 Incidence Matrix One 1 per column e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 V2 Incidence Matrix 1x -1 x e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 Add rows to get a vector of zeros Linearly dependent, determinant = 0 1 V1 V2 Property Bipartite graph G = (V,E) Incidence matrix M M is a TUM Proof? Proof Sketch Consider a submatrix S of M of size k x k Mathematical induction: det(S) ∈ {0,+1,-1} Trivial for k = 1 Assume it is true for k < m Proof Sketch Consider a submatrix S of M of size m x m Case I: S contains a column of all zeros det(S) = 0 Proof Sketch Consider a submatrix S of M of size m x m Case II: S contains a column with one 1 1 sT 0 S’ Use induction assumption Proof Sketch Consider a submatrix S of M of size m x m Case III: All columns contain two non-zeros Incidence matrix of a bipartite graph, det(S) = 0 Hence proved Outline • Flows and Cuts • Bipartite Matching and Vertex Cover – Bipartite Matching – Vertex Cover – Matching vs. Cover – Incidence Matrix – Maximum Matching Problem – Dual of Maximum Matching Problem – Generalization Maximum Matching Problem Variable x of size m x 1 v0 Edge ‘ei’ in matching if xi = 1 v1 v2 Otherwise xi = 0 v3 n vertices m edges xi ∈ {0,1} Integer constraint Maximum Matching Problem e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 v0 v1 v2 v3 n vertices m edges Incidence Matrix A Maximum Matching Problem v0 v0 v1 1 1 0 0 x v2 x 1 + x2 v3 n vertices m edges Number of edges incident on v0 Maximum Matching Problem e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 v0 v1 v2 v3 n vertices m edges Incidence Matrix A Maximum Matching Problem v0 v1 v2 v3 0 0 1 1 x x 3 + x4 v3 n vertices m edges Number of edges incident on v3 Maximum Matching Problem e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 v0 v1 v2 v3 n vertices m edges Incidence Matrix A x Maximum Matching Problem e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 v0 v1 v2 v3 n vertices m edges Ax ≤ 1 Linear constraint x Maximum Matching Problem e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 v0 v1 v2 v3 n vertices m edges Any other constraints? Maximum Matching Problem e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 v0 v1 v2 v3 n vertices m edges Objective function? Maximum Matching Problem e1 e2 e3 e4 v0 1 1 0 0 v3 0 0 1 1 v1 1 0 1 0 v2 0 1 0 1 v0 v1 v2 v3 n vertices m edges maxx 1Tx Maximum Matching Problem maxx 1Tx s.t. 0≤x≤1 Ax ≤ 1 x ∈{0,1}m Integer polyhedron? YES Maximum Matching Problem maxx 1Tx s.t. 0≤x≤1 Ax ≤ 1 Maximum bipartite matching is “easy” Integer polyhedron? YES Maximum Matching Problem maxx 1Tx s.t. 0≤x Why? Ax ≤ 1 Maximum bipartite matching is “easy” Integer polyhedron? YES Outline • Flows and Cuts • Bipartite Matching and Vertex Cover – Bipartite Matching – Vertex Cover – Matching vs. Cover – Incidence Matrix – Maximum Matching Problem – Dual of Maximum Matching Problem – Generalization Dual of Maximum Matching Problem maxx 1Tx s.t. 0≤x y≥0 Ax ≤ 1 z≥0 Dual of Maximum Matching Problem min(y,z) 1Tz s.t. 0≤z zTA - yT = 1T 0≤y Dual of Maximum Matching Problem minz s.t. 1Tz 0≤z zTA ≥ 1T Integer polyhedron? YES Optimal integer solution z* Dual of Maximum Matching Problem Define set C ⊆ V vi∈ C if z*i > 0 C is a vertex cover of the graph Size of C ≤ 1Tz* Proof? For each vi ∈ C, z*i ≥ 1 Dual of Maximum Matching Problem Size of any cover ≥ Size of any matching C must be the minimum cover Strong Duality Size of C ≤ 1Tz* = Size of maximum matching Dual of Maximum Matching Problem Size of any cover ≥ Size of any matching C must be the minimum cover Strong Duality Size of C = 1Tz* = Size of maximum matching Minimum bipartite vertex cover is “easy” Outline • Flows and Cuts • Bipartite Matching and Vertex Cover – Bipartite Matching – Vertex Cover – Matching vs. Cover – Incidence Matrix – Maximum Matching Problem – Dual of Maximum Matching Problem – Generalization b-Matching G = (V, E) v0 v1 v4 v2 G is bipartite v5 n x 1 vector b bv: +ve integer v3 v6 b-Matching G = (V, E) v0 v1 v4 v2 G is bipartite v5 n x 1 vector b bv ∈ Z+ v3 v6 b-matching is a function x : E → Z+ ∑e = (u,v) ∈ E x(e) ≤ bv Matching? b=1 b-Matching Problem G = (V, E) v0 v1 v4 v2 G is bipartite v5 n x 1 vector b bv ∈ Z+ v3 Given w : E → Z+ v6 max wTx s.t. x is a b-matching w-Vertex Cover G = (V, E) v0 v1 v4 v2 G is bipartite v5 m x 1 vector w w e ∈ Z+ v3 v6 w-vertex cover is a function z : V → Z+ For all e = (u,v), z(u) + z(v) ≥ we Vertex Cover? w-Vertex Cover Problem G = (V, E) v0 v1 v4 v2 G is bipartite v5 m x 1 vector w w e ∈ Z+ v3 Given b : V → Z+ v6 min bTz s.t. z is a w-vertex cover b-Matching Problem maxx wTx s.t. 0≤x Ax ≤ b x is integer Integer polyhedron? YES b-Matching Problem maxx wTx s.t. 0≤x Ax ≤ b b-matching is “easy” Integer polyhedron? YES Dual of b-Matching Problem minz s.t. bTz 0≤z zAT ≥ w w-vertex cover is “easy” Integer polyhedron? YES Questions?