Download presentation
Presentation is loading. Please wait.
Published byBenjamin Malone Modified over 5 years ago
1
Graph Matching Shmuel Wimer prepared and Instructed by
Eng. Faculty, Bar-Ilan University March 2014 Graph Matching
2
Matching in Bipartite Graphs
A matching in an undirected graph πΊ is a set of pairwise disjoint edges. A perfect matching consumes (saturates) all πΊβs vertices. Also called complete matching. πΎ π,π has π! perfect matchings. (why?) πΎ 2π+1 has no perfect matchings. (why?) πΎ 2π has (2π)!/(2ππ!) perfect matchings. (why?) March 2014 Graph Matching
3
Maximum Matching A maximal matching is obtained by iteratively enlarging the matching with a disjoint edge until saturation. A maximum matching is a matching of largest size. It is necessarily maximal. Given a matching π, an π΄-alternating path π is alternating between edges in π and edges not in π. Let πβs end vertices be not in π. Replacement of Mβs edges with πΈ(π)βπ produces a matching πβ such that |πβ|=|π|+1, called π΄-augmentation. March 2014 Graph Matching
4
Maximum matching has no augmentation path. (why?)
Symmetric Difference: πΊ π, πΈ πΊ π» π, πΈ π» πΊβπ»βπΉ π, πΈ πΊ β πΈ π» Symmetric difference is used also for matching. If π and πβ² are two matchings then πΞπβ²=(πβͺπβ²)β(πβ©πβ²). March 2014 Graph Matching
5
and cycles must be of even lengths. (why?)
Theorem. (Berge 1957) A matching π in a graph πΊ is a maximum matching iff πΊ has no π-augmentation path. Proof. Maximum => no π-augmentation. As if πΊ would have π-augmentation path, π could not be maximum. For no π-augmentation => maximum, suppose that π is not maximum. We construct an π-augmentation. Consider a matching πβ², |πβ²|>|π|, and Let πΉ be the spanning subgraph of πΊ with πΈ(πΉ)=πΞπβ². π and πβ² are matchings so a vertex of πΉ has degree 2 at most. πΉ has therefore only disjoint paths and cycles, and cycles must be of even lengths. (why?) March 2014 Graph Matching
6
Hallβs Matching Conditions
Since |πβ²|>|π| there is an edge alternating path with more edges of πβ² than π, and consequently there is an π-augmentation in πΊ. β Hallβs Matching Conditions π applicants apply for π jobs, |π|β«|π|. Each applicant applies for a few jobs. Can all the jobs be assigned? π π Denote π(π) the neighbors in π of πβπ. |π(π)|β₯|π| is clearly necessary for a matching saturating π. March 2014 Graph Matching
7
Theorem. (Hall 1935) If πΊ[π,π] is bipartite then πΊ has a bipartition matching saturating π iff |π(π)|β₯|π| for all πβπ. Proof. Sufficiency. Let π be maximum and for each πβπ , there is |π(π)|β₯|π|. Let π be not saturated. There exists therefore π’βπ, not π-saturated. We will find π contradicting the theoremβs hypothesis. π π π’ π π=π(π) March 2014 Graph Matching
8
Let πβπ and πβπ be reachable from π’ by π΄-alternating paths
Let πβπ and πβπ be reachable from π’ by π΄-alternating paths. We claim that π matches π with πβπ’. The paths reach π by edges not in M and π by πβs edges. Since π is maximum, there is no π-augmentation paths, so every vertex of π is π-saturated. Every π¦βπ extends via π to a vertex in π. Also, πβπ’ is reached by π from π, thus |π|=|πβπ’|=|π|β1. March 2014 Graph Matching
9
The matching between π and πβπ’ implies πβπ π .
In fact, π=π π . If there was an edge from π to a vertex π¦βπβπ, it could not be in π, yielding an alternating path to π¦, contradicting π¦βπ. Therefore, |π(π)|=|π|=|π|β1<|π|, which is a contradiction of the theoremβs hypothesis. β March 2014 Graph Matching
10
For |π|=|π|, Hallβs Theorem is the Marriage Theorem, proved originally by Frobenius in 1917, for a set of π men and π women. If also every man is compatible (mutual preference) with π women and vice versa, there exists a perfect matching of compatible pairs (perfect matrimonial ο). Corollary. Every π-regular bipartite graph (π>0) has a perfect matching. Proof. Let π,π be the bipartition. Counting edges from π to π and from π to π yields π|π|=π|π| => |π|=|π|. March 2014 Graph Matching
11
Showing that Hallβs Theorem conditions are satisfied is sufficient, as a matching saturating π (π) will be perfect. Consider an arbitrary πβπ. The number π of edges connecting π to π is π=π|π| and those π edges are incident to π(π). The total number of edges incident to π(π) is π|π(π)|. There is therefore πβ€π|π(π)|. We thus obtained π|π|=πβ€π|π(π)|, satisfying Hallβs Theorem sufficient condition |π|β€|π(π)|. β March 2014 Graph Matching
12
Min-Max Dual Theorems Can something be said on whether a matching is maximum when a complete matching does not exist? Exploring all alternating paths to find whether or not there is an π-augmentation is expensive. We rather consider a dual problem that answers it efficiently. Definition. A vertex cover of πΊ is a set π of vertices containing at least one vertex of all πΊβs edges. We say that πβs vertices cover πΊβs edges. March 2014 Graph Matching
13
No two edges in a matching are covered by a single vertex
No two edges in a matching are covered by a single vertex. The size of a cover is therefore bounded below by the maximum matching size. Exhibiting a cover and a matching of the same size will prove that both are optimal. Each bipartite graph possesses such min-max equality, but general graphs not necessarily. minimum cover=2,3 maximum matching=2 March 2014 Graph Matching
14
Theorem. (KΣ§nig 1931, EgervΓ‘ry 1931) If πΊ[π,π] is bipartite, the sizes of maximum matching and minimum vertex cover are equal. Proof. Let π be a πΊβs vertex cover, and π a πΊβs matching. There is always |π|β₯|π|. Let π be a minimum cover. We subsequently construct a matching π from π such that |π|=|π|. Let π
=πβ©π and π=πβ©π. Two bipartite subgraphs π» and π»β² are induced by π
βͺ(πβπ) and πβͺ(πβπ
), respectively. March 2014 Graph Matching
15
If we construct a complete matching in π» of π
into πβπ and a complete matching in π»β² of π into πβπ
, their union will be a matching in πΊ of size |π|, proving the theorem. It is impossible to have an edge connecting πβπ
with πβπ. Otherwise, π would not be a cover. Hence the matchings in π» and π»β² are disjoint. π π» π»β π π π
π March 2014 Graph Matching
16
Same arguments hold for π»β. β
Showing that Hallβs Theorem conditions are satisfied by π» and π»β will ensure that matchings saturating π
and π exist. Let πβπ
and consider π π» π βπβπ. If |ππ»(π)|<|π| we could replace π by ππ»(π) in π and obtain a smaller vertex cover, contradicting π being minimum. Therefore |ππ»(π)|β₯|π| and Hallβs Theorem conditions hold in π». π» has therefore a complete matching of π
into πβπ. Same arguments hold for π»β. β March 2014 Graph Matching
17
Independent Sets in Bipartite Graphs
Definition. The independence number πΌ(πΊ) of a graph πΊ is the maximum size of an independent vertex set. πΌ(πΊ) of a bipartite graph does not always equal the size of a partite set. Definition. An edge cover is an edge set covering πΊβs vertices. Notation πΌ(πΊ): maximum size of independent set. πΌβ²(πΊ): maximum size of matching. π½(πΊ): minimum size of vertex cover. π½β²(πΊ): minimum size of edge cover. March 2014 Graph Matching
18
In this notation the KΣ§nig-EgervΓ‘ry Theorem states that for every bipartite graph πΊ, πΌβ²(πΊ)=π½(πΊ).
Since there are no edges between the vertices of an independent set, the edge cover of the graph cannot be smaller, and therefore πΌ(πΊ)β€π½β²(πΊ). We will also prove that for every bipartite graph πΊ (without isolated vertices) πΌ(πΊ)=π½β²(πΊ). Lemma. πβπ πΊ is an independent set iff π is a vertex cover, and hence πΌ(πΊ)+π½(πΊ)=π(πΊ) (π(πΊ):=|π|). March 2014 Graph Matching
19
Proof. π independence => there are no edges within π, so π must cover all the edges. Conversely, π covers all the edges => no edges connecting two vertices of π. β Theorem. (Gallai 1959) If πΊ has no isolated vertices, then πΌβ²(πΊ)+π½β²(πΊ)=π(πΊ). Proof. Let π be a maximum matching (πΌβ²(πΊ):= |π|). We can use it to construct an edge cover of πΊ by adding an edge incident to each of the π(πΊ)β2|π| unsaturated vertices, yielding edge cover of size π + π πΊ β2 π =π πΊ β π =π πΊ βπΌβ²(πΊ). The smallest edge cover π½β²(πΊ) is a lower bound. Therefore, π(πΊ)βπΌβ²(πΊ)β₯π½β²(πΊ). March 2014 Graph Matching
20
πΏ is therefore a collection of π isolated star subgraphs.
Conversely, let πΏ be a minimum edge cover (π½β²(πΊ):=|πΏ|). πΏ cannot contain cycles, nor paths of more than two edges. (why?) πΏ is therefore a collection of π isolated star subgraphs. There are π vertices at star centers, anyway covered by the π(πΊ)βπ peripheral. Thus |πΏ|=π(πΊ)βπ. The π isolated star subgraphs yield a π-size matching by arbitrarily choosing one edge per star. A maximum matching cannot be smaller than π, thus πΌ β² πΊ β₯π=π(πΊ) β π½β²(πΊ). All in all, π(πΊ) = πΌβ²(πΊ) + π½β²(πΊ). β March 2014 Graph Matching
21
Corollary. (KΣ§nig 1916) If πΊ is bipartite with no isolated vertices, πΌ(πΊ)=π½β²(πΊ). (|maximum independent set| =|minimum edge cover|). Proof. By the last lemma there is πΌ(πΊ)+π½(πΊ)=π(πΊ). By Gallai Theorem there is π(πΊ)=πΌβ²(πΊ)+π½β²(πΊ). From KΣ§nig-EgervΓ‘ry Theorem πΌβ²(πΊ)=π½(πΊ) (|maximum matching|=|minimum vertex cover|), and πΌ(πΊ)=π½β²(πΊ) follows. β March 2014 Graph Matching
22
Maximum Matching Algorithm
Augmentation-path characterization of maximum matching inspires an algorithm to find it. A matching is enlarged step-by-step, one edge at a time, by discovering an augmentation path. If an augmentation path is not found, We will show a vertex cover of same size as the current matching. KΣ§nig-EgervΓ‘ry Min-Max Theorem ensures that the matching is maximum. An iteration looks at π-unsaturated vertices only at one partite since an augmented path must have its two ends on distinct partite. March 2014 Graph Matching
23
We search for all π-unsaturated vertices
We search for all π-unsaturated vertices. Starting at an unsaturated vertex π₯, a tree of π-alternating paths rooted at π₯ is implied. Starting with zero matching, πΌβ²(πΊ) applications of the Augmentation Path Algorithm produce a maximum matching. πβπ x1 x2 x3 x4 x5 x6 y1 y2 y3 y4 y5 y6 π=π π x1 x2 x3 x4 x5 x6 y1 y2 y3 y4 y5 y6 π March 2014 Graph Matching
24
New augmented matching.
πβπ x1 x2 x3 x4 x5 x6 y1 y2 y3 y4 y5 y6 End of iteration. New augmented matching. x1 x2 x3 x4 x5 x6 y1 y2 y3 y4 y5 y6 π π No augmentation found. Max matching found. March 2014 Graph Matching
25
Initialization: π=π, π=β
.
Algorithm (an iteration finding π-augmentation path). Input: πΊ[π,π], matching π in πΊ, all π-unsaturated vertices πβπ. Initialization: π=π, π=β
. Iteration: If all π is marked stop: π is a maximum matching and πβͺ(πβπ) is a minimum cover. Otherwise, select unmarked π₯βπ. Consider each π¦βπ π such that π₯π¦βπ. If π¦ is unsaturated an π-ugmentation path from π to π¦ exists. Augment π. Otherwise, π¦ is matched by π with some π€βπ. In that case add π¦ to π and π€ to π. March 2014 Graph Matching
26
After exploring all edges incident to π₯, mark π₯ and iterate. β
Theorem. Repeated application of the Augmenting Path Algorithm to a bipartite graph produces matching and a cover of the same size. Proof. Consider πβͺ(πβπ) upon termination. π-alternating path from π enters π only via πβs edges, hence there is a matching between πβπ and π. An π-alternating path traverses from π₯βπ into π along any π-unsaturated edge, thus π π₯ βπ. March 2014 Graph Matching
27
Since the algorithm marks all π₯βπ before termination, there could not be an unsaturated edge connecting π to πβπ. πΉ=π»βͺ(πΏβπΊ) is therefore a vertex cover. Upon termination π is saturated by π (otherwise π-augmentation occurs), hence π¦βπ is π-matched to π. Since πβπ contained all the π-unsaturated vertices, πβπ is π-saturated, but with edges not involved in π. π therefore involves at least π + πβπ edges. Hence π΄ β₯ π» + πΏβπΊ = πΉ . Since |matching|β€ |covering| always, equality and optimality follow. β March 2014 Graph Matching
28
Weighted Bipartite Matching
Maximum matching in bipartite graphs generalizes to nonnegative weighted graphs. Missing edges are zero weighted, so πΊ= πΎ π,π is assumed. Example. A farming company has π farms π= π₯ 1 ,β¦, π₯ π and π plants π= π¦ 1 ,β¦, π¦ π . The profit of processing π₯ π in π¦ π is π€ ππ β₯0. Farms and plants should 1:1 matched. The government will pay the company π’ π to stop farm π production and π£ π to stop plant π manufacturing. If π’ π + π£ π < π€ ππ the company will not take the offer and π₯ π and π¦ π will continue working. March 2014 Graph Matching
29
What should the government offer to completely stop the farms and plants ?
It must offer π’ π + π£ π β₯ π€ ππ for all π, π. The government also wishes to minimize π’ π π£ π . Definitions. Given an πΓπ matrix π΄, a transversal is a selection of π entries, one for each row and one for each column. Finding a transversal of π΄ with maximum weight sum is called the assignment problem, a matrix formulation of the maximum weighted matching problem, where we seek a perfect matching π maximizing π€(π). March 2014 Graph Matching
30
The labels π’= π’ π and π£= π£ π cover the weights π€= π€ ππ if π’ π + π£ π β₯ π€ ππ for all π, π.
The minimum weighted cover problem is to find a cover π’, π£ minimizing the cost π π’,π£ = π’ π π£ π . The maximum weighted matching and the minimum weighted cover problems are dual. They generalize the bipartite maximum matching and minimum cover problem. (how ?) The edges are assigned with weight from 0,1 , and the cover is restricted to use only integral labels from 0,1 . Vertices receiving 1 form the cover. March 2014 Graph Matching
31
Lemma. If π is a complete (perfect) matching in a bipartite graph πΊ and π’,π£ is a cover, π π’,π£ β₯π€ π .
Furthermore, π π’,π£ =π€ π iff π consists of edges π₯ π π¦ π such that π’ π + π£ π = π€ ππ . π is then a maximum weight matching and π’,π£ is a minimum weight cover. Proof. Since the edges of π are disjoint, it follows from the constraints π’ π + π£ π β₯ π€ ππ that summation over all πβs edges yields π π’,π£ β₯π€ π . If π π’,π£ =π€ π equality π’ π + π£ π = π€ ππ must hold for each of the π summand. Finally, since π€(π) is bounded by π π’,π£ , equality implies that both must be optimal. β March 2014 Graph Matching
32
Weighted Bipartite Matching Algorithm
The relation between maximum weighted matching and edge covered by equalities lends itself to an algorithm, named the Hungarian Algorithm. It combines π-augmentation path with cover trimming. Denote by πΊ π’,π£ the subgraph of πΎ π,π spanned by the edges π₯ π π¦ π satisfying π’ π + π£ π = π€ ππ . The algorithm ensures that if πΊ π’,π£ has a perfect matching (in πΊ), its weight is π’ π π£ π and by the lemma both matching and cover are optimal. Otherwise, the algorithm modifies the cover. March 2014 Graph Matching
33
Algorithm. (Kuhn 1955, Munkres 1957)
Input: Bipartition πΊ[π,π] and weights of πΎ π,π . Idea: maintain a cover π’,π£, iteratively reducing its cost, until the equality graph πΊ π’,π£ has a perfect matching. Initialization: Define a feasible labeling π’ π = max π π€ ππ , and π£ π =0. Find a maximum matching π in πΊ π’,π£ (apply path augmentation to πΊ π’,π£ ). Iteration: If π is perfect in πΊ[π,π] stop. π is a maximum weight matching by the lemma. Else, let πβπ be the π-unsaturated in π and πβπ, and πβπ be reached from π by π-alternating paths. March 2014 Graph Matching
34
π in πΊ π’,π£ π π π +π βπ π π π Let π=min π’ π + π£ π β π€ ππ | π₯ π βπ, π¦ π βπβπ Decrease π’ π by π for all π₯ π βπ and increase π£ π by π for all π¦ π βπ . Derive a new equality graph πΊβ² π’,π£ . If it contains an π-augmentation path, replace π by a maximum matching in πΊβ² π’,π£ . Iterate anyway. β March 2014 Graph Matching 34
35
Minimum surplus from π to πβπ: π=minβ‘{8β6,6β1} =2
4 8 6 π’ π£ π π 1 6 4 8 π’ π£ π π π 1 6 4 8 πΊ π’,π£ π π π 1 6 4 8 π’ π£ πΊ π’,π£ π π π Minimum surplus from π to πβπ: π=minβ‘{8β6,6β1} =2 March 2014 Graph Matching
36
To validate, the total edge weight is 16, same as the total cover.
π π 1 6 4 8 π’ 2 π£ π π 1 6 4 8 π’ 2 π£ πΊβ² π’,π£ π π which is a maximum in πΊβ² π’,π£ is a perfect matching in πΊ and therefore it is maximum weight matching. To validate, the total edge weight is 16, same as the total cover. March 2014 Graph Matching
37
Theorem. The Hungarian Algorithm finds a maximum weight matching and a minimum cost cover.
Proof. The algorithm begins with a cover, each iteration produces a cover, and termination occurs only when the equality graph πΊ π’,π£ has a perfect matching in πΊ. Consider the numbers π’β²,π£β², obtained from the cover π’,π£, after decreasing π and increasing π by π. If π₯ π βπ and π¦ π βπ, then π’β² π + π£β² π = π’ π + π£ π and cover holds. March 2014 Graph Matching
38
If π₯ π βπβπ and π¦ π βπβπ, then π’β² π + π£β² π = π’ π + π£ π and cover holds.
If π₯ π βπβπ and π¦ π βπ, then π’β² π + π£β² π = π’ π + π£ π +π, hence cover holds. Finally, if π₯ π βπ and π¦ π βπβπ, then π’β² π + π£β² π = π’ π + π£ π βπ. Since π was the smallest surplus from π to πβπ, cover holds. March 2014 Graph Matching
39
The termination condition ensures that optimum is achieved
The termination condition ensures that optimum is achieved. It is required therefore to show that termination occurs after a finite number of iterations. First, π never decreases since πΊ π’,π£ β πΊβ² π’,π£ . If π increases, great. If not, then π increases in πΊβ² π’,π£ . That follows from the addition of a new cover-equal edge between π and πβπ, traversed in πΊβ² π’,π£ by an π-alternating path emanating from π (π-unsaturated). β March 2014 Graph Matching
40
Stable Matching Preferences are optimized Instead of total weight.
A matching of π men and π women is stable if there is no man-woman pair π₯,π such that π₯ and π prefer each other over their current partners. Otherwise the matching is unstable; π₯ and π will leave their current partners and will switch to each other. π₯π, π¦π, π§π, π€π is stable. Men: π₯,π¦,π§,π¦ π₯: π>π>π>π π¦: π>π>π>π π§: π>π>π>π π€: π>π>π>π Women: π,π,π,π π: π§>π₯>π¦>π€ π: π¦>π€>π₯>π§ π: π€>π₯>π¦>π§ π: π₯>π¦>π§>π€ March 2014 Graph Matching
41
Algorithm. (Gale-Shapley Proposal Algorithm).
Gale and Shapley proved that a stable matching always exists and can be found by a simple algorithm. Algorithm. (Gale-Shapley Proposal Algorithm). Input: Preference ranking by each of π men and π women. Idea: produce stable matching using proposals while tracking past proposals and rejections. Iteration: Each unmatched man proposes to the highest woman on his list which has not yet rejected him. If each woman receives one proposal stop. a stable matching is obtained. March 2014 Graph Matching
42
Otherwise, at least one woman receives at least two proposals
Otherwise, at least one woman receives at least two proposals. Every such woman rejects all but the highest on her list, to which she says βmaybeβ. β Theorem. (Gale-Shapley 1962) The Proposal Algorithm produces stable matching. Proof. The algorithm terminates (with some matching) since at each nonterminal iteration at least one woman rejects a man, reducing the list of π 2 potential mates. Observation: the proposals sequence made by a man is non increasing in his preference list, whereas the list of βmaybeβ said by a woman is non decreasing in her list. March 2014 Graph Matching
43
(Repeated proposals by a man to the same woman and repeated βmaybeβ answers are possible, until rejected or assigned.) If matching is unstable, there is π₯,π and π¦,π mates, where 1: π₯ prefers π over π and 2: π prefers π₯ over π¦. 1: Since on π₯βs preference list π>π, π₯ proposed to π before it proposed to π, a time where π₯ must have already been rejected by π. 2: By the observation, the βmaybeβ answer sequence made by π is non decreasing in its preferences. Since on πβs list π¦<π₯, π₯ could never propose to π, hence a contradiction to 1. β March 2014 Graph Matching
44
Question: Which gender is happier using Gale-Shapley Algorithm
Question: Which gender is happier using Gale-Shapley Algorithm? (The algorithm is asymmetric.) When the first choice of all men are distinct, they all get their highest possible preference ο, whereas the women are stuck with whomever proposed ο. The precise statement of βthe men are happierβ is that if we switch the role of men and women, each woman winds up happy and each man winds up unhappy at least as in the original proposal algorithm. (homework) If women propose to men they get π₯π,π¦π,π§π,π€π , which are their first choices . March 2014 Graph Matching
45
Of all stable matching, men are happiest by the male-proposal algorithm whereas women are happiest by the female-proposal algorithm. (homework) Study the case where all men and all women have same preference lists. (homework) The algorithm can be used for assignments of new graduates of medicine schools to hospitals. Who is happier, young doctors or hospitals? Hospitals are happier since they run hospital-proposal. Hospitals started using it on early 50βs to avoid chaos, ten years before Gale-Shapley algorithm was proved. March 2014 Graph Matching
46
Matching in Arbitrary Graphs
We shall establish a lower bound on the uncovered vertices of a maximum matching π in a graph πΊ. Definition. An odd component of a graph is a component of odd order (odd number of vertices). π πΊ is the number of odd components of a graph πΊ. If π is a matching in πΊ and π is the uncovered vertices, each odd component of πΊ must include at least one vertex not covered by π, hence |π|β₯π πΊ . This inequality can be extended to all induced subgraphs of πΊ. March 2014 Graph Matching
47
Let πβπ πΊ , and let π» be an odd component of πΊβπ
Let πβπ πΊ , and let π» be an odd component of πΊβπ. If π» is fully covered by π (all π»βs vertices touched), there must be at least one π£βπ» matching a vertex of π. πΊ π odd even πΊβπ π At most |π| vertices of πΊβπ can be matched by π with those of π. March 2014 Graph Matching
48
Consider the uncovered vertices π of a matching π in πΊ.
π»βπΊ odd component π π πβπΊ At least π πΊβπ β|π| odd components must have a vertex not covered by π, hence |π|β₯π πΊβπ β|π|, for any πβπ πΊ . March 2014 Graph Matching
49
Does πΊ have a perfect matching ?
πΊβπ πΊ π Does πΊ have a perfect matching ? π πΊβπ =5, whereas |π|=3, hence |π|β₯2. Claim. If it happens that for some matching π and π΅βπ πΊ there is |π|=π(πΊβπ΅)β|π΅|, then π is a maximum matching. (homework) March 2014 Graph Matching
50
Such π΅ is called a barrier of πΊ and is a certificate that π is maximum.
|π|β₯2 πΌ π΄ π is maximum since |π|=2. March 2014 Graph Matching
51
Any minimum covering of a bipartite graph is a barrier. (homework)
The empty set is trivially a barrier of any graph possessing a perfect matching since |π|=π(πΊ)=0. Any single vertex is also a barrier of any graph possessing a perfect matching. (why?) The empty set is a barrier of a graph for which a deletion of one vertex results in a subgraph possessing a perfect matching. (why?) The union of barriers of the components of a graph is a barrier of the graph. (homework) Any minimum covering of a bipartite graph is a barrier. (homework) March 2014 Graph Matching
52
Definition: A factor of πΊ is a spanning subgraph of πΊ.
Definition: A π-factor is a π-regular (all vertices have degree π) spanning subgraph. A perfect matching is π- factor. Theorem. (Tutteβs 1-Factor Theorem 1947) A graph πΊ has 1-factor iff π(πΊβπ)β€|π| for every πβπ(πΊ). Proof (LovΓ‘sz 1975). (Only if) Let πΊ have 1-factor (perfect matching) and πβπ(πΊ). 1-factor βπ(πΊβπ)β€|π| was shown before. The proof of the opposite direction is more complex. Tutteβs condition is preserved under edge addition, namely, if π(πΊβπ)β€|π|, so it is for πΊ β² =πΊ+π. March 2014 Graph Matching
53
That follows since edge addition may merge two components into one, hence π(πΊβ²βπ)β€π(πΊβπ)β€|π|.
Proof plan. We will consider a graph πΊ possessing Tutteβs condition and assume in contrary that it has no 1-factor, but the addition of any edge obtains 1-factor. We then add two edge π, π and construct a 1-factor in πΊβ²=πΊ+ π,π . We then remove π,π and show the existence of 1-factor in πΊ, hence a contradiction. π(πΊ) must be even. That follows by taking π=β
, so π(πΊβπ)β€0, hence no odd component could exist. March 2014 Graph Matching
54
Let πβπ(πΊ) be such that π£ βπ is connected to all πΊβ²s vertices and suppose that πΊβπ consists of disjoint cliques. π πΊβπ odd clique even clique πΊβπ vertices are arbitrarily paired up, with the leftover residing in the odd components. Since π πΊβπ β€ π , the leftover ones matched to any of π. March 2014 Graph Matching
55
Since π¦βπ, there is π€βπΊβπ, non adjacent to π¦.
π is a clique of its own, hence all its rest vertices (even) are paired up and 1-factor in πΊ exists. We must therefore consider for the contradiction establishment that πΊβπ is not made all of cliques. There must be non-adjacent vertices π₯,π§βπΊβπ sharing a common vertex π¦ (otherwise π₯,π§ are in a clique, or πΊβπ is an independent set). Since π¦βπ, there is π€βπΊβπ, non adjacent to π¦. March 2014 Graph Matching
56
Consider πΊ with the edges of πΉ= π 1 β π 2 . There is π₯π§,π¦π€βπΉ.
Recall that πΊ was chosen to be maximal not having 1- factor, such that the addition of any edge will turn it to possess 1-factor. Let π 1 and π 2 be the 1-factors in πΊ+π₯π§ and πΊ+π¦π€, respectively. By πΊ maximality π₯π§βπ 1 and π¦π€βπ 2 . It suffices to show that π 1 βͺ π 2 has 1-factor avoiding π₯π§ and π¦π€, in contradiction with the maximality of πΊ. Consider πΊ with the edges of πΉ= π 1 β π 2 . There is π₯π§,π¦π€βπΉ. Since the degree of any πΊβs vertex in π 1 and π 2 is exactly one (perfect matchings), πΉ has only isolated vertices and disjoint even cycles. March 2014 Graph Matching
57
If both π₯π§,π¦π€βπΆ, the following cycle occurs.
Let πΆ be the cycle in πΉ, π₯π§βπΆ. If π¦π€βπΆ, a 1-factor is established by π 2 β©πΆ βͺ π 1 \πΆ , avoiding both π₯π§ and π¦π€. If both π₯π§,π¦π€βπΆ, the following cycle occurs. π 2 π 1 π¦ π€ π₯ π§ π 2 π 1 π¦ π€ π₯ π§ Here is a matching of π πΆ avoiding both π₯π§ and π¦π€. Outside πΆ either π 1 or π 2 edges are used, yielding perfect matching in πΊ. β March 2014 Graph Matching
58
Example. Let πΊ π,πΈ be a simple graph (no parallel edges and loops) of 2π vertices. Let the degree π π£ β₯π, βπ£βπ. Show that πΊ has a perfect matching. Solution. If πΊ has no perfect matching, let πΉ be a largest (maximum) possible matching. Let π₯,π¦ βπΉ. Since πΉ is not perfect and π =2π, there are at least two unmatched vertices π’,π£ and edge π’,π£ does not exist. Consider how π₯,π¦ and π’,π£ can be connected. Assume there are at least 3 edges involved. March 2014 Graph Matching
59
But π π’ +π π£ β₯2π, hence a contradiction. β
π₯ π¦ π’ π£ π₯ π¦ There are 2 independent edges which can be used for matching if π₯,π¦ is removed, contradicting that πΉ is a largest matching. Consequently, π’,π£ cannot be both connected to any of the vertices involved in πΉ, which number is at most 2πβ2. Consequently, π π’ +π π£ β€2πβ2. But π π’ +π π£ β₯2π, hence a contradiction. β March 2014 Graph Matching
60
Problem Denote by πΌ πΊ the size of the largest independent set of πΊ
Problem Denote by πΌ πΊ the size of the largest independent set of πΊ. Show that the vertices of a graph πΊ π,πΈ can be covered by no more than πΌ πΊ vertex- disjoint paths.
61
Proof: Let π 1 be a maximum independent set of πΊ, and let π π+1 be the maximum independent set of πΊβ π 1 β π 2 ββ―β π π . There is π π+1 β€ π π by construction. Since π π and π π+1 are independent sets, for any π π₯,π¦ βπΊ π π βͺ π π+1 there is π₯β π π and π¦β π π+1 . Hence πΊ π π βͺ π π+1 is bipartite, denoted πΊ π π , π π+1 . π π π π+1
62
We show that the minimum vertex cover satisfies π½ πΊ π π , π π+1 = π π+1 .
Firstly, for any π£β π π there is π π£ β€1. Otherwise π π would not be maximal by its choice since it could be enlarged by replacing π£β π π by few vertices of π π+1 . Hence, the minimum vertex cover may consist of π π+1 vertices alone. It must include all the vertices of π π+1 , as otherwise π π could be enlarged, hence not maximal by its choice. Consequently π½ πΊ π π , π π+1 = π π+1 .
63
By KΓΆnigβs theorem there isπ½ πΊ π π βͺ π π+1 = πΌ β² πΊ π π βͺ π π+1
By KΓΆnigβs theorem there isπ½ πΊ π π βͺ π π+1 = πΌ β² πΊ π π βͺ π π Hence there is a matching πΉ π+1 of π π+1 into π π . π π+1 π π πΉ 2 βͺ πΉ 3 βͺβ― consists of π 2 vertex-disjoint paths covering π πΊ , except π 1 β π 2 vertices of π 1 . Taking these as one-point paths, we obtain π 1 =πΌ πΊ vertex-disjoint paths covering π πΊ . β
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.