Matching and Factors Matchings and Covers. Definitions: A matching M in a graph G is a set of non loop edges with no shared endpoints. G M.

Slides:



Advertisements
Similar presentations
Min-Max Relations, Hall’s Theorem, and Matching-Algorithms Graphs & Algorithms Lecture 5 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Advertisements

Lecture 5 Graph Theory. Graphs Graphs are the most useful model with computer science such as logical design, formal languages, communication network,
Edge-connectivity and super edge-connectivity of P 2 -path graphs Camino Balbuena, Daniela Ferrero Discrete Mathematics 269 (2003) 13 – 20.
Bipartite Matching, Extremal Problems, Matrix Tree Theorem.
Walks, Paths and Circuits Walks, Paths and Circuits Sanjay Jain, Lecturer, School of Computing.
Graph Matching prepared and Instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University March 2014Graph Matching1.
Algorithms and Networks
Augmenting path algorithm Two theorems to recall: Theorem (Berge). A matching M in a graph G is a maximum matching in G iff G has no M-augmenting.
GOLOMB RULERS AND GRACEFUL GRAPHS
1 Weighted Bipartite Matching Lecture 4: Jan Weighted Bipartite Matching Given a weighted bipartite graph, find a matching with maximum total weight.
Yangjun Chen 1 Bipartite Graphs What is a bipartite graph? Properties of bipartite graphs Matching and maximum matching - alternative paths - augmenting.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
k-Factor Factor: a spanning subgraph of graph G
Mycielski’s Construction Mycielski’s Construction: From a simple graph G, Mycielski’s Construction produces a simple graph G’ containing G. Beginning with.
Matchings Matching: A matching in a graph G is a set of non-loop edges with no shared endpoints.
Matchings Lecture 3: Jan 18. Bipartite matchings revisited Greedy method doesn’t work (add an edge with both endpoints free)
Definition Hamiltonian graph: A graph with a spanning cycle (also called a Hamiltonian cycle). Hamiltonian graph Hamiltonian cycle.
Maximum Bipartite Matching
Matchings Matching: A matching in a graph G is a set of non-loop edges with no shared endpoints Maximal Matching: A maximal matching in a graph is a matching.
Yangjun Chen 1 Bipartite Graph 1.A graph G is bipartite if the node set V can be partitioned into two sets V 1 and V 2 in such a way that no nodes from.
1 Bipartite Matching Lecture 3: Jan Bipartite Matching A graph is bipartite if its vertex set can be partitioned into two subsets A and B so that.
Definition Dual Graph G* of a Plane Graph:
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
Factor Factor: a spanning subgraph of graph G
Factor Factor: a spanning subgraph of graph G k-Factor: a spanning k-regular subgraph Odd component: a component of odd order o(H): the number of odd components.
Lecture 11. Matching A set of edges which do not share a vertex is a matching. Application: Wireless Networks may consist of nodes with single radios,
K-Coloring k-coloring: A k-coloring of a graph G is a labeling f: V(G)  S, where |S|=k. The labels are colors; the vertices of one color form a color.
K-Coloring k-coloring: A k-coloring of a graph G is a labeling f: V(G)  S, where |S|=k. The labels are colors; the vertices of one color form a color.
Maximum Bipartite Matching In a graph G, if no M-augmenting path exists, then M is a maximum matching in G. Idea: Iteratively seek augmenting paths to.
GRAPH Learning Outcomes Students should be able to:
Graph Theory Chapter 6 Planar Graphs Ch. 6. Planar Graphs.
Subdivision of Edge In a graph G, subdivision of an edge uv is the operation of replacing uv with a path u,w,v through a new vertex w.
CSE, IIT KGP Matchings and Factors. CSE, IIT KGP Matchings A matching of size k in a graph G is a set of k pairwise disjoint edges.A matching of size.
Hungarian Algorithm Vida Movahedi Elderlab, York University June 2007.
3.3 Matchings and Factors: Matchings in General Graphs This copyrighted material is taken from Introduction to Graph Theory, 2 nd Ed., by Doug West; and.
Section 2.1 “Matching in bipartite graphs” in Graph Theory Handout for reading seminar.
Mycielski’s Construction Mycielski’s Construction: From a simple graph G, Mycielski’s Construction produces a simple graph G’ containing G. Beginning with.
Graph Colouring L09: Oct 10. This Lecture Graph coloring is another important problem in graph theory. It also has many applications, including the famous.
Graph Theory Ch. 3. Matchings and Factors 1 Chapter 3 Matchings and Factors Matchings and Covers Algorithms and Applications Matchings in General Graph.
3.2 Matchings and Factors: Algorithms and Applications This copyrighted material is taken from Introduction to Graph Theory, 2 nd Ed., by Doug West; and.
Matching Algorithms and Networks. Algorithms and Networks: Matching2 This lecture Matching: problem statement and applications Bipartite matching Matching.
Chapter 1 Fundamental Concepts Introduction to Graph Theory Douglas B. West July 11, 2002.
1/24 Introduction to Graphs. 2/24 Graph Definition Graph : consists of vertices and edges. Each edge must start and end at a vertex. Graph G = (V, E)
Connectivity and Paths 報告人:林清池. Connectivity A separating set of a graph G is a set such that G-S has more than one component. The connectivity of G,
Bipartite Matching. Unweighted Bipartite Matching.
1 “Graph theory” Course for the master degree program “Geographic Information Systems” Yulia Burkatovskaya Department of Computer Engineering Associate.
5.8 Graph Matching  Example: Set of worker assign to a set of task  Four tasks are to be assigned to four workers.  – Worker 1 is qualified to do tasks.
Graph Theory and Applications
Matching Algorithms and Networks. Algorithms and Networks: Matching2 This lecture Matching: problem statement and applications Bipartite matching Matching.
Assignments and matchings Chapter 12 Presented by Yorai Geffen.
Matching Lecture 19: Nov 23.
Network Flows Chun-Ta, Yu Graduate Institute Information Management Dept. National Taiwan University.
Graph Algorithms Maximum Flow - Best algorithms [Adapted from R.Solis-Oba]
Introduction to Graph Theory
Theory of Computing Lecture 12 MAS 714 Hartmut Klauck.
12. Lecture WS 2012/13Bioinformatics III1 V12 Menger’s theorem Borrowing terminology from operations research consider certain primal-dual pairs of optimization.
Iterative Improvement for Domain-Specific Problems Lecturer: Jing Liu Homepage:
Approximation Algorithms Greedy Strategies. I hear, I forget. I learn, I remember. I do, I understand! 2 Max and Min  min f is equivalent to max –f.
Indian Institute of Technology Kharagpur PALLAB DASGUPTA Graph Theory: Matchings and Factors Pallab Dasgupta, Professor, Dept. of Computer Sc. and Engineering,
Proof of correctness of Dijkstra’s algorithm: Basically, we need to prove two claims. (1)Let S be the set of vertices for which the shortest path from.
Graph Theory Ch. 3. Matchings and Factors 1 Chapter 3 Matchings and Factors.
1 Graphs Chapters 10.1 and 10.2 University of Maryland Chapters 10.1 and 10.2 Based on slides by Y. Peng University of Maryland.
Bipartite Graphs What is a bipartite graph?
Algorithms and Networks
Algorithm Design and Analysis
Chapter 5. Optimal Matchings
Instructor: Shengyu Zhang
Analysis of Algorithms
V12 Menger’s theorem Borrowing terminology from operations research
Presentation transcript:

Matching and Factors Matchings and Covers

Definitions: A matching M in a graph G is a set of non loop edges with no shared endpoints. G M

Definitions: The vertices incident to the edges of a matching M are saturated by M; the others are unsaturated ( we say M- saturated and M-unsaturated). A perfect matching in a graph is a matching that saturates every vertex. G M

Maximum & Maximal matchings A maximal matching in a graph is a matching that cannot be enlarged by adding an edge. A maximum matching is a matching of maximum size among all matchings in the graph. Maximal ≠ maximum

M-alternating path Given a matching M, a M-alternating path is a path that alternates between edges in M and edges not in M M !M M

M-augmenting path M-augmenting paths can be used to enlarge matchings. M !M M An M-alternating path whose endpoints are unsaturated by M.

Theorem A matching M in a graph G is a maximum matching in G if and only if G has no M-augmenting path. Only if: Trivial.

Symmetric difference If G and H are graphs with vertex set V, then symmetric difference GΔH is the graph with vertex set V whose edges are all those edges appearing in exactly one of G and H. We also use this notation for sets of edges; If M and M ’ are matchings, then MΔM ’ = (M-M ’ ) ∪ (M ’ -M)

G M M’ M Δ M’ Symmetric difference M Δ M’

Lemma Every component of the symmetric difference of two matchings is a path or an even cycle Proof: Let F = M Δ M ’ 1. Every vertix has at most one incident edge from M and M ’ ( d(v) <=2 ) Because M and M ’ are matchings 2. ∵ Δ( F ) <=2 , every component of f is a path or a cycle.

Lemma proof (cont’d) 3. Every path or cycle in F alternates between edges of M and edges of M ’ ∴ Every cycle has even length, with an equal number of edges from M and M ’. G M M’ M Δ M’

Proof of Theorem If part: A matching M in a graph G is a maximum matching in G if G has no M- augmenting path. Contrapositive: G has a matching larger than M => G has an M-augmenting path. Proof: Let M ’ be a matching in G larger than M; we construct an M-augmenting path.

Proof of Theorem (cont’d) Let F = M Δ M ’ By Lemma F consists of paths and even cycles. ( And they are M - M ’ alternating) Since |M ’ | > |M|F must have a component with more edges of M ’ than of M Cycles: Edges from M and M ’ are of equal numbers. Paths: Only start and ends with edges of M ’ That is an M-augmenting path in G.

Hall’s Matching Condition Seek a matching that saturates X X Y Jobs Applicants X, Y- bigraph and jobs filling problem

Hall’s Theorem An X, Y-bigraph G has a matching that saturates X if and only if | N(S)| ≧ |S| for all S  X Proof: –Necessity:The |S| vertices matched to S must lie in N(S) –Sufficiency: Contrapositive: If M is a maximum matching in G and M does not saturate X, then we can find a set S  X such that |N(S)| < |S|. (Notice that if maximum matching M doesn ’ t saturate X, implies X cannot be saturated anyway)

Proof of Hall’s Theorem (Sufficiency) Let u  X be a vertex unsaturated by M. u …..M-alternating paths ….. reachable: S and T ( u  S) X Y u S T

M matches T with S – {u}. 1. S – {u} is reached by an edge in M from a vertex in T. 2. T is all saturated. Because no M-augmenting path. ( M maximum) 3. 1.&2. Bijection from T to S - {u} ∴ |T| = |S - {u}| X Y u S T

T = N(S) 1. T  N(S) ( T are matched with S-{u}) 2. No vertex in N(S) other than T ∴ T = N(S) Suppose y  Y – T has a neighbor v  S. vy not in M: Because u is unsaturated and all the rest of S is matched to T by M. thus adding vy to an M-alt. path to v yields an M-alt. path to y => contradiction y not reachable X Y u S T = N(S) y (doesn’t exist) v

Completes the proof T = N(S) ∴ |N(S)| = |T| = |S| -1 < |S| For a X,Y- bigraph which X cannot be saturated, we have found a subset S of X, such that |N(S)| < |S|. We always can find it.

Corollary For k >0, every k-regular bipartite graph has a perfect matching. Proof: 1. Counting edges by endpoints in X and in Y. k|X| = k|Y| ∴ |X|=|Y|. Perfect problem -> Hall ’ s condition. (Because saturating X also saturates Y) 2. For all S  X, let m : number of edges from S to N(S). From S: m = k|S|. From N(S): m  k|N(S)|. ∴ k|S|  k|N(S)|. Hall ’ s condition satisfied.

Vertex cover Definition:A vertex cover of a graph G is a set Q  V(G) that contains at least one endpoint of every edge. Q covers E(G). Policemen watch(cover); Minimum cover. G No vertex can cover more than one edge of a matching. Min Vertex Cover of G  Maximum Matching of G

Vertex cover Min Vertex Cover of G  Maximum Matching of G Existence of “ equality = “ PROVES both min and max. Exist?? G

Theorem If G is a bipartite graph, then the maximum size of a matching in G equals the minimum size of a vertex cover of G. Proof: Let Q be a vertex cover, M be a matching in G. |Q|  |M|. Given a smallest Q, we construct a matching of size |Q|

Proof R = Q∩X , T = Q∩Y. H: the subgraph of G induced by R ∪ (Y-T); H ’ the subgraph induced by T ∪ (X- R). X Y H H’ T R S

Use Hall ’ s theorem to show H has a matching that saturates R into Y-T, and H ’ has a matching that saturates T. Since H and H ’ are disjoint, the two matchings form a matching of size |Q| in G. Since R ∪ T is a vertex cover, G has no edge from Y- T to X – R. For each S  R, N H (S) is contained in Y-T. If |N H (S) | < |S| then we can substitute N H (S) for S!!! And form a vertex cover smaller than Q. But Q is minimum. So R is saturated in H. Similarly T is saturated in H ’. T N H (S)

Min-max relation A maximization problem M and a minimization problem N defined on the same instances. Dual pair: if for every solution m in M and for every solution n in N, m  n then “ = “ proves both.

Independent Sets and Covers The Independence number of a graph is the maximum size of an independent set of vertices. (Independent set: within which any pair of vertices is not adjacent) No edge contains two vertices of an independent set. (compares: No vertex covers two edges of a matching)

Edge cover Definition: And edge cover of G is a set L of edges such that every vertex of G is incident to some edge of L. Vertices of G are covered by the edges of L. Only G ’ s without isolated vertices. G

Dual problems. Notation: Maximum size of independent set α(G) Maximum size of matching α ’ (G) Minimum size of vertex cover β(G) Minimum size of edge cover β ’ (G) We already have: In bipartite G, α ’ (G) = β(G). β ’ (G)  α(G)

Lemma In a graph G, S  V(G) is an independent set if and only if S-bar is a vertex cover, and hence α(G) + β(G) = n(G). Proof: 1. Only if: since S is an independent set, then every edge is incident to at least one vertex of S-bar. i.e. S-bar is a vertex cover. ( S to S, S to S-bar, S-bar to S-bar) 2. If: S-bar covers all edges, then there are no edges joining vertices of S (S-bar ’ s bar)

Theorem If G is a graph without isolated vertices, then α ’ (G) + β ’ (G) = n(G). Construction both sides: From a maximum matching M …. An edge cover of size n(G) - |M|. ∴ β ’ (G)  n(G) – |M| (α ’ (G)). From a minimum edge cover L …..A matching of size n(G) - |L|, ∴ α ’ (G)  n(G) – |L| (β ’ (G))

F rom a maximum matching M …. An edge cover of size n(G) - |M| 1. Adding to M one edge incident to each unsaturated vertex. (We can always find such edge incident to M) This is an edge cover. 2. Green use 1 vertex, blue use 2 ∴ the size of this edge cover = n(G) - |M| G M

F rom a minimum edge cover L …. A matching of size n(G) - |L| 1. Every component of L has at most one vertex v such that d(v) > 1, and is a star. v d(v) > 1 In L: Shouldn’t be in L. Otherwise green one can be omitted

F rom a minimum edge cover L …. A matching of size n(G) - |L| (cont’d) 2. Let L has k components ( k stars). Summing all edges of these stars: |L| = n(G) – k. 3.Choosing one edge from each star in L, we form a matching M of size k = n(G) - |L| L: k stars M: size k

Corollary By two constructions: β ’ (G)  n(G) – α ’ (G) α ’ (G)  n(G) – β ’ (G) ∴ α ’ (G) + β ’ (G) = n(G). Corollary: If G is a bipartite graph with no isolated vertices, then α(G) = β ’ (G) By Lemma and Theorem α(G)+β(G)= α ’ (G) + β ’ (G)

Algorithms and Applications Maximum bipartite matching Search for augmenting paths. If non, we find a vertex cover with the same size as the matching, thereby prove it to be maximum.

APA Algorithm Input: An X, Y-bigraph G, a matching M in G, and the set U of M-unsaturated vertices in X. Idea: From U ---  (M alt. Paths) ---  Reachable: S  X and T  Y. Try to extend path. Mark vertices of S that has been tried.

APA Algorithm Initialization: S = U and T =  Iteration: –If S has no unmarked vertex, terminate and report T ∪ (X-S) as a minimum cover and M as a maximum matching –Else: select an unmarked x  S. consider each y  N(x) such that xy  M y unsaturated: terminate and report an M- augmenting path from U to y. y saturated: y is matched to some w  X by M. include y in T( reach from x), include w in S(reach from y). after all y done, mark x, iterate.

APA Algorithm X Y U S T x y wx y w y w X-S

Correctness of APA Theorem: Repeatedly applying the APA to a bipartite graph produces a matching and a vertex cover of equal size. Equivalent: Prove that APA either produces an M-augmenting path or a vertex cover of size |M|.

Correctness of APA APA terminate on 2 cases. 1. Report an M-augmenting path. Finished. 2. Marking all vertices in S and report R = T ∪ (X-S) to be a vertex cover of size |M|. We must prove R.

R is a vertex cover and size =|M| Show there is no edge joining S to Y-T SX-S T Y-T e e is not in M:U (no M) and S-U(only via M to T) e is not in non-M: If yes, Y-T reachable.

R is a vertex cover and size =|M| Size of R: 1. The algorithm puts only saturated vertices in T ∴ each vertex in T is matched via M to S. 2. Since U  S, every vertex of X-S is saturated; and each vertex in X-S is matched to Y-T via M. (because all T to S) 3. |M| >= |T| + |X-S|. But no M can be bigger than this. | T | | X-S | S Y-T

Time complexity of APA Let G be an X, Y- bigraph with n vertices and m edges. Since α ’ (G) <= n, applying APA in O(n) times. Each APA explores X at most once before marking it. Each vertex x we look each N(x) once, so each edge in G is looked at most once …….. O(m) Overall: O(mn)

Matching and Factors Algorithm

U X Y APA Algorithm: Iteration 1 end S:U T:  Unsaturated: report an M-aug. path

U X Y APA Algorithm: Iteration 2 S:U T:  Saturated  put up arrows Adjust S & T

U X Y APA Algorithm: Iteration 2 end S:(From U via M-alt.path reachable) T: Unsaturated  report an M-aug. path

U X Y APA Algorithm: Iteration 3 S:= U T:=  Saturated  put up arrows Adjust S & T

U X Y APA Algorithm: Iteration 3 S:  U T: Saturated  put up arrows Adjust S & T

U X Y APA Algorithm: Iteration 3 S: T: Saturated  put up arrows Adjust S & T

U X Y APA Algorithm: Iteration 3 end S: T: Unsaturated: report an M-aug. path ( This time the arrows are useful )

U X Y APA Algorithm: Iteration 4 S: T:

U X Y APA Algorithm: Last Iteration S: T: Saturated  put up arrows Adjust S & T

U X Y APA Algorithm: Last Iteration S: T: Saturated  put up arrows Adjust S & T

U X Y APA Algorithm: Last Iteration S: T: Saturated  put up arrows Adjust S & T

U X Y APA Algorithm: Last Iteration S: T: Saturated  put up arrows Adjust S & T

U X Y APA Algorithm: Last Iteration S: T: Saturated  put up arrows Adjust S & T

U X Y APA Algorithm: Last Iteration S: T: All vertices in S are exhausted; Terminate and report a vertex cover

X-S X Y APA Algorithm: Last Iteration end S: T: T ∪ (X-S) is a vertex cover M is a maximum matching of the same size

Correctness of APA T Y-T e e is not in M:U (no M) and S-U(only via M to T) e is not in non-M: If yes, Y-T reachable. SX-S Vertex cover: because there is no edge joining S to Y-T

| T ∪ (X-S) | = | M | 1. T are all matched 2. X-S are all matched, too. 3. |M| >= |T| + |X-S|. But no M can be bigger than this. | T | | X-S | S Y-T

0 0 Weighted Bipartite Matching Matching generalized by giving weights on edges; Seek for maximum weighted matching Fill up to Kn,n with 0 X Y

Weighted Matching & Cover Dual: farmer and government. Weights = profit; Cover = compensation u i + v j  w i,j X Y Farms Processing Plants u1=4 u2=3 v1= v2=

Weighted Matching & Cover Farmer: maximize Σ w i,j Government: minimize Σ ( u i + v j ) Cost(u, v) v j  w(M) They are dual; Equality holds if M is consist of only u i +v j = w ij X Y Farms Processing Plants u1=4 u2=3 v1= v2=

Matrix representation: X: n farms Y: n plants

Hungarian Algorithm Adjust the cover;until we find a cover C(u,v) = w(M) Better viewed in Matrix

Hungarian Algorithm Excess : government over paying. 4 0

Hungarian Algorithm Excess matrix.

Hungarian Algorithm ????? ?41603 ?00376 ?23450 ?34034 ?40586 Target: all excess 0, both optimum.

Hungarian Algorithm Equality subgraph S Maximum matching of S Vertex cover of S T R T

Hungarian Algorithm Equality subgraph S Maximum matching of S Vertex cover of S T R T ε : minimum excess ε= 1 -ε

Hungarian Algorithm Equality subgraph S Maximum matching of S Vertex cover of S T R T ε : minimum excess ε= 1 -ε +ε +1

Hungarian Algorithm Equality subgraph S Maximum matching of S Vertex cover of S T R T ε : minimum excess ε= 1 -ε +ε One more 0: Equality subgraph BIGGER Only R and T get +ε, but R and T are saturated More and More 0 for unsaturated vertex

Hungarian Algorithm Equality subgraph S Maximum matching of S Vertex cover of S TTT Next Iteration: ε = 1

Hungarian Algorithm Equality subgraph S Maximum matching of S Vertex cover of S Result: Matching and Cover

Remark Non-weighted maximum matching & vertex cover problem is a special (1,0) problem.

Stable matching a,b,c,d ….. matching with x,y,z,w ….. with preference (for example: a: z >x >y>w) Unstable matching: a prefer x, x prefer a, but (a,x) unmatched  (a,x) unstable ab yx For a: x > y For x: a > b

Stable matching Stable matching: a perfect matching without unstable pair. Proposal Algorithm ( greedy) xyzwxyzw abcdabcd x: a b c d y: a c b d z: c d a b w: c b a d a: z x y w b: y w x z c: w x y z d: x y z w

Stable matching xyzwxyzw abcdabcd x: a b c d y: a c b d z: c d a b w: c b a d a: z x y w b: y w x z c: w x y z d: x y z w Step 1: Two proposer, refuse the less like one

Stable matching xyzwxyzw abcdabcd x: a b c d y: a c b d z: c d a b w: c b a d a: z x y w b: y w x z c: w x y z d: x y z w Step 2: Two propose r, refuse the less like one Observation: X moves right and O moves left.

Stable matching xyzwxyzw abcdabcd x: a b c d y: a c b d z: c d a b w: c b a d a: z x y w b: y w x z c: w x y z d: x y z w Step 3: Every woman gets only one proposal. Agree and stop.

Stable matching Proof of correctness: There doesn ’ t exist some (a,x) unstable. Men (the ones who propose) are happier.

Matching and Factors Factors

Definition Fatctor: spanning subgraph in G K- factor: spanning k – regular subgraph 3 factor

Definition 1 – Fatctor A 1 – factor is a perfect match with its vertices. 1 factorPerfect match

Tutte’s condition  s  V(G), o(G-s)  |s| Tutte ’ s theorem: A graph G has a 1- factor, if and only if T.C. holds. S

Tutte’s condition  s  V(G), o(G-s)  |s| Tutte ’ s theorem: A graph G has a 1-factor, if and only if T.C. holds. Some s that creates too many odd components when we delete s. S Odd component Even component

Tutte’s Theorem If G has a 1 factor, T.C. holds Pf: o(G-s)  |s| odd even distinct s

Tutte’s Theorem If T.C. holds, then G has a 1 factor Pf: Add an edge e G ’ satisfies T.C. (maybe has 1 factor) Complete graph. Certainly has 1 factor Keep adding G satisfies T.C but has no 1 factor 1: Adding e does not increase o(G-s), so T.C. still holds 2: If G’ has no 1 factor, then G has no 1 factor. So does the graph before G.

Tutte’s Theorem There exist a step ( the last graph without 1 factor) in which: Let G and G ’ be such graphs. Adding any edge e G ’ satisfies T.C. and has 1 factor G satisfies T.C but has no 1 factor

Tutte’s Theorem If G and G ’ are such graphs, we want to show that G also has 1-factor. Contradiction. U: degree = n(G)-1 U G-U

Case 1 If (G-U ) consist of only disjoint complete component. Let ’ s pair G  G has 1 factor U G-U complete Note: n(G) is even. Let s =  o(G-s) <= |s| Even component can pair by itself Odd component can pair by itself and one to U The left vertices are in U, and is even, can be paired in U.

Case 2 If (G-U ) is not a disjoint union of cliques. In (G-U) there exist: xz y w Not adjacent Distance = 2

Case 2 G + xz has 1 factor M1 ; G + yw has 1 factor M2 M1  M2 G x z w y M1M2

Case 2 G + xz has 1 factor M1 ; G + yw has 1 factor M2 M1  M2 :Only even cycles or isolated vertices G x z w y M1M2

Case 2 G + xz has 1 factor M1 ; G + yw has 1 factor M2 M1  M2 :Only even cycles or isolated vertices G x z w y Other cycle

Remark Parity | G-s| = parity o(G-s) O(G-s) +|s| has the same parity as n(G). O(G-s) -|s| has the same parity as n(G). If n(G) is even, and G has no 1-factor (thus o(G-s) > |s|) then at least 2.

Berge –Tutte Formula In general, o(G-s) > |s| for some s ( no perfect matching) The largest number of vertices saturated by a matching in G is : n(G) - d where d= max s  V(G) o(G - S)- |S|

2. o(G’-s’) = o(G-s)  |s| +d = |s’| G Berge –Tutte Formula G does not satisfy T.C. But G ’ = G  K d does. (  is Join), why? For all S ’  V(G’) Kd G’ 1. o(G’-s’)  1  |s’| S G ’ has perfect matching. Deleting Kd, back to G At most d matched turns to unmatched in G. Away from perfect by d i.e. n(G) – d

Petersen Therorem Every regular graph of even degree has a 2 – factor.

f-Factors of Graph Given a function f: V(G)  N  {0}, an f- factor of a graph g is a subgraph such that d H (v) = f(v) for all v  V(G) Assign degree to each vertex. f(w)  d(w) for all w. excess e = d – f.

Theorem A graph G has an f-factor if and only if its transform H has a 1-factor.

Edmonds’ Blossom Algorithm In Bipartite, APA is quick because we explore from each vertex at most once. For x  X, we can only reach via a saturated edge, hence only once can we reach x. In general graph, this doesn ’ t hold.

Edmonds’ Blossom Algorithm Edmond ’ s flower: For some x, if it can be reached from u via a saturated edge, and also via an unsaturated edge, then flower exist. x Stem Blossom

Edmonds’ Blossom Algorithm A blossom can be viewed as a super vertex. Saturated No other saturated can emerge from a blossom

Edmonds’ Blossom Algorithm S: via saturated, T: via unsaturated. A blossom can be detected if we go via unsaturated edge to a vertex S. Contract it. Later expand it.