Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5. Optimal Matchings

Similar presentations


Presentation on theme: "Chapter 5. Optimal Matchings"โ€” Presentation transcript:

1 Chapter 5. Optimal Matchings

2 5.1 Matchings and Alternating Paths
A matching in ๐บ=(๐‘‰, ๐ธ) is a set ๐‘€ of edges such that no node of ๐บ is incident with more than one edge in ๐‘€. Given a matching ๐‘€, we say that ๐‘€ covers a node ๐‘ฃ (or ๐‘ฃ is ๐‘€-covered) if some edge of M is incident with v. Otherwise ๐‘ฃ is called ๐‘€-exposed. The number of ๐‘€-covered nodes is 2|๐‘€| and the number of ๐‘€-exposed nodes is ๐‘‰ โˆ’2|๐‘€|. Let ๏ฎ(๐บ) : the cardinality of a maximum matching of ๐บ ๐‘‘๐‘’๐‘“(๐บ) : minimum number of exposed nodes for any matching of ๐บ (deficiency of ๐บ, def(๐บ) =|๐‘‰|โˆ’2๏ฎ(๐บ) ) For bipartite graphs, finding a maximum matching reduces to maximum flow problem and finding a minimum-weight perfect matching reduces to minimum-cost flow problem For general graphs? Will consider perfect matching โ†’ max cardinality matching โ†’ min weight perfect matching โ†’ max weight matching Combinatorial Optimization 2016

3 Integer programming formulation of maximum weight matching:
maximize ( ๐‘ ๐‘’ ๐‘ฅ ๐‘’ :๐‘’โˆˆ๐ธ) (min for perfect matching) subject to ๐‘ฅ(๐›ฟ ๐‘ฃ )โ‰ค1, for all ๐‘ฃโˆˆ๐‘‰ (=1 for perfect matching) ๐‘ฅ ๐‘’ โˆˆ{0,1}, for all ๐‘’โˆˆ๐ธ. LP relaxation of the above formulation does not necessarily provide integer optimal solution. However the following formulation gives integer optimal solution. maximize ( ๐‘ ๐‘’ ๐‘ฅ ๐‘’ :๐‘’โˆˆ๐ธ) subject to ๐‘ฅ(๐›ฟ ๐‘ฃ )โ‰ค1, for all ๐‘ฃโˆˆ๐‘‰ ๐‘ฅ(๐›พ ๐‘† )โ‰ค( ๐‘† โˆ’1)/2, for all ๐‘†โŠ†๐‘‰, ๐‘† โ‰ฅ3, ๐‘† odd ๐‘ฅ ๐‘’ โ‰ฅ0, for all ๐‘’โˆˆ๐ธ. For perfect matching, minimize ( ๐‘ ๐‘’ ๐‘ฅ ๐‘’ :๐‘’โˆˆ๐ธ) subject to ๐‘ฅ ๐›ฟ ๐‘ฃ =1, for all ๐‘ฃโˆˆ๐‘‰ ๐‘ฅ(๐ท)โ‰ฅ1, for all ๐ทโˆˆโ„‚ (where โ„‚ is the set of odd cuts of ๐บ that are not of the form ๐›ฟ(๐‘ฃ)) Combinatorial Optimization 2016

4 Weighted matching algorithm solves the previous formulations using combinatorial reasoning and complementary slackness optimality conditions. Given a matching ๐‘€ of ๐บ, a path P is ๐‘€-alternating if its edges are alternately in and not in ๐‘€. If, in addition, the end nodes of ๐‘ƒ are both ๐‘€-exposed and distinct, then ๐‘ƒ is an ๐‘€-augmenting path. (by taking the symmetric difference of the edges on a ๐‘€-augmenting path, we obtain a bigger matching.) For sets ๐‘† and ๐‘‡, the symmetric difference ๐‘†โ–ณ๐‘‡ is the set of elements belonging to one, but not both, of ๐‘†, ๐‘‡. Combinatorial Optimization 2016

5 Thm 5.1: (Augmenting Path Theorem of Matchings)
A matching ๐‘€ in a graph ๐บ=(๐‘‰, ๐ธ) is maximum if and only if there is no ๐‘€-augmenting path. (Pf) ๐‘€ ๐‘€โ–ณ๐ธ(๐‘ƒ) ( => ) ๐‘€:๐‘›๐‘œ๐‘ก ๐‘š๐‘Ž๐‘ฅ ๐‘š๐‘Ž๐‘ก๐‘โ„Ž๐‘–๐‘›๐‘” ๐‘: max ๐‘š๐‘Ž๐‘ก๐‘โ„Ž๐‘–๐‘›๐‘” ๐ฝ=๐‘€โ–ณ๐‘ ( <= ) Combinatorial Optimization 2016

6 (Odd Circuits and the Tutte-Berge Formula)
Recall that the cardinality of a cover provides an upper bound on the size of any matching. But, for odd circuits, the bound is not tight. (Bipartite case โ†’ Kรถnig Th) To find tighter bound, find a lower bound on the # of ๐‘€-exposed nodes in ๐บ. Note that |๐‘€|= 1 2 ( ๐‘‰ โˆ’ number of ๐‘€-exposed nodes) Let ๐ดโŠ†๐‘‰ and ๐บโˆ–๐ด has ๐‘˜ components ๐ป1, โ€ฆ, ๐ป๐‘˜ having odd number of nodes. ๐ป2 ๐ป1 ๐ป๐‘˜ ๐ด Even components Combinatorial Optimization 2016

7 โ‡’ For any ๐ดโŠ†๐‘‰, ๏ฎ(๐บ)โ‰ค1/2(|๐‘‰|โˆ’(๐‘œ๐‘(๐บ\A)โˆ’|๐ด|) )
( ๐‘œ๐‘(๐ป) is the number of odd components of a graph ๐ป) Special cases: If we choose a cover as ๐ด, we have |๐‘‰|โˆ’|๐ด| odd components. So the bound is |๐ด|, same as the cover bound For odd circuit of length 2๐‘˜+1, take ๐ด=โˆ… โ‡’ bound is ๐‘˜. Thm 5.2: (Tutte-Berge Formula) For a graph ๐บ=(๐‘‰, ๐ธ) we have max { |๐‘€|: ๐‘€ a matching} = min { 1/2(|๐‘‰|โˆ’๐‘œ๐‘(๐บ\A)+|๐ด|) :๐ดโŠ†๐‘‰ }. Thm 5.3: (Tutte's Matching Theorem) A graph ๐บ=(๐‘‰, ๐ธ) has a perfect matching if and only if for every subset of nodes ๐ด we have ๐‘œ๐‘(๐บ\A)โ‰ค|๐ด|. (necessary and sufficient condition for the existence of a perfect matching) Combinatorial Optimization 2016

8 Shrinking odd circuits:
Let ๐ถ be an odd circuit in ๐บ. ๐บโ€ฒ=๐บร—๐ถ (the subgraph obtained from ๐บ by shrinking ๐ถ) ๐ถ Given a matching in ๐บโ€ฒ, it can be extended to a matching in ๐บ. Combinatorial Optimization 2016

9 From Prop 5.4, have ๏ฎ(๐บ)โ‰ฅ๏ฎ(๐บร—๐ถ)+(|๐‘‰(๐ถ)|โˆ’1)/2 (5.2)
Prop 5.4: Let ๐‘€โ€ฒ be a matching in ๐บโ€ฒ. Then there exists a matching ๐‘€ of ๐บ such that ๐‘€โŠ†๐‘€โ€ฒโˆช๐ธ(๐ถ) and the number of ๐‘€-exposed nodes of ๐บ is the same as the number of ๐‘€โ€ฒ-exposed nodes of ๐บโ€ฒ. (Pf) ๐ถ From Prop 5.4, have ๏ฎ(๐บ)โ‰ฅ๏ฎ(๐บร—๐ถ)+(|๐‘‰(๐ถ)|โˆ’1)/ (5.2) If there exists a maximum matching in ๐บ using (|๐‘‰(๐ถ)|โˆ’1)/2 edges from ๐ธ(๐ถ), then above inequality holds with equality. However, this does not happen in general. Combinatorial Optimization 2016

10 (example of an odd circuit which is not tight)
Odd circuit ๐ถ of ๐บ is called tight if (5.2) holds with equality. However, it is difficult to identify whether an odd circuit is tight or not. (example of an odd circuit which is not tight) Idea of tight circuit can be used for nonconstructive proof of Tutte-Berge formula. Def: A node ๐‘ฃ of ๐บ is called inessential if there is a maximum matching of ๐บ not covering ๐‘ฃ. Otherwise, ๐‘ฃ is called essential. If ๐ด satisfies (5.1) with equality, then every ๐‘ฃโˆˆ๐ด is essential. (5.3) ( Choose ๐‘ฃโˆˆ๐ด. Consider ๐บโ€ฒ=๐บ\๐‘ฃ. Then ๐บโ€ฒโˆ–(๐ดโˆ–{๐‘ฃ}) and ๐บ\๐ด has the same odd components, but |๐ด|>|๐ดโˆ–{๐‘ฃ}|. So ๏ฎ(๐บโ€ฒ)<๏ฎ(๐บ). ) Combinatorial Optimization 2016

11 ๐‘€1\E(๐ถ) is a maximum matching of ๐บร—๐ถ not covering ๐ถ.
Lemma 5.5: Let ๐‘ฃ๐‘คโˆˆ๐ธ. If ๐‘ฃ, ๐‘ค are both inessential, then there is a tight odd circuit ๐ถ using ๐‘ฃ๐‘ค. Moreover, ๐ถ is an inessential node of ๐บร—๐ถ. (Pf) There are maximum matchings ๐‘€1 and ๐‘€2 of ๐บ not covering ๐‘ฃ and ๐‘ค, respectively ( ๐‘€1 covers ๐‘ค and ๐‘€2 covers ๐‘ฃ. Otherwise we can get a bigger matching) Consider ๐ป=(๐‘‰, ๐‘€1โ–ณ๐‘€2). The component containing ๐‘ฃ is a path ๐‘ƒ starting from ๐‘ฃ and ending at ๐‘ค (๐‘ฃ is ๐‘€1-exposed). (Suppose ๐‘ƒ ends at an ๐‘€ 1 -exposed node, and ends at an ๐‘€ 2 -exposed node other than ๐‘ค, then derive contradiction). Adding ๐‘ฃ๐‘ค to the path ๐‘ƒ provides a circuit ๐ถ. A maximum matching (for example, ๐‘€1) makes ๐ถ tight. ๐‘€1\E(๐ถ) is a maximum matching of ๐บร—๐ถ not covering ๐ถ. ๐‘ฃ ๐‘ค ๐‘€1 ๐‘€2 Combinatorial Optimization 2016

12 (Proof of the Tutte-Berge Formula, Thm 5.2)
Enough to show that โˆƒ a matching ๐‘€ and a set ๐ด such that the number of ๐‘€-exposed nodes is exactly ๐‘œ๐‘(๐บ\A)โˆ’|๐ด|. Use induction on the number of edges. True for graphs having no edges. (๐ด=โˆ…) Consider an edge ๐‘ฃ๐‘ค. 2 cases:(1) ๐‘ฃ or ๐‘ค essential (2) both ๐‘ฃ and ๐‘ค inessential. (1) Suppose ๐‘ฃ essential (similarly for ๐‘ค). Then ๏ฎ(๐บ\v)=๏ฎ(๐บ)โˆ’1. By induction, โˆƒ ๐ดโ€ฒ and ๐‘€โ€ฒ of ๐บ\v s.t. โˆƒ exactly ๐‘œ๐‘((๐บ\v)\Aโ€ฒ)โˆ’|๐ดโ€ฒ| ๐‘€โ€ฒ-exposed nodes. Let ๐ด=๐ดโ€ฒโˆช{๐‘ฃ}. Since ๐‘œ๐‘((๐บ\v)\Aโ€ฒ)=๐‘œ๐‘(๐บ\A), r.h.s. of (5.1) (for ๐บ) increases by 1 for this choice of ๐ด. By assumption, โˆƒ ๐‘€ that satisfies (5.1) with equality. Hence the number of ๐‘€-exposed nodes is exactly ๐‘œ๐‘(๐บ\A)โˆ’|๐ด|. Combinatorial Optimization 2016

13 (2) By Lemma 5.5, ๐บ has a tight circuit containing ๐‘ฃ๐‘ค.
Applying induction to ๐บโ€ฒ=๐บร—๐ถ, โˆƒ ๐‘€โ€ฒ and ๐ดโ€ฒ s.t. |๐‘€โ€ฒ-exposed nodes|=๐‘œ๐‘(๐บโ€ฒ\๐ดโ€ฒ)โˆ’|๐ดโ€ฒ|. Note that ๐ถ is not in ๐ดโ€ฒ by (5.3) since it is an inessential node of ๐บโ€ฒ, by Lemma 5.5. By Proposition 5.4, we can extend ๐‘€โ€ฒ to a matching ๐‘€ of ๐บ having the same number of exposed nodes. When we delete ๐ดโ€ฒ from ๐บ, we have the same number of odd components as we delete ๐ดโ€ฒ from ๐บโ€ฒ, because if one contains ๐ถ, that node will now be replaced by ๐‘‰(๐ถ) nodes and the component of ๐บโˆ–๐ดโ€ฒ containing them will still be odd. Thus we get a matching ๐‘€ and a set ๐ดโ€ฒ of nodes such that the number of ๐‘€-exposed nodes is exactly ๐‘œ๐‘(๐บ\๐ดโ€ฒ)โˆ’|๐ดโ€ฒ|, as required. ๏‚ Combinatorial Optimization 2016

14 5.2 Maximum Matching Alternating Trees
Will consider perfect matching first, then maximum matching. Given a matching ๐‘€ and a fixed ๐‘€-exposed node ๐‘Ÿ of ๐บ, an ๐‘€-alternating tree is a tree rooted at ๐‘Ÿ and the edges in ๐‘€ appear alternately. (Leaves of the tree are in ๐ต(๐‘‡)) The nodes in an ๐‘€-alternating tree ๐‘‡ are ๐ด(๐‘‡)โˆช๐ต(๐‘‡). ๐ด(๐‘‡): the set of nodes in ๐‘‡ which have odd distance from the root (odd nodes of ๐‘‡) ๐ต(๐‘‡): the set of nodes in ๐‘‡ which have even distance from the root (even nodes of ๐‘‡). ๐‘Ÿ is included in ๐ต(๐‘‡) ๐‘Ÿ Combinatorial Optimization 2016

15 Construction of an ๐‘€-alternating tree; Begin with ๐ด=โˆ…, ๐ต={๐‘Ÿ}.
If ๐‘ฃ๐‘คโˆˆ๐ธ,๐‘ฃโˆˆ๐ต,๐‘คโˆ‰๐ดโˆช๐ต,๐‘ค๐‘งโˆˆ๐‘€, then add ๐‘ค to ๐ด, ๐‘ง to ๐ต. (5.4) We may be able to identify an ๐‘€-augmenting path from an ๐‘€-alternating tree. Properties (a) Every node of ๐‘‡ other than ๐‘Ÿ is covered by an edge of ๐‘€โˆฉ๐ธ(๐‘‡) (b) For every node ๐‘ฃ of ๐‘‡, the path in ๐‘‡ from ๐‘ฃ to ๐‘Ÿ is ๐‘€-alternating. Note that |๐ต(๐‘‡)|=|๐ด(๐‘‡)|+1 ๐‘Ÿ Combinatorial Optimization 2016

16 Use ๐’—๐’˜ to extend ๐‘ป Use ๐’—๐’˜ to augment ๐‘ดโ€ฒ
Input: A matching ๐‘€โ€ฒ of a graph ๐บโ€ฒ, an ๐‘€โ€ฒ-alternating tree ๐‘‡, and an edge vw of ๐บโ€ฒ such that ๐‘ฃโˆˆ๐ต(๐‘‡), ๐‘คโˆ‰๐‘‰(๐‘‡) and ๐‘ค is ๐‘€โ€ฒ-covered. Action: Let ๐‘ค๐‘ง be the edge in ๐‘€โ€ฒ covering ๐‘ค. (Note that ๐‘ง is not a node of ๐‘‡.) Replace ๐‘‡ by the tree having edge-set ๐ธ(๐‘‡)โˆช{๐‘ฃ๐‘ค, ๐‘ค๐‘ง} Use ๐’—๐’˜ to augment ๐‘ดโ€ฒ Input: A matching ๐‘€โ€ฒ of a graph ๐บโ€ฒ, an ๐‘€โ€ฒ-alternating tree ๐‘‡ of ๐บโ€ฒ with root ๐‘Ÿ, and an edge ๐‘ฃ๐‘ค of ๐บโ€ฒ such that ๐‘ฃโˆˆ๐ต(๐‘‡), ๐‘คโˆ‰๐‘‰(๐‘‡) and ๐‘ค is ๐‘€โ€ฒ-exposed. Action: Let ๐‘ƒ be the path obtained by attaching ๐‘ฃ๐‘ค to the path from ๐‘Ÿ to ๐‘ฃ in ๐‘‡. Replace ๐‘€โ€ฒ by ๐‘€โ€ฒโ–ณ๐ธ(๐‘ƒ). Combinatorial Optimization 2016

17 We call an ๐‘€-alternating tree ๐‘‡ in a graph ๐บ frustrated if every edge of ๐บ having one end in ๐ต(๐‘‡) has the other end in ๐ด(๐‘‡). Prop 5.6: Suppose that ๐บ has a matching ๐‘€ and an ๐‘€-alternating tree ๐‘‡ that is frustrated. Then ๐บ has no perfect matching. (Pf) Consider ๐บ\A(๐‘‡). Every element of ๐ต(๐‘‡) is a single-node odd component of ๐บ\A(๐‘‡). Since |๐ด(๐‘‡)|<|๐ต(๐‘‡)|, ๐บ has no perfect matching (by Tutte's Matching Theorem). ๏‚ ๐‘Ÿ Combinatorial Optimization 2016

18 Perfect Matching Algorithm for Bipartite Graphs
The Bipartite Case Perfect Matching Algorithm for Bipartite Graphs Set ๐‘€=โˆ… ; Choose an ๐‘€-exposed node ๐‘Ÿ and put ๐‘‡=({๐‘Ÿ}, โˆ…) ; While there exists ๐‘ฃ๐‘คโˆˆ๐ธ with ๐‘ฃโˆˆ๐ต(๐‘‡), ๐‘คโˆ‰๐‘‰(๐‘‡) If ๐‘ค is ๐‘€-exposed Use ๐‘ฃ๐‘ค to augment ๐‘€ ; If there is no ๐‘€-exposed node in ๐บ Return the perfect matching ๐‘€ and stop ; Else Replace ๐‘‡ by ({๐‘Ÿ}, โˆ…), where ๐‘Ÿ is ๐‘€-exposed ; Use ๐‘ฃ๐‘ค to extend ๐‘‡ ; Stop ; ๐บ has no perfect matching. Combinatorial Optimization 2016

19 Prop 5.7: (correctness of the perfect matching algorithm for bipartite graphs)
Suppose that ๐บ is bipartite, that ๐‘€ is a matching of ๐บ, and that ๐‘‡ is an ๐‘€-alternating tree such that no edge of ๐บ joins a node in ๐ต(๐‘‡) to a node not in ๐‘‰(๐‘‡). Then ๐‘‡ is frustrated, and hence ๐บ has no perfect matching. (Pf) Need to show that every edge having an end in ๐ต(๐‘‡) has the other end in ๐ด(๐‘‡). Only possible exception would be an edge joining two nodes in ๐ต(๐‘‡), but this creates an odd circuit which is impossible in a bipartite graph. Hence ๐‘‡ is frustrated. ๏‚ ๐‘Ÿ Combinatorial Optimization 2016

20 The Blossom Algorithm for Perfect Matching
Idea : Shrinking of odd circuits. (Edmonds, 1965) Can be extended for maximum matching problem. Let ๐บโ€ฒ be a graph obtained from ๐บ by a sequence of odd circuit shrinkings. We call ๐บโ€ฒ a derived graph of G. Two types of nodes in ๐บโ€ฒ: (1) nodes of ๐บ (called original nodes of ๐บโ€ฒ) (2) not nodes of ๐บ (called pseudonodes) Given a node ๐‘ฃ of ๐บโ€ฒ, define a set ๐‘†(๐‘ฃ) of nodes of ๐บ: (1) ๐‘†(๐‘ฃ)={๐‘ฃ} , ๐‘ฃโˆˆ๐‘‰ (2) ๐‘ฃ=๐ถ, a pseudonode, then ๐‘†(๐‘ฃ)=โˆช๐‘†(๐‘ค), ๐‘คโˆˆ๐‘‰(๐ถ). Cardinality is odd. Prop 5.8: Let ๐บโ€ฒ be a derived graph of ๐บ. Let ๐‘€โ€ฒ be a matching of ๐บโ€ฒ, and let ๐‘‡ be an ๐‘€โ€ฒ-alternating tree of ๐บโ€ฒ such that no element of ๐ด(๐‘‡) is a pseudenode. If ๐‘‡ is frustrated, then ๐บ has no perfect matching. (Pf) Delete ๐ด(๐‘‡) from ๐บ. Get a component ๐‘†(๐‘ฃ) for each ๐‘ฃโˆˆ๐ต(๐‘‡). Therefore, ๐‘œ๐‘(๐บ\A(๐‘‡))>|๐ด(๐‘‡)|, so ๐บ has no perfect matching. ๏‚ Combinatorial Optimization 2016

21 But not sure which odd circuit should be shrunk.
A perfect matching in the derived graph ๐บโ€ฒ can be extended to a perfect matching in ๐บ. If frustrated tree in ๐บโ€ฒ exists, then no perfect matching in ๐บ. But not sure which odd circuit should be shrunk. not frustrated blossom ๐‘ค ๐‘Ÿ ๐‘ฃ ๐‘ข ๐ถ ๐‘Ÿ ๐‘ข Combinatorial Optimization 2016

22 Use ๐’—๐’˜ to shrink and update ๐‘ดโ€ฒ and ๐‘ป
Input: A matching ๐‘€โ€ฒ of a graph ๐บโ€ฒ, an ๐‘€โ€ฒ-alternating tree ๐‘‡, and an edge ๐‘ฃ๐‘ค of ๐บโ€ฒ such that ๐‘ฃ, ๐‘คโˆˆ๐ต(๐‘‡) Action: Let ๐ถ be the circuit formed by ๐‘ฃ๐‘ค together with the path in ๐‘‡ from ๐‘ฃ to ๐‘ค. Replace ๐บโ€ฒ by ๐บโ€ฒร—๐ถ, ๐‘€โ€ฒ by ๐‘€โ€ฒโˆ–๐ธ(๐ถ), and ๐‘‡ by the tree (in ๐บโ€ฒ) having edge-set ๐ธ(๐‘‡)โˆ–๐ธ(๐ถ). Prop 5.9: After application of the shrinking subroutine, ๐‘€โ€ฒ is a matching of ๐บโ€ฒ, ๐‘‡ is an ๐‘€โ€ฒ-alternating tree of ๐บโ€ฒ, and ๐ถโˆˆ๐ต(๐‘‡). Combinatorial Optimization 2016

23 Blossom Algorithm for Perfect Matching
Input graph ๐บ and matching ๐‘€ of ๐บ (If ๐‘€ is perfect, terminate); Set ๐‘€โ€ฒ=๐‘€, ๐บโ€ฒ=๐บ ; Choose an ๐‘€โ€ฒ-exposed node ๐‘Ÿ of ๐บโ€ฒ and put ๐‘‡=({๐‘Ÿ}, โˆ…) ; While there exists ๐‘ฃ๐‘คโˆˆ๐ธโ€ฒ with ๐‘ฃโˆˆ๐ต(๐‘‡), ๐‘คโˆ‰๐ด(๐‘‡) Perform following operations; Return ๐บโ€ฒ, ๐‘€โ€ฒ, ๐‘‡ and stop, ๐บ has no perfect matching Combinatorial Optimization 2016

24 Blossom Algorithm for Perfect Matching (continued)
While there exists ๐‘ฃ๐‘คโˆˆ๐ธโ€ฒ with ๐‘ฃโˆˆ๐ต(๐‘‡), ๐‘คโˆ‰๐ด(๐‘‡) case: ๐‘คโˆ‰๐‘‰(๐‘‡), ๐‘ค is ๐‘€โ€ฒ-exposed Use ๐‘ฃ๐‘ค to augment ๐‘€โ€ฒ ; Extend ๐‘€โ€ฒ to a matching ๐‘€ of ๐บ ; Replace ๐‘€โ€ฒ by ๐‘€, ๐บโ€ฒ by ๐บ ; If there is no ๐‘€โ€ฒ-exposed node in ๐บโ€ฒ Return the perfect matching ๐‘€โ€ฒ and stop ; Else Replace ๐‘‡ by ({๐‘Ÿ}, โˆ…), where ๐‘Ÿ is ๐‘€โ€ฒ-exposed ; case: ๐‘คโˆ‰๐‘‰(๐‘‡), ๐‘ค is ๐‘€โ€ฒ-covered Use ๐‘ฃ๐‘ค to extend ๐‘‡ ; case: ๐‘คโˆˆ๐ต(๐‘‡) Use ๐‘ฃ๐‘ค to shrink and update ๐‘€โ€ฒ and ๐‘‡ ; Return ๐บโ€ฒ, ๐‘€โ€ฒ, ๐‘‡ and stop, ๐บ has no perfect matching Combinatorial Optimization 2016

25 Moreover, it determines correctly whether ๐บ has a perfect matching.
Thm 5.10: The blossom algorithm terminates after ๐‘‚(๐‘›) augmentations, ๐‘‚(๐‘›2) shrinking steps, ๐‘‚(๐‘›2) tree-extension steps. Moreover, it determines correctly whether ๐บ has a perfect matching. (Pf) Algorithm maintains a matching throughout and each augmentation reduces the number of ๐‘€-exposed nodes โ‡’ ๐‘‚(๐‘›) augmentation. Each shrinking decreases the number of nodes in ๐‘‡. Each tree-extension decreases the number of nodes โˆ‰๐‘‡ โ‡’ ๐‘‚(๐‘›) steps between augmentation. โ‡’ Total ๐‘‚(๐‘›2) shrinking and tree-extension. If algorithm halts concluding that ๐บ has no perfect matching, it has found a frustrated tree. Hence, by Prop 5.8, ๐บ has no perfect matching. ๏‚ Combinatorial Optimization 2016

26 The Blossom Algorithm for Maximum Matching
Use the algorithm for perfect matching to find a maximum matching Apply perfect matching algorithm to ๐บ. If it finds a perfect matching, it is maximum, stop. Otherwise, delete ๐‘‰(๐‘‡) from ๐บโ€ฒ. New ๐บโ€ฒ does not have pseudonodes and may include some matching edges not deleted. Apply the perfect matching algorithm to new ๐บโ€ฒ again. Continuing the process until no exposed nodes left, we obtain frustrated trees ๐‘‡1, ๐‘‡2, โ€ฆ, ๐‘‡๐‘˜ and matching in the trees. Roots of ๐‘‡ ๐‘– are the only exposed nodes. Let ๐ด be the union of ๐ด( ๐‘‡ ๐‘– ) for all ๐‘–. If we delete ๐ด from ๐บ, each of the nodes ๐ต( ๐‘‡ ๐‘– ) for every ๐‘– will give an odd component. So we have ๐‘œ๐‘(๐บ\A)โ‰ฅ|๐ด|+๐‘˜ ( ๐‘œ๐‘(๐บ\A)โˆ’|๐ด|โ‰ฅ๐‘˜, ๐‘˜ is a lower bound on the number of exposed nodes ) Since we have a matching with ๐‘˜ exposed nodes, the matching is maximum. This provides constructive proof of Tutte-Burge formula. Combinatorial Optimization 2016

27 Implementation of the Blossom Algorithm
Represent ๐บโ€ฒ implicitly by keeping a representation of the partition of ๐‘‰ determined by the sets ๐‘†(๐‘ฃ) for all ๐‘ฃโˆˆ๐‘‰(๐บโ€ฒ). (Similar to Kruskal's alg.) Given edge ๐‘ฃ๐‘คโˆˆ๐ธ, need to identify ๐‘…(๐‘ฃ) and ๐‘…(๐‘ค), where ๐‘…(๐‘ฃ) is the member of the partition of the nodes that contains ๐‘ฃ. Use "find" and "merge" operations for sets to handle blossoms. ๐‘‚(๐‘š log ๐‘› ) for each augmentation. Thm 5.11: The blossom algorithm can be implemented to run ๐‘‚(๐‘›๐‘š log ๐‘› ). Further improvement possible: augmenting on the shortest augmenting path gives ๐‘‚( ๐‘› ๐‘š) Combinatorial Optimization 2016


Download ppt "Chapter 5. Optimal Matchings"

Similar presentations


Ads by Google