Presentation is loading. Please wait.

Presentation is loading. Please wait.

3.3 Applications of Maximum Flow and Minimum Cut

Similar presentations


Presentation on theme: "3.3 Applications of Maximum Flow and Minimum Cut"β€” Presentation transcript:

1 3.3 Applications of Maximum Flow and Minimum Cut
Bipartite Matchings and Covers A cover of an undirected graph 𝐺 is a set 𝐢 of nodes such that every edge of G has at least one end in 𝐢. For any matching 𝑀 and any cover 𝐢, each edge in 𝑀 has an end in 𝐢 and the corresponding nodes in C are all distinct. β‡’ |𝑀|≀|𝐢| (primal-dual relation) Thm 3.14 (KΓΆnig’s Theorem, 1931) : (KΓΆnig-EgervΓ‘ry Thm) For a bipartite graph G, max { |𝑀|: 𝑀 a matching} = min { |𝐢|: 𝐢 a cover} Combinatorial Optimization 2016

2 (Transform to max flow problem)
Q P Q a A a A b B b B c C c C r s d D d D f F f F h H h H urp=1 uqs=1 i I i I upq=ο‚₯ Combinatorial Optimization 2016

3 (Maximum matching and corresponding flow)
b B b B c C c C r s d D d D f F f F h H h H urp=1 uqs=1 i I i I upq=ο‚₯ node cover Combinatorial Optimization 2016

4 (Identifying π‘₯-incrementing paths)
b B b B c C c C r r s s d D d D f F f F h H h H urp=1 uqs=1 urp=1 uqs=1 i I i I upq=ο‚₯ upq=ο‚₯ node reachable from π‘Ÿ Combinatorial Optimization 2016

5 (blue nodes defines cut = flow value)
r r s s d D d D f F f F h H h urp=1 uqs=1 H urp=1 uqs=1 i I i I upq=ο‚₯ upq=ο‚₯ : cut arcs node reachable from π‘Ÿ Note that no cut arc from blue in 𝑃 β†’ green in 𝑄 (O.w. cut capacity is ο‚₯) Combinatorial Optimization 2016

6 Let 𝐴 = {blue nodesβˆ–{π‘Ÿ}} Cover 𝐢 (pink) =(𝑃\A)βˆͺ(π‘„βˆ©π΄)
f F f F h H h urp=1 uqs=1 H urp=1 uqs=1 i I i I upq=ο‚₯ upq=ο‚₯ Let 𝐴 = {blue nodesβˆ–{π‘Ÿ}} Cover 𝐢 (pink) =(𝑃\A)βˆͺ(π‘„βˆ©π΄) Capacity of cut = |𝑃\A|+|π‘„βˆ©π΄|=|𝐢| Combinatorial Optimization 2016

7 min cut: 𝛿′ π‘Ÿ βˆͺ𝐴 where π΄βŠ†π‘‰ no edge from π‘ƒβˆ©π΄ to 𝑄\A Cover 𝐢=(𝑃\A)βˆͺ(π‘„βˆ©π΄)
s π‘ƒβˆ©π΄ π‘„βˆ©π΄ min cut: 𝛿′ π‘Ÿ βˆͺ𝐴 where π΄βŠ†π‘‰ no edge from π‘ƒβˆ©π΄ to 𝑄\A Cover 𝐢=(𝑃\A)βˆͺ(π‘„βˆ©π΄) Capacity of cut =|𝑃\A|+|π‘„βˆ©π΄|=|𝐢| Running time: 𝑂(π‘šπ‘›) Combinatorial Optimization 2016

8 Reference: Linear Programming, Vasek Chvatal, 1983, Freeman, p336-338.
(Hall’s Theorem) Reference: Linear Programming, Vasek Chvatal, 1983, Freeman, p System of distinct representatives Given a set 𝑄 and a family (𝑆1, 𝑆2, …, 𝑆 π‘š ) of subsets of 𝑄, a system of distinct representative (SDR) is a set {π‘ž1, …, π‘ž π‘š } of distinct elements of 𝑄 such that π‘žπ‘– βˆˆπ‘†π‘– for 1β‰€π‘–β‰€π‘š. Hall’s Theorem: The family (𝑆1, 𝑆2, …, 𝑆 π‘š ) does not have an SDR if and only if there is a set 𝐼 such that π‘–βˆˆπΌ 𝑆 𝑖 < 𝐼 (20.14) (The family (𝑆1, 𝑆2, …, 𝑆 π‘š ) has an SDR if and only if for every subset 𝐼 of {1, …, π‘š} we have π‘–βˆˆπΌ 𝑆 𝑖 β‰₯ 𝐼 .) Pf) later. Combinatorial Optimization 2016

9 q1 q1 S1 S1 q2 q2 S2 S2 q3 q3 S3 S3 q4 q4 S4 S4 q5 q5 S5 S5 q6 q6
The family has an SDR iff the corresponding bipartite graph has a matching of size π‘š. Combinatorial Optimization 2016

10 Circled nodes have π‘–βˆˆπΌ 𝑆 𝑖 < 𝐼 , hence no SDR.
q1 q1 S1 S1 q2 q2 S2 S2 q3 q3 S3 S3 q4 q4 S4 S4 q5 q5 S5 S5 q6 q6 Circled nodes have π‘–βˆˆπΌ 𝑆 𝑖 < 𝐼 , hence no SDR. Combinatorial Optimization 2016

11 Hall’s Theorem: The family (𝑆1, 𝑆2, …, 𝑆 π‘š ) does not have an SDR if and only if there is a set 𝐼 such that π‘–βˆˆπΌ 𝑆 𝑖 < 𝐼 (20.14) (The family (𝑆1, 𝑆2, …, 𝑆 π‘š ) has an SDR if and only if for every subset 𝐼 of {1, …, π‘š} we have π‘–βˆˆπΌ 𝑆 𝑖 β‰₯ 𝐼 .) Pf) οƒœ) clear. οƒž) Suppose (𝑆1, 𝑆2, …, 𝑆 π‘š ) does not have an SDR. Corresponding bipartite graph has no matching of size π‘š. Let 𝑀 βˆ— be the largest matching ( 𝑀 βˆ— <π‘š) and 𝐢 βˆ— be the smallest cover. By KΓΆnig’s thm 𝑀 βˆ— = 𝐢 βˆ— <π‘š. Let πΌβŠ†{1,2,…,π‘š} be such that π‘–βˆˆπΌ iff the left node 𝑆 𝑖 does not belong to 𝐢 βˆ— . If π‘–βˆˆπΌ, then each element π‘žβˆˆ 𝑆 𝑖 , viewed as a right node must be in 𝐢 βˆ— . Otherwise 𝐢 βˆ— would not be a cover. Hence π‘–βˆˆπΌ 𝑆 𝑖 is a subset of right nodes in 𝐢 βˆ— . Since 𝐢 βˆ— has precisely π‘šβˆ’ 𝐼 left nodes, it has 𝐢 βˆ— βˆ’ π‘šβˆ’ 𝐼 < 𝐼 right nodes. So (20.14) holds.  Combinatorial Optimization 2016

12 Dilworth’s Theorem Chains and Antichains in Partially Ordered Sets
(Reference: Linear Programming, Vasek Chvatal, 1983, Freeman, p ) A list of pairs π‘₯ β†’ 𝑦 satisfying the following conditions is called a partial order (i) no π‘₯ β†’ π‘₯ (ii) π‘₯ β†’ 𝑦 and 𝑦 β†’ 𝑧 together imply π‘₯ β†’ 𝑧 A set whose elements appear in a partial order is called a partially ordered set A subset 𝐢 of a partially ordered set is called a chain if π‘₯ β†’ 𝑦 or 𝑦 β†’ π‘₯ whenever π‘₯, π‘¦βˆˆπΆ and π‘₯≠𝑦 (The elements can be enumerated as 𝑧1, 𝑧2, …, π‘§π‘Ÿ in such a way that 𝑧1 β†’ 𝑧2, 𝑧2 β†’ 𝑧3, … , 𝑧 π‘Ÿβˆ’1 β†’ π‘§π‘Ÿ ) A subset 𝐴 of a partially ordered set is called an antichain if π‘₯ β†’ 𝑦 for no π‘₯, π‘¦βˆˆπ΄. Combinatorial Optimization 2016

13 application: guided tour, airplane assignment
Dilworth’s Theorem: In every partially ordered set 𝑃, the smallest number of chains whose union is 𝑃 equals the largest size of an antichain application: guided tour, airplane assignment pf) text exercise We consider a different approach here. ex) Set 𝑋={π‘Ž, 𝑏, 𝑐, 𝑑, 𝑒, 𝑓, 𝑔}, tours partial orders : π‘Žβ†’π‘, π‘Žβ†’π‘‘, π‘Žβ†’π‘“, π‘Žβ†’π‘”, 𝑏→𝑐, 𝑏→𝑔, 𝑑→𝑔, 𝑒→𝑓, 𝑒→𝑔 ( need 3 guides, π‘Žβ†’π‘‘β†’π‘”, 𝑏→𝑐, 𝑒→𝑓 ) (Note that 𝑐,𝑔,𝑓 has no partial orders (antichain) ) Construct a bipartite graph by doubling each node 𝑣 as 𝑣′ and 𝑣′′. There exists an edge π‘₯′𝑦′′ iff π‘₯→𝑦. Combinatorial Optimization 2016

14 A matching 𝑀 defines π‘˜=π‘›βˆ’|𝑀| chains (guides) ex) (i) π‘Žβ†’π‘‘β†’π‘” (ii) 𝑏→𝑐
- In the matching, each tour has at most one successor and at most one predecessor. Otherwise, M would not be a matching. By concatenating successive tours, we obtain a set of chains (A chain may consists of a single tour) - Let π‘˜ be the number of chains and π‘Ÿπ‘– be the length (number of nodes) of 𝑖-th chain. Then 𝑖=1 π‘˜ π‘Ÿ 𝑖 =𝑛 and 𝑖=1 π‘˜ ( π‘Ÿ 𝑖 βˆ’1) =|𝑀| which imply π‘˜=π‘›βˆ’|𝑀|. (Hence min # of guides β‰€π‘›βˆ’ 𝑀 βˆ— , 𝑀 βˆ— : max matching) - Converse can be shown too, i.e. π‘˜ chains define 𝑛 – π‘˜ sized matching 𝑀. (Hence π‘›βˆ’π‘˜β‰€ 𝑀 βˆ— , i.e., min # of guides β‰₯π‘›βˆ’ 𝑀 βˆ— , 𝑀 βˆ— : max matching) a’’ b’’ a’ c’’ b’ d’’ c’ e’’ d’ f’’ g’’ e’ f’ g’ Combinatorial Optimization 2016

15 Different reasoning using KΓΆnig’s Theorem:
Let 𝑀 βˆ— be a largest matching and 𝐢 βˆ— be min cover. Define a set 𝐴 βˆ— of trips as follows; trip π‘§βˆˆ 𝐴 βˆ— iff π‘§β€²βˆ‰ 𝐢 βˆ— and π‘§β€²β€²βˆ‰ 𝐢 βˆ— . No π‘₯→𝑦 with π‘₯, π‘¦βˆˆ 𝐴 βˆ— is possible. (Otherwise, βˆƒ π‘₯′𝑦′′ with π‘₯β€²βˆ‰ 𝐢 βˆ— , π‘¦β€²β€²βˆ‰ 𝐢 βˆ— , hence π‘₯′𝑦′′ not covered by 𝐢 βˆ— , contradiction to 𝐢 βˆ— being a cover.) β‡’ no guide can take care of two different trips in 𝐴 βˆ— . (e.g., 𝑐→𝑓) β‡’ need at least | 𝐴 βˆ— | guides. But 𝐴 βˆ— has at least π‘›βˆ’| 𝐢 βˆ— | elements (each node in 𝐢 βˆ— makes only one trip ineligible for membership in 𝐴 βˆ— ) Hence every schedule must use at least | 𝐴 βˆ— |β‰₯π‘›βˆ’| 𝐢 βˆ— |=π‘›βˆ’| 𝑀 βˆ— | different guides. β‡’ The schedule defined by | 𝑀 βˆ— |, using only π‘›βˆ’| 𝑀 βˆ— | guides, is optimal. (from earlier) Cover C* a’’ A* b’’ a’ c’’ b’ d’’ c’ e’’ d’ f’’ g’’ e’ f’ g’ Combinatorial Optimization 2016

16 Proof of Dilworth’s Theorem:
The partially ordered set 𝑃 may be thought of as a set of tours. Chains are those sets of tours that can be taken care of by one guide. The described procedure gives the smallest π‘˜ of chains. Along with the chains, the procedure also finds an antichain 𝐴 βˆ— of size at least π‘˜. Since every antichain 𝐴 shares at most one element with each of the chains 𝐢1, 𝐢2, …, πΆπ‘˜, it must satisfy |𝐴|β‰€π‘˜β‰€| 𝐴 βˆ— |. So 𝐴 βˆ— is a largest antichain and its size is π‘˜ (plug in 𝐴 βˆ— for 𝐴).  Combinatorial Optimization 2016

17 Optimal Closure in a Digraph
Situation: If we want to choose project 𝑣, then we must choose project 𝑀 also. We want to choose the set of projects which gives maximum profit Model as a problem on a digraph. Use directed arc 𝑣𝑀 if project 𝑀 precedes project 𝑣. Find the maximum benefit set πΆβŠ†π‘‰ such that (𝐢)=βˆ…. (closure of 𝐺) (May be formulated as integer program using constraints π‘₯ 𝑣 ≀ π‘₯ 𝑀 , βˆ€ π‘£π‘€βˆˆπΈ, π‘₯∈ 𝐡 𝑛 .) Example: open pit mining problem. Partition the volume to be considered for excavation into small 3-dimensional blocks. Block 𝑣 produces profit of 𝑏𝑣 (profit of ore in 𝑣 – cost of excavating 𝑣 ) If we need to excavate block 𝑀 to excavate block 𝑣, we include arc 𝑣𝑀 in 𝐺. Want to find a closed set in 𝐺 which maximizes profit. Combinatorial Optimization 2016

18 Convert to min-cut problem (max-flow problem)
Divide the nodes into two sets 𝐴 and 𝐡. π‘£βˆˆπ΄ if 𝑏𝑣β‰₯0 and π‘£βˆˆπ΅ if 𝑏𝑣<0. Construct 𝐺′. Add a source π‘Ÿ and a sink 𝑠 to the graph and add arc π‘Ÿπ‘£ for each π‘£βˆˆπ΄ and arc 𝑣𝑠 for each π‘£βˆˆπ΅. Capacity on the arcs are: π‘’π‘Ÿπ‘£=𝑏𝑣 for each π‘£βˆˆπ΄ and 𝑒𝑣𝑠=βˆ’ 𝑏 𝑣 for each π‘£βˆˆπ΅. The upper bounds on the original arcs are infinite. A set 𝐢 of nodes is closed if and only if the cut Ξ΄β€²(𝐢βˆͺ π‘Ÿ ) has finite capacity. If the capacity of Ξ΄β€²(𝐢βˆͺ π‘Ÿ ) is finite, then it equals π‘£βˆˆπ΄βˆ’πΆ 𝑒 π‘Ÿπ‘£ + π‘£βˆˆπ΅βˆ©πΆ 𝑒 𝑣𝑠 = π‘£βˆˆπ΄βˆ’πΆ 𝑏 𝑣 + π‘£βˆˆπ΅βˆ©πΆ (βˆ’π‘ 𝑣 ) = π‘£βˆˆπ΄βˆ’πΆ 𝑏 𝑣 + π‘£βˆˆπ΄βˆ©πΆ 𝑏 𝑣 + π‘£βˆˆπ΄βˆ©πΆ (βˆ’ 𝑏 𝑣 ) + π‘£βˆˆπ΅βˆ©πΆ (βˆ’π‘ 𝑣 ) = π‘£βˆˆπ΄ 𝑏 𝑣 βˆ’ π‘£βˆˆπΆ 𝑏 𝑣 Since π‘£βˆˆπ΄ 𝑏 𝑣 is a constant, minimizing the capacity of Ξ΄β€²(𝐢βˆͺ π‘Ÿ ) amounts to maximizing π‘£βˆˆπΆ 𝑏 𝑣 . Combinatorial Optimization 2016

19 π‘£βˆˆπ΄βˆ’πΆ 𝑒 π‘Ÿπ‘£ + π‘£βˆˆπ΅βˆ©πΆ 𝑒 𝑣𝑠 = π‘£βˆˆπ΄βˆ’πΆ 𝑏 𝑣 + π‘£βˆˆπ΅βˆ©πΆ (βˆ’π‘ 𝑣 ) =
(Example) π‘£βˆˆπ΄βˆ’πΆ 𝑒 π‘Ÿπ‘£ + π‘£βˆˆπ΅βˆ©πΆ 𝑒 𝑣𝑠 = π‘£βˆˆπ΄βˆ’πΆ 𝑏 𝑣 + π‘£βˆˆπ΅βˆ©πΆ (βˆ’π‘ 𝑣 ) = π‘£βˆˆπ΄βˆ’πΆ 𝑏 𝑣 + π‘£βˆˆπ΄βˆ©πΆ 𝑏 𝑣 + π‘£βˆˆπ΄βˆ©πΆ (βˆ’ 𝑏 𝑣 ) + π‘£βˆˆπ΅βˆ©πΆ (βˆ’π‘ 𝑣 ) = π‘£βˆˆπ΄ 𝑏 𝑣 βˆ’ π‘£βˆˆπΆ 𝑏 𝑣 2 -7 ο‚₯ 2 ο‚₯ C 7 π‘Ÿ 4 4 1 -1 ο‚₯ 3 ο‚₯ ο‚₯ 3 2 3 𝑠 -3 ο‚₯ ο‚₯ 1 2 ο‚₯ -1 Combinatorial Optimization 2016

20 Menger’s Theorems Ref: Graph Theory with Applications, J. A. Bondy, U. S. R. Murty, 1976, 2008. Directed version: Lemma: Let 𝐺 be a digraph in which each arc has unit capacity. Then (a) The maximum (π‘Ÿ, 𝑠) flow is equal to the maximum number π‘š of arc disjoint directed (π‘Ÿ, 𝑠)-paths in 𝐺; and (b) The capacity of a minimum (π‘Ÿ, 𝑠)-cut is equal to the minimum number 𝑛 of arcs whose deletion destroys all directed (π‘Ÿ, 𝑠)-paths in G. Thm: Let π‘Ÿ, 𝑠 be two nodes of a digraph 𝐺. Then the maximum number of arc-disjoint directed (π‘Ÿ, 𝑠)-paths in G is equal to the minimum number of arcs whose deletion destroys all directed (π‘Ÿ, 𝑠)-paths in G. (pf) From above Lemma and max-flow and min-cut theorem. Combinatorial Optimization 2016

21 Thm: Let π‘Ÿ, 𝑠 be two nodes of a graph 𝐺
Thm: Let π‘Ÿ, 𝑠 be two nodes of a graph 𝐺. Then the maximum number of edge-disjoint (π‘Ÿ, 𝑠)-paths in 𝐺 is equal to the minimum number of edges whose deletion destroys all (π‘Ÿ, 𝑠)-paths in G. (pf) Replace each edge of G by two oppositely oriented arcs and apply the previous results.  Combinatorial Optimization 2016

22 (node connectivity) Directed version:
Thm: Let π‘Ÿ, 𝑠 be two nodes of a digraph 𝐺, such that π‘Ÿ is not joined to 𝑠. Then the maximum number of node-disjoint directed (π‘Ÿ, 𝑠)-paths in 𝐺 is equal to the minimum number of nodes whose deletion destroys all directed (π‘Ÿ, 𝑠)-paths in 𝐺. (pf) Construct 𝐺′ as follows ( except π‘Ÿ and 𝑠). Then directed (π‘Ÿ,𝑠)-paths in 𝐺′ are arc-disjoint if and only if the corresponding paths in 𝐺 are node-disjoint. ο‚₯ ο‚₯ 𝑣 𝑣′ 𝑣′′ 1 ο‚₯ ο‚₯ ο‚₯ Combinatorial Optimization 2016

23 Thm: Let π‘Ÿ and 𝑠 be two nonadjacent nodes of a graph 𝐺
Thm: Let π‘Ÿ and 𝑠 be two nonadjacent nodes of a graph 𝐺. Then the maximum number of node-disjoint (π‘Ÿ, 𝑠)-paths in 𝐺 is equal to the minimum number of nodes whose deletion destroys all (π‘Ÿ, 𝑠)-paths. (pf) Replace each edge of G by two oppositely oriented arcs and use the previous transformation (reduction).  Recall from connectivity results earlier. Thm 9.2: If 𝐺 has at least one pair of nonadjacent vertices, πœ…(𝐺) = min {𝑝(𝑒,𝑣): 𝑒,π‘£βˆˆπ‘‰, 𝑒≠𝑣, π‘’π‘£βˆ‰πΈ}. Min cut can be obtained in polynomial time. Hence the (edge, node) connectivity of a graph can be found in polynomial time. Combinatorial Optimization 2016


Download ppt "3.3 Applications of Maximum Flow and Minimum Cut"

Similar presentations


Ads by Google