Hall's marriage theorem

Revision as of 23:56, 29 March 2025 by imported>DuncanHill (Fixing harv/sfn reference errors. Please install User:Trappist the monk/HarvErrors.js and watchlist Category:Harv and Sfn no-target errors to help you spot such errors when reading and editing.)
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Template:Short description In mathematics, Hall's marriage theorem, proved by Template:Harvs, is a theorem with two equivalent formulations. In each case, the theorem gives a necessary and sufficient condition for an object to exist:

  • The combinatorial formulation answers whether a finite collection of sets has a transversal—that is, whether an element can be chosen from each set without repetition. Hall's condition is that for any group of sets from the collection, the total unique elements they contain is at least as large as the number of sets in the group.
  • The graph theoretic formulation answers whether a finite bipartite graph has a perfect matching—that is, a way to match each vertex from one group uniquely to an adjacent vertex from the other group. Hall's condition is that any subset of vertices from one group has a neighbourhood of equal or greater size.

Combinatorial formulationEdit

StatementEdit

Let <math>\mathcal F</math> be a finite family of sets (note that although <math>\mathcal F</math> is not itself allowed to be infinite, the sets in it may be so, and <math>\mathcal F</math> may contain the same set multiple times).<ref>Template:Harvnb. An alternative form of the marriage theorem applies to finite families of sets that can be infinite. However, the situation of having an infinite number of sets while allowing infinite sets is not allowed.</ref> Let <math>X</math> be the union of all the sets in <math>\mathcal F</math>, the set of elements that belong to at least one of its sets. A transversal for <math>\mathcal F</math> is a subset of <math>X</math> that can be obtained by choosing a distinct element from each set in <math>\mathcal F</math>. This concept can be formalized by defining a transversal to be the image of an injective function <math>f:\mathcal F\to X</math> such that <math>f(S)\in S</math> for each <math>S\in\mathcal F</math>. An alternative term for transversal is system of distinct representatives.

The collection <math>\mathcal F</math> satisfies the marriage condition when each subfamily of <math>\mathcal F</math> contains at least as many distinct members as its number of sets. That is, for all <math>\mathcal G \subseteq \mathcal F</math>, <math display=block>|\mathcal G|\le\Bigl|\bigcup_{S\in \mathcal G} S\Bigr|.</math> If a transversal exists then the marriage condition must be true: the function <math>f</math> used to define the transversal maps <math>\mathcal G</math> to a subset of its union, of size equal to <math>|\mathcal G|</math>, so the whole union must be at least as large. Hall's theorem states that the converse is also true:

Template:Math theoremThe name "marriage theorem" came from Template:Harvard citation

Suppose that each of a (possibly infinite) set of boys is acquainted with a finite set of girls. Under what conditions is it possible for each boy to marry one of his acquaintances? It is clearly necessary that every finite set of k boys be. collectively, acquainted with at least k girls... this condition is also sufficient.

ExamplesEdit

File:Halls theorem positive example2.svg
example 1, marriage condition met
Example 1
Consider the family <math>\mathcal F=\{A_1,A_2,A_3\}</math> with <math>X=\{1,2,3,4,5\}</math> and <math display=block>

\begin{align} A_1&=\{1,2,3\}\\ A_2&=\{1,4,5\}\\ A_3&=\{3,5\}.\\ \end{align} </math> The transversal <math>\{1,3,5\}</math> could be generated by the function that maps <math>A_1</math> to <math>1</math>, <math>A_2</math> to <math>5</math>, and <math>A_3</math> to <math>3</math>, or alternatively by the function that maps <math>A_1</math> to <math>3</math>, <math>A_2</math> to <math>1</math>, and <math>A_3</math> to <math>5</math>. There are other transversals, such as <math>\{1,2,3\}</math> and <math>\{1,4,5\}</math>. Because this family has at least one transversal, the marriage condition is met. Every subfamily of <math>\mathcal F</math> has equal size to the set of representatives it is mapped to, which is less than or equal to the size of the union of the subfamily.

File:Halls theorem negartive example2.svg
example 2, marriage condition violated
Example 2
Consider <math>\mathcal F=\{A_1,A_2,A_3,A_4\}</math> with <math display=block>

\begin{align} A_1&=\{2,3,4,5\}\\ A_2&=\{4,5\}\\ A_3&=\{5\}\\ A_4&=\{4\}.\\ \end{align} </math> No valid transversal exists; the marriage condition is violated as is shown by the subfamily <math>\mathcal G=\{A_2,A_3,A_4\}</math>. Here the number of sets in the subfamily is <math>|\mathcal G|=3</math>, while the union of the three sets <math>A_2\cup A_3\cup A_4=\{4,5\}</math> contains only two elements.

A lower bound on the different number of transversals that a given finite family <math>\mathcal F</math> of size <math>n</math> may have is obtained as follows: If each of the sets in <math>\mathcal F</math> has cardinality <math>\geq r</math>, then the number of different transversals for <math>\mathcal F</math> is either <math>r!</math> if <math>r\leq n</math>, or <math>r(r-1)\cdots(r-n+1)</math> if <math>r>n</math>.<ref>Template:Harvnb, p.90</ref>

Recall that a transversal for a family <math>\mathcal F</math> is an ordered sequence, so two different transversals could have exactly the same elements. For instance, the collection <math>A_{1}=\{1,2,3\}</math>, <math>A_{2}=\{1,2,5\}</math> has <math>(1, 2)</math> and <math>(2, 1)</math> as distinct transversals.

Graph theoretic formulationEdit

File:Halls theorem matching graph theory2.svg
blue edges represent a matching

Let <math>G=(X,Y,E)</math> be a finite bipartite graph with bipartite sets <math>X</math> and <math>Y</math> and edge set <math>E</math>. An <math>X</math>-perfect matching (also called an <math>X</math>-saturating matching) is a matching, a set of disjoint edges, which covers every vertex in <math>X</math>.

For a subset <math>W</math> of <math>X</math>, let <math>N_G(W)</math> denote the neighborhood of <math>W</math> in <math>G</math>, the set of all vertices in <math>Y</math> that are adjacent to at least one element of <math>W</math>. The marriage theorem in this formulation states that there is an <math>X</math>-perfect matching if and only if for every subset <math>W</math> of <math>X</math>: <math display=block>|W| \leq |N_G(W)|.</math> In other words, every subset <math>W</math> of <math>X</math> must have sufficiently many neighbors in <math>Y</math>.

ProofEdit

NecessityEdit

In an <math>X</math>-perfect matching <math>M</math>, every edge incident to <math>W</math> connects to a distinct neighbor of <math>W</math> in <math>Y</math>, so the number of these matched neighbors is at least <math>|W|</math>. The number of all neighbors of <math>W</math> is at least as large.

SufficiencyEdit

Consider the contrapositive: if there is no <math>X</math>-perfect matching then Hall's condition must be violated for at least one <math>W\subseteq X</math>. Let <math>M</math> be a maximum matching, and let <math>u</math> be any unmatched vertex in <math>X</math>. Consider all alternating paths (paths in <math>G</math> that alternately use edges outside and inside <math>M</math>) starting from <math>u</math>. Let <math>W</math> be the set of vertices in these paths that belong to <math>X</math> (including <math>u</math> itself) and let <math>Z</math> be the set of vertices in these paths that belong to <math>Y</math>. Then every vertex in <math>Z</math> is matched by <math>M</math> to a vertex in <math>W</math>, because an alternating path to an unmatched vertex could be used to increase the size of the matching by toggling whether each of its edges belongs to <math>M</math> or not. Therefore, the size of <math>W</math> is at least the number <math>|Z|</math> of these matched neighbors of <math>Z</math>, plus one for the unmatched vertex <math>u</math>. That is, <math>|W|\ge |Z|+1</math>. However, for every vertex <math>v\in W</math>, every neighbor <math>w</math> of <math>v</math> belongs to <math>Z</math>: an alternating path to <math>w</math> can be found either by removing the matched edge <math>vw</math> from the alternating path to <math>v</math>, or by adding the unmatched edge <math>vw</math> to the alternating path to <math>v</math>. Therefore, <math>Z=N_G(W)</math> and <math>|W|\ge |N_G(W)|+1</math>, showing that Hall's condition is violated.

Equivalence of the combinatorial formulation and the graph-theoretic formulationEdit

A problem in the combinatorial formulation, defined by a finite family of finite sets <math>\mathcal F</math> with union <math>X</math> can be translated into a bipartite graph <math>G=(\mathcal F,X,E)</math> where each edge connects a set in <math>\mathcal F</math> to an element of that set. An <math>\mathcal F</math>-perfect matching in this graph defines a system of unique representatives for <math>\mathcal F</math>. In the other direction, from any bipartite graph <math>G=(X,Y,E)</math> one can define a finite family of sets, the family of neighborhoods of the vertices in <math>X</math>, such that any system of unique representatives for this family corresponds to an <math>X</math>-perfect matching in <math>G</math>. In this way, the combinatorial formulation for finite families of finite sets and the graph-theoretic formulation for finite graphs are equivalent.

The same equivalence extends to infinite families of finite sets and to certain infinite graphs. In this case, the condition that each set be finite corresponds to a condition that in the bipartite graph <math>G=(X,Y,E)</math>, every vertex in <math>X</math> should have finite degree. The degrees of the vertices in <math>Y</math> are not constrained.

Topological proofEdit

Hall's theorem can be proved (non-constructively) based on Sperner's lemma.<ref>Template:Cite journal</ref>Template:Rp

ApplicationsEdit

The theorem has many applications. For example, for a standard deck of cards, dealt into 13 piles of 4 cards each, the marriage theorem implies that it is possible to select one card from each pile so that the selected cards contain exactly one card of each rank (Ace, 2, 3, ..., Queen, King). This can be done by constructing a bipartite graph with one partition containing the 13 piles and the other partition containing the 13 ranks. The remaining proof follows from the marriage condition. More generally, any regular bipartite graph has a perfect matching.<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>Template:Rp

More abstractly, let <math>G</math> be a group, and <math>H</math> be a finite index subgroup of <math>G</math>. Then the marriage theorem can be used to show that there is a set <math>T</math> such that <math>T</math> is a transversal for both the set of left cosets and right cosets of <math>H</math> in <math>G</math>.<ref>Template:Cite journal</ref>

The marriage theorem is used in the usual proofs of the fact that an <math>r\times n</math> Latin rectangle can always be extended to an <math>(r+1)\times n</math> Latin rectangle when <math>r<n</math>, and so, ultimately to a Latin square.<ref>Template:Cite journal</ref>

Logical equivalencesEdit

This theorem is part of a collection of remarkably powerful theorems in combinatorics, all of which are related to each other in an informal sense in that it is more straightforward to prove one of these theorems from another of them than from first principles. These include:

In particular,<ref>Equivalence of seven major theorems in combinatorics</ref><ref>Template:Harvnb</ref> there are simple proofs of the implications Dilworth's theorem ⇔ Hall's theorem ⇔ König–Egerváry theorem ⇔ König's theorem.

Infinite familiesEdit

Marshall Hall Jr. variantEdit

By examining Philip Hall's original proof carefully, Marshall Hall Jr. (no relation to Philip Hall) was able to tweak the result in a way that permitted the proof to work for infinite <math>\mathcal F</math>.<ref>Template:Harvnb</ref> This variant extends Philip Hall's Marriage theorem.

Suppose that <math>\mathcal F = \{A_i\}_{i\in I}</math>, is a (possibly infinite) family of finite sets that need not be distinct, then <math>\mathcal F</math> has a transversal if and only if <math>\mathcal F</math> satisfies the marriage condition.

Marriage condition does not extendEdit

The following example, due to Marshall Hall Jr., shows that the marriage condition will not guarantee the existence of a transversal in an infinite family in which infinite sets are allowed.

Let <math>\mathcal F</math> be the family, <math>A_{0}=\mathbb N</math>, <math>A_{i}=\{i-1\}</math> for <math>i\geq 1</math>. The marriage condition holds for this infinite family, but no transversal can be constructed.<ref>Template:Harvnb</ref>

Graph theoretic formulation of Marshall Hall's variantEdit

The graph theoretic formulation of Marshal Hall's extension of the marriage theorem can be stated as follows: Given a bipartite graph with sides A and B, we say that a subset C of B is smaller than or equal in size to a subset D of A in the graph if there exists an injection in the graph (namely, using only edges of the graph) from C to D, and that it is strictly smaller in the graph if in addition there is no injection in the graph in the other direction. Note that omitting in the graph yields the ordinary notion of comparing cardinalities. The infinite marriage theorem states that there exists an injection from A to B in the graph, if and only if there is no subset C of A such that N(C) is strictly smaller than C in the graph.<ref>Template:Cite journal</ref>

The more general problem of selecting a (not necessarily distinct) element from each of a collection of non-empty sets (without restriction as to the number of sets or the size of the sets) is permitted in general only if the axiom of choice is accepted.

Fractional matching variantEdit

A fractional matching in a graph is an assignment of non-negative weights to each edge, such that the sum of weights adjacent to each vertex is at most 1. A fractional matching is X-perfect if the sum of weights adjacent to each vertex is exactly 1. The following are equivalent for a bipartite graph G = (X+Y, E):<ref>{{#invoke:citation/CS1|citation |CitationClass=web }}</ref>

  • G admits an X-perfect matching.
  • G admits an X-perfect fractional matching. The implication follows directly from the fact that X-perfect matching is a special case of an X-perfect fractional matching, in which each weight is either 1 (if the edge is in the matching) or 0 (if it is not).
  • G satisfies Hall's marriage condition. The implication holds because, for each subset W of X, the sum of weights near vertices of W is |W|, so the edges adjacent to them are necessarily adjacent to at least |W| vertices of Y.

Quantitative variantEdit

{{#invoke:Labelled list hatnote|labelledList|Main article|Main articles|Main page|Main pages}}

When Hall's condition does not hold, the original theorem tells us only that a perfect matching does not exist, but does not tell what is the largest matching that does exist. To learn this information, we need the notion of deficiency of a graph. Given a bipartite graph G = (X+Y, E), the deficiency of G w.r.t. X is the maximum, over all subsets W of X, of the difference |W| - |NG(W)|. The larger is the deficiency, the farther is the graph from satisfying Hall's condition.

Using Hall's marriage theorem, it can be proved that, if the deficiency of a bipartite graph G is d, then G admits a matching of size at least |X|-d.

GeneralizationsEdit

NotesEdit

<references/>

ReferencesEdit

External linksEdit

{{#if: | This article incorporates material from the following PlanetMath articles, which are licensed under the Creative Commons Attribution/Share-Alike License: {{#if: | proof of Hall's marriage theorem | {{#if: 3059 | proof of Hall's marriage theorem | [{{{sourceurl}}} proof of Hall's marriage theorem] }} }}, {{#if: | {{{title2}}} | {{#if: | {{{title2}}} | [{{{sourceurl2}}} {{{title2}}}] }} }}{{#if: | , {{#if: | {{{title3}}} | {{#if: | {{{title3}}} | [{{{sourceurl3}}} {{{title3}}}] }} }} }}{{#if: | , {{#if: | {{{title4}}} | {{#if: | {{{title4}}} | [{{{sourceurl4}}} {{{title4}}}] }} }} }}{{#if: | , {{#if: | {{{title5}}} | {{#if: | {{{title5}}} | [{{{sourceurl5}}} {{{title5}}}] }} }} }}{{#if: | , {{#if: | {{{title6}}} | {{#if: | {{{title6}}} | [{{{sourceurl6}}} {{{title6}}}] }} }} }}{{#if: | , {{#if: | {{{title7}}} | {{#if: | {{{title7}}} | [{{{sourceurl7}}} {{{title7}}}] }} }} }}{{#if: | , {{#if: | {{{title8}}} | {{#if: | {{{title8}}} | [{{{sourceurl8}}} {{{title8}}}] }} }} }}{{#if: | , {{#if: | {{{title9}}} | {{#if: | {{{title9}}} | [{{{sourceurl9}}} {{{title9}}}] }} }} }}. | This article incorporates material from {{#if: | proof of Hall's marriage theorem | proof of Hall's marriage theorem}} on PlanetMath, which is licensed under the Creative Commons Attribution/Share-Alike License. }}