Matchings 3 - Mathematics

1/12/2015
Ma/CS 6b
Class 4: Matchings in General Graphs
By Adam Sheffer
Reminder: Hall's Marriage Theorem
ο‚—
Theorem. Let 𝐺 = 𝑉1 βˆͺ 𝑉2 , 𝐸 be a
bipartite graph. There exists a matching
of size 𝑉1 in 𝐺 if and only if for every
𝐴 βŠ‚ 𝑉1 , we have 𝐴 ≀ 𝑁 𝐴 .
ο‚—
We say that 𝐺 satisfies Hall’s
condition if for every 𝐴 βŠ‚ 𝑉1 , we
have 𝐴 ≀ 𝑁 𝐴 .
Philip Hall
1
1/12/2015
π‘˜-regular Graphs
ο‚—
A graph 𝐺 = 𝑉, 𝐸 is π‘˜-regular if each
vertex of 𝑉 is of degree π‘˜.
ο‚—
The Petersen graph is a 3-regular graph
with ten vertices:
Example: π‘˜-regular Graphs
ο‚—
For any positive integer 𝑛, what graph do
we know that is 𝑛-regular?
β—¦ 𝐾𝑛 – the complete graph with 𝑛 vertices
(every two vertices are connected). It is
𝑛 βˆ’ 1 -regular.
𝐾7
2
1/12/2015
Example: 2-regular Graphs
ο‚—
For any positive integer 𝑛, what graph do
we know that is 2-regular and has 𝑛
vertices?
β—¦ 𝐢𝑛 – a cycle of size 𝑛.
𝐢6
1-regular Graphs
ο‚—
Problem. Characterize the graphs that are
1-regular.
ο‚—
Answer. These are the graphs whose
edges form a perfect matching (with no
additional edges).
3
1/12/2015
2-regular Graphs
ο‚—
Problem. Characterize the graphs that are
2-regular.
ο‚—
Answer. These are the graphs that consist
only of vertex-disjoint cycles.
π‘˜-factors
ο‚—
Consider a graph 𝐺 = 𝑉, 𝐸 .
β—¦ A spanning subgraph of 𝐺 is a subgraph that
contains all of the vertices of 𝑉.
β—¦ For a positive integer π‘˜, a π‘˜-factor of 𝐺 is a
spanning subgraph of 𝐺 that is π‘˜-regular.
β—¦ A graph contains a 1-factor iff it contains a
perfect matching.
1-factor
2-factor
4
1/12/2015
2-factor Theorem
ο‚—
Theorem. Every 2π‘˜-regular graph
𝐺 = 𝑉, 𝐺 has a 2-factor (where π‘˜ is a
positive integer).
ο‚—
One of the earliest works on graph theory
– by Petersen in 1891.
Julius Petersen
Recall: Eulerian Cycles
An Eulerian path in a graph 𝐺 is a path
that passes through every edge of 𝐺
exactly once.
ο‚— An Eulerian cycle is an Eulerian path that
starts and ends at the same vertex.
ο‚—
a
b
h
c
g
d
f
𝐸 = π‘Žβ†’π‘β†’π‘β†’π‘‘β†’π‘’β†’π‘“β†’π‘”
β†’π‘•β†’π‘Žβ†’π‘‘β†’π‘•β†’π‘’β†’π‘
β†’π‘”β†’π‘β†’π‘“β†’π‘Ž
e
5
1/12/2015
Reminder: Graphs Containing
Eulerian Cycles
ο‚—
Theorem. A connected (possibly not
simple) graph 𝐺 = 𝑉, 𝐸 contains an
Eulerian cycle if and only if every vertex of
𝑉 has an even degree.
οƒΌ
Proof (of 2-factor Theorem)
ο‚—
We assume that 𝐺 is connected.
β—¦ (otherwise, we can consider separately each
component).
ο‚—
Since every degree in 𝐺 is 2π‘˜, it contains
an Eulerian cycle 𝐢.
β—¦ We arbitrarily choose a direction for 𝐢.
β—¦ We split every vertex 𝑣 ∈ 𝑉 into 𝑣 + and 𝑣 βˆ’ .
β—¦ An edge in 𝐢 that went from 𝑣 to 𝑒 now goes
from 𝑣 + to π‘’βˆ’ .
6
1/12/2015
Illustration
π‘Ž
π‘Ž
𝑑
𝑏
𝑏
𝑒
𝑐
𝑑
𝑒
𝑐
π‘Ž+ π‘Žβˆ’
𝑏+
𝑐
+
π‘βˆ’
𝑐
𝑑+ π‘‘βˆ’
𝑒+ π‘’βˆ’
* Unlike our case,
this graph is not
2π‘˜-regular.
βˆ’
Proof (cont.)
ο‚—
We obtain a graph 𝐺 β€² with 2 𝑉 vertices
and 𝐸 edges.
β—¦ We ignore the directions in 𝐺 β€² and notice that
it is a bipartite π‘˜-regular graph.
π‘Ž+ π‘Žβˆ’
𝑏+
𝑐+
π‘βˆ’
𝑑+ π‘‘βˆ’
𝑒+ π‘’βˆ’
π‘βˆ’
7
1/12/2015
Bipartite π‘˜-regular Graphs
Claim. Every bipartite π‘˜-regular graph
𝐡 = 𝑉1 βˆͺ 𝑉2 , 𝐸 contains a perfect
matching.
ο‚— Proof.
ο‚—
β—¦ We have 𝑉1 = 𝑉2 , by double counting the
size of |𝐸|.
β—¦ We complete the proof by showing that 𝐡
satisfies Hall’s condition.
β—¦ For any 𝐴 βŠ‚ 𝑉1 , there are π‘˜ 𝐴 edges that
leave 𝐴. Since every vertex of 𝑁 𝐴 is incident
to at most π‘˜ edges from 𝐴, then 𝑁 𝐴 β‰₯ 𝐴 .
Completing the Proof
ο‚—
We started with a 2π‘˜-regular graph 𝐺.
β—¦ There is an Euler cycle in 𝐺.
β—¦ Splitting every vertex 𝑣 ∈ 𝑉 into 𝑣 + and 𝑣 βˆ’ ,
we obtained a bipartite π‘˜-regular graph 𝐡
with the same set of edges.
β—¦ 𝐡 contains a perfect matching 𝑀.
β—¦ By merging every pair 𝑣 + and 𝑣 βˆ’ back to 𝑣, 𝑀
becomes a 2-factor!
8
1/12/2015
Another Illustration
+
π‘βˆ’
𝑐+
π‘Žβˆ’
𝑑+
𝑓+
𝑏+
βˆ’
π‘Ž
𝑒+
ο‚—
π‘Ž
𝑏
𝑒
π‘‘βˆ’
𝑑
βˆ’
𝑐
π‘“βˆ’
𝑐
𝑒
𝑓
Merging the vertices of the perfect
matching results in a 2-factor.
Today: Mathematical Facts About
Nicolas Cage
9
1/12/2015
Matchings in General Graphs
In bipartite graphs, Hall’s condition
characterizes the graphs that contain a
perfect matching.
ο‚— We now present a similar condition for
general graphs, which we denote as
Tutte’s condition.
ο‚—
W. T. Tutte
Odd Components
ο‚—
Given a graph 𝐺 = (𝑉, 𝐸), we denote by
π‘ž 𝐺 the number of components in 𝐺
that consists of an odd number of
vertices.
π‘ž 𝐺 =4
10
1/12/2015
Tutte’s Condition
ο‚—
We say that a graph 𝐺 = 𝑉, 𝐸 satisfies
Tutte’s condition if for every 𝑆 βŠ‚ 𝑉 we
have
π‘ž πΊβˆ’π‘† ≀ 𝑆 .
𝑆 =4
π‘ž πΊβˆ’π‘† =3
The Easy Direction
Claim. If a graph 𝐺 contains a 1-factor 𝑀,
then it satisfies Tutte’s condition.
ο‚— Proof. For any 𝑆 βŠ‚ 𝑉, consider the
components of 𝐺 βˆ’ 𝑆.
ο‚—
β—¦ Every component with an odd number of
vertices must have at least one edge of 𝑀
connected to a vertex of 𝑆.
β—¦ Thus, π‘ž 𝐺 βˆ’ 𝑆 ≀ 𝑆 .
𝑆
11
1/12/2015
The Other Direction
ο‚—
Claim. If a graph 𝐺 = 𝑉, 𝐸 does not
contain a 1-factor, then it does not satisfy
Tutte’s condition.
β—¦ That is, we need to prove that there exists
𝑆 βŠ‚ 𝑉 such that π‘ž 𝐺 βˆ’ 𝑆 > 𝑆 .
β—¦ Given such a bad set 𝑆, if we remove edges
from 𝐸, then 𝑆 remains a bad set:
ο‚– If we split an odd sized component into
several components, at least one of them is
odd-sized.
Illustration
ο‚—
Removing edges can only increase
π‘ž(𝐺 βˆ’ 𝑆).
|𝑆| = 3
π‘ž πΊβˆ’π‘† =4
|𝑆| = 3
π‘ž πΊβˆ’π‘† =4
12
1/12/2015
Rephrasing the Claim
ο‚—
We saw that if a graph 𝐺 contains a bad
set 𝑆, then 𝑆 remains bad after removing
any number of edges.
β—¦ We say that a graph 𝐺 is edge-maximal
without a 1-factor if it does not contain a 1factor, but adding any one edge to it results in
a 1-factor.
β—¦ Thus, it suffices to prove:
β—¦ Claim. If a graph 𝐺 = 𝑉, 𝐸 is edge-maximal
without a 1-factor, then it does not satisfy
Tutte’s condition.
Drowning in a Swimming Pools
ο‚— Correlation: 0.666004
* Taken from http://tylervigen.com/
13
1/12/2015
Odd Number of Vertices
ο‚—
If 𝐺 has an odd number of vertices, it
obviously contains no 1-factor.
β—¦ In this case, 𝐺 does not satisfy Tutte’s
condition: By taking 𝑆 = βˆ… we have
0 = 𝑆 < π‘ž 𝐺 βˆ’ 𝑆 = 1.
ο‚—
It remains to consider graphs with an
even number of vertices.
Finding a Bad Set
We take 𝑆 βŠ‚ 𝑉 to be the set of vertices
that are connected to every vertex of 𝐺 (it
is possible that 𝑆 = βˆ…).
ο‚— We partition the analysis into two cases:
ο‚—
β—¦ Every component of 𝐺 βˆ’ 𝑆 is a complete
graph (that is, a complete induced subgraph).
β—¦ There is a component of 𝐺 βˆ’ 𝑆 that is not a
complete graph.
14
1/12/2015
The First Case
ο‚—
ο‚—
𝑆 – the set of vertices that are connected to
every vertex of 𝐺.
Consider the case where every connected
component of 𝐺 βˆ’ 𝑆 is complete.
β—¦ If 𝑆 β‰₯ π‘ž 𝐺 βˆ’ 𝑆 , we get a contradiction to 𝐺
not containing a 1-factor, so 𝑆 is a bad set!
β—¦ The 1-factor has one edge between every odd
component and a distinct vertex of 𝑆.
πΊβˆ’π‘†
𝑆
Dying in a Helicopter Accident
ο‚—
Correlation: -0.827811
15
1/12/2015
The Second Case
ο‚—
Assume that a component 𝐢 of 𝐺 βˆ’ 𝑆 that is
not a complete graph.
β—¦ There exist two vertices π‘₯, 𝑧 in 𝐢 that
π‘₯, 𝑧 βˆ‰ 𝐸 but there exists 𝑦 ∈ 𝑉 βˆ– 𝑆 such
that π‘₯, 𝑦 , 𝑦, 𝑧 ∈ 𝐸.
β—¦ Since 𝑦 βˆ‰ 𝑆, there exists a vertex 𝑀 βˆ‰ 𝑆 such
that 𝑦, 𝑀 βˆ‰ 𝐸.
π‘₯
𝑦
𝑆
𝑀
𝑧
Building a New Graph
ο‚—
Recall that adding any edge to 𝐺 results in
a 1-factor contained in it.
β—¦ 𝑀π‘₯𝑧 – 1-factor in 𝐺 after adding π‘₯, 𝑧 .
β—¦ 𝑀𝑦𝑀 – 1-factor in 𝐺 after adding 𝑦, 𝑀 .
β—¦ 𝐹 – the set of edges that are either in 𝑀π‘₯𝑧 or
in 𝑀𝑦𝑀 (but not in both).
β—¦ In the graph 𝐺𝐹 = 𝑉, 𝐹 , every vertex is of
degree 0 or 2.
β—¦ That is, 𝐺𝐹 consists of isolated vertices and
disjoint even length cycles.
16
1/12/2015
Union of Two Perfect Matchings
𝑧
𝑀
π‘₯
𝑧
𝑀
π‘₯
𝑦
𝑀π‘₯𝑧
𝑦
𝑀𝑦𝑀
𝑧
𝑀
π‘₯
𝑦 𝐹
Different Cycles
ο‚—
If π‘₯, 𝑧 and 𝑦, 𝑀 are in different cycles
of 𝐹, we can find a 1-factor in 𝐺:
β—¦ Take every edge that is in 𝑀π‘₯𝑧 ∩ 𝑀𝑦𝑀 .
β—¦ From the each cycle of 𝐹, we take every other
edge. We choose those such that we avoid
taking π‘₯, 𝑧 and 𝑦, 𝑀 .
ο‚—
This contradicts 𝐺 not containing a 1factor.
𝑧
π‘₯
17
1/12/2015
The Same Cycle
ο‚—
If π‘₯, 𝑧 and 𝑦, 𝑀 are on the same cycle:
β—¦ If we can take every other edge of the cycle
without taking π‘₯, 𝑧 and 𝑦, 𝑀 , we get a
contradiction as before.
β—¦ Otherwise, we can use π‘₯, 𝑦 or 𝑦, 𝑧 to
obtain a 1-factor containing neither π‘₯, 𝑧 nor
𝑦, 𝑀 .
𝑦
𝑧
𝑀
π‘₯
Concluding the Proof
We proved that either 𝑆 is a bad set, or
we get a contradiction to 𝐺 not
containing a 1-factor.
ο‚— That is, we proved that if 𝐺 is edgemaximal without a 1-factor, then there
exists 𝑆 βŠ‚ 𝑉 such that 𝑆 < π‘ž(𝐺 βˆ’ 𝑆).
ο‚—
β—¦ Thus, in every graph 𝐺 without a 1-factor
there exists 𝑆 βŠ‚ 𝑉 such that 𝑆 < π‘ž(𝐺 βˆ’ 𝑆).
18
1/12/2015
Finding a 1-factor in a Graph
As with Hall’s theorem, Tutte’s condition
does not give us an algorithm for finding
a 1-factor in a graph.
ο‚— In 6a, we saw an algorithm for finding 1factors in bipartite graphs, using
augmenting paths.
ο‚—
β—¦ The same algorithm works for general graphs.
β—¦ We will not repeat the algorithm, but we will
rely on it as a β€œblack box” (also in HW!).
The End
19