Sie sind auf Seite 1von 4

Lecture 2: Hall’s Marriage Theorem

December 12
Lecturer: Shourya Pandey Scribe: Shourya Pandey

Introduction
Assuming some familiarity with graph theory, we study the famous Hall’s Marriage Theorem,
which is sometimes simply called the Marriage Lemma.

1 Some definitions
Definition 1.1. Let G be a simple, undirected graph. A matching M in G is a set of edges in G
such that no two edges chosen have any common endpoint. We will view a matching as a subgraph
of G with the vertex set the same as G, where each vertex has degree at most 1. This notion of a
matching often makes notation easier. Also, a perfect matching M in G is a matching in G such
that all vertices of G have degree 1.

Definition 1.2. Let M be a matching in a graph G (henceforth, a graph is assumed to be sim-


ple and undirected, unless stated otherwise). A vertex v is said to be M-saturated in G if it has
degree 1 in M , that is, it is matched to some other vertex in M . Other vertices are called M-
unsaturated. We often drop the prefix M if the matching is clear from context, and simply use
the terms saturated and unsaturated.

Definition 1.3. For a vertex v in a graph G, the neighbourhood, N(v), of the vertex v is the
set of vertices v is adjacent to. This definition can be extended to sets of vertices too. For any
subset S ⊆ V (G), we define N(S) to be the set of vertices adjacent to at least one vertex in S.

2 The Hall’s Marriage Theorem


We are ready to state the Hall’s Theorem. For a proof, look up any online source.

Hall’s Marriage Theorem (1935) : Let G(U, V, E) be a bipartite graph. Then, there exists a
matching M in G that saturates all vertices of U if, and only if, for all subsets S ⊆ U , we have
|S| ≤ |N (S)|.

Corollary : Let G(U, V, E) be a bipartite graph with |U | = |V |. Then, G has a perfect matching
if, and only if, for all subsets S ⊆ U , we have |S| ≤ |N (S)|.

1
3 Problems
Question 1. Prove that a regular, bipartite graph has a perfect matching.

Solution. Let X and Y be the partite sets of some partition of a regular bipartite graph G, and
let E be the edge set of G. Let k be the degree of each vertex of G. Note that |X| = |Y | (why?).

Now, let S ⊆ X. Let us count the number of edges between S and N (S) in two ways. Clearly,
counting from the side of S, this number is k|S|. On the other hand, each vertex in N (S) has
degree k as well, but not all these edges have a vertex from S as the other endpoint. In all, we
get that the number of edges between S and N (S) is at most k|N (S)|. This gives |S| ≤ |N (S)|,
which finishes the proof (a good exercise would be to write what we are double counting formally).

Question 2. A pack of m × n cards with m values and n colours consists of one card of each
value-colour pair possible. These cards are arranged in an array with n rows and m columns, such
that no two cards in a column have the same colour. Show that we can select exactly one card from
each column, such that they all have distinct values.

Question 3. An m × n rectangular array consists of non-negative real entries, such that each
row and each column has at least one positive entry. Moreover, if a row and a column intersect in
a positive entry, then the sums of their elements are the same. Prove that m = n.

Question 4. Suppose 2m players play a round-robin tournament. Over a period of 2m − 1 days,


each player plays another player exactly once. There are no ties. Show that for each day we can
select a winning player, without selecting the same player twice.

Question 5. Santa Claus has n gifts for n children. For i ∈ [n], the ith child considers xi > 0 of
the gifts to be desirable (but we do not know which gifts these are). If
∑n
1
≤1
x
i=1 i

prove that Santa can gift each child a desirable gift.

Question 6. Let G(X, Y, E) be a bipartite graph with deg(x) ≥ 1 for all x ∈ X and deg(x) ≥
deg(y) for all x ∈ X, y ∈ Y . Show that there is a matching in G that saturates all vertices of X.

Question 7. The planet Namek has 2n countries, where n ≥ 4. Each country has a flag n units
wide and one unit high, composed of n fields of size 1 × 1, each field being green or pink. No two
countries have the same flag.

We say that a set of n flags is diverse if the flags can be arranged into an n × n square so that
all n fields on the main diagonal have the same colour. Determine the smallest m such that among

2
any m distinct flags, there exist n forming a diverse set.

Question 8. Let n ∈ N. A doubly-stochastic matrix of dimension n is an n × n matrix P with


non-negative real entries, such that each row and each column adds to 1. Prove that P can be
written as p1 Q1 + · · · + pt Qt , where t is some natural number, pi is a positive real number for all
i, and Qi is a permutation matrix for all i.

Question 9. The columns and the row of a 3n × 3n square board are numbered 1, 2, . . . , 3n.
Every square (x, y) with 1 ≤ x, y ≤ 3n is colored asparagus, byzantium or citrine according as
the modulo 3 remainder of x + y is 0, 1 or 2 respectively. One token colored asparagus, byzantium
or citrine is placed on each square, so that there are 3n2 tokens of each color. Suppose that one can
permute the tokens so that each token is moved to a distance of at most d from its original position,
each asparagus token replaces a byzantium token, each byzantium token replaces a citrine token,
and each citrine token replaces an asparagus token. Prove that it is possible to permute the tokens
so that each token is moved to a distance of at most d+2 from its original position, and each square
contains a token with the same color as the square.

Question 10. In this final question, we describe what is called the Gale-Shapley algorithm to
find a stable matching in a bipartite graph.

Consider n single men M = {m1 , · · · , mn } and n single women W = {w1 , · · · , wn }, where


n is a natural number. We assume that neither of the 2n people are interested in same-sex mar-
riage. Now, we can add the notion of preferences in this setting. Each man m ∈ M ranks all the
women, and each w ∈ W ranks all the men. We assume there are no ties in the ranking.

Now, suppose we pair up the n men and n women arbitrarily and marry them off. This, how-
ever, leads to a problem. Suppose (m1 , w1 ) and (m2 , w2 ) are married couples. Also, suppose m1
and w2 ranked each other higher than their current partners. Then, both m1 and w2 would want to
leave their respective partners and pair up. This is called an instability.

This gives rise to the notion of a stable matching. A stable matching is a set of n marriages
with no instabilities. Two questions spring immediately to mind:

• Does a stable matching always exist?

• (For the coders out there) Is there an efficient algorithm to find a stable matching, if there
exists one?

We answer both in the affirmative. Consider the following procedure in the hunt of a stable
matching. A series of round ensues. In each round:

• Every currently-not-engaged man proposes to the top choice among the remaining in his list.

• Then, each woman compares all her incoming proposals (including any person she is already

3
engaged to), and selects the best of her options (possibly dumping the man she is currently
engaged to) and gets engaged to this selected person.

• All rejected men strike off the corresponding women from their list.

Prove the following:

1. The process ends, and everybody is married.

2. The set of n marriages is stable.

3. For each man m ∈ M , there exists a best woman wm = best(m), such that if m marries
anyone on a higher ranking than wm , then a stable matching is impossible (thus wm is the
best m can get). Prove that the above algorithm indeed terminates with every m ∈ M getting
married to best(m).

4. We can also define the notion of worst(w) for every w ∈ W . Prove that the above algorithm
terminates with every w ∈ W getting married to worst(w) (well, that’s what you get for
dumping so many men across the rounds!)

5. (For the coders again) Prove that the Gale-Shapley algorithm runs in O(n2 ).

Das könnte Ihnen auch gefallen