# Combinatorial analysis

combinatorial mathematics, combinatorics

The branch of mathematics devoted to the solution of problems of choosing and arranging the elements of certain (usually finite) sets in accordance with prescribed rules. Each such rule defines a method of constructing some configuration of elements of the given set, called a combinatorial configuration. One can therefore say that the aim of combinatorial analysis is the study of combinatorial configurations. This study includes questions of the existence of combinatorial configurations, algorithms and their construction, optimization of such algorithms, as well as the solution of problems of enumeration, in particular the determination of the number of configurations of a given class. The simplest examples of combinatorial configurations are permutations, combinations and arrangements.

A set $X$ of $n$ elements is called an $n$- set; an $m$- subset of it, $m \leq n$, is called a combination of size $m$. The number of combinations of size $m$ from $n$ distinct elements is equal to

$$C _ {n} ^ {m} = \ C ( n, m) = \ \left ( \begin{array}{c} n \\ m \end{array} \ \right ) = \ { \frac{n ( n - 1) \dots ( n - m + 1) }{m!} } .$$

The formula

$$( 1 + t) ^ {n} = \ \sum _ {m = 0 } ^ { n } \left ( \begin{array}{c} n \\ m \end{array} \ \right ) t ^ {m} ,\ \ \left ( \begin{array}{c} n \\ 0 \end{array} \ \right ) = 1,$$

is usually called the Newton binomial formula. The numbers $C ( n, m)$ are called binomial coefficients. An ordered $m$- subset is called an arrangement of size $m$. The number of arrangements of size $m$ of $n$ distinct elements is equal to

$$A ( n, m) = \ n ( n - 1) \dots ( n - m + 1).$$

For $m = n$ an arrangement is a permutation of the elements of $X$, the number of such permutations being $P ( n) = n!$.

The rise of the fundamental notions and developments of combinatorial analysis was parallel with the development of other branches of mathematics such as algebra, number theory, probability theory, all closely linked to combinatorial analysis. The formula expressing the number of combinations in terms of the binomial coefficients and the Newton binomial formula for positive integers $n$ was already known to the mathematicians of the Ancient Orient. Magic squares (cf. Magic square) of order three were studied for mystical ends. The birth of combinatorial analysis as a branch of mathematics is associated with the work of B. Pascal and P. (de) Fermat on the theory of games of chance. These works, which formed the foundations of probability theory, contained at the same time the principles for determining the number of combinations of elements of a finite set, and thus established the traditional connection between combinatorial analysis and probability theory.

A large contribution to the systematic development of combinatorial methods was provided by G. Leibniz in his dissertation Ars Combinatoria (the Art of Combinatorics) in which, apparently, the term "combinatorial" appeared for the first time. Of great significance for the establishment of combinatorial analysis was the paper Ars Conjectandi (the Art of Conjecturing) by J. Bernoulli; it was devoted to the basic notions of probability theory, and a number of combinatorial notions were of necessity set forth and applications to the calculation of probabilities were given. It can be said that with the appearance of the works of Leibniz and Bernoulli, combinatorial methods started to be an independent branch of mathematics.

A major contribution to the development of combinatorial methods was provided by L. Euler. In his papers on the partitioning and decomposition of positive integers into summands he laid down the beginnings of one of the basic methods of calculating combinatorial configurations, namely the method of generating functions.

The 1950s are associated with an expansion of interest in combinatorial analysis in connection with the rapid development of cybernetics and discrete mathematics and the wide application of computer techniques. In this period an interest in classical combinatorial problems was activated.

Two factors proved to be of influence in the formation of the direction of subsequent investigations. On the one hand, the choice of the objects of investigation; on the other, the formation of the aims of the investigation, depending in the final reckoning on the complexity of the objects under study. If the combinatorial configuration under investigation has a complex character, then the aim of the investigation is to elucidate the conditions for its existence and to develop algorithms for its construction.

A large well-developed branch of combinatorial analysis is the theory of block designs (cf. Block design, and also [2], [3], [10]); the main problems of this branch relate to questions of classification, conditions of existence and methods of constructing certain classes of block designs. A special case of block designs are the so-called balanced incomplete block designs or $( b, v, r, k, \lambda )$- configurations, which are defined as collections of $b$ $k$- subsets of some $v$- set, called blocks, with the condition that each element appears in $r$ blocks and each pair of elements in $\lambda$ blocks. When $b = v$, and hence when $r = k$, a $( b, v, r, k, \lambda )$- configuration is called a $( v, k, \lambda )$- configuration, or a symmetric balanced incomplete block design. Even for $( v, k, \lambda )$- configurations the question of necessary and sufficient conditions for their existence remains unsolved (1988). For the existence of $( v, k, \lambda )$- configurations it is necessary that when $v$ is even, $k - \lambda$ be a perfect square, while when $v$ is odd, the equation

$$z ^ {2} = \ ( k - \lambda ) x ^ {2} + (- 1) ^ {( v - 1)/2 } \lambda y ^ {2}$$

must have an integral solution in $x, y, z$, not all zero.

When $v = n ^ {2} + n + 1$, $k = n + 1$, $\lambda = 1$ a $( v, k, \lambda )$- configuration represents a projective plane of order $n$ and is a particular case of a finite geometry containing a finite number of points and lines under prescribed incidence conditions. Corresponding to each projective plane of order $n$ there is a unique complete set of $n - 1$ pairwise orthogonal Latin squares of order $n$( cf. Latin square). In order that a projective plane of order $n$ exists, it is necessary that for $n \equiv 1, 2$( $\mathop{\rm mod} 4$) there exist integers $a, b$ such that

$$n = a ^ {2} + b ^ {2} .$$

An affirmative solution to the question of the existence of projective planes of order $n$ has been obtained only for $n = p ^ \alpha$, where $p$ is a prime number and $\alpha$ is a positive integer. Even for $n = 10$ this question remains open (1988). Related to this circle of questions is a result in connection with the falsification of the Euler conjecture on the non-existence of pairs of orthogonal Latin squares of order $n = 4k + 2$, $k = 1, 2 , . . .$( see Classical combinatorial problems).

Another direction in combinatorial analysis relates to selection theorems. At the foundation of a whole series of results along these lines is the P. Hall theorem on the existence of a system of distinct representatives (a transversal) of a family of subsets $( X _ {1} \dots X _ {n} )$ of a set $X$, that is, a system of elements $( x _ {1} \dots x _ {n} )$ such that $x _ {i} \in X _ {i}$ and $x _ {i} \neq x _ {j}$ when $i \neq j$. A transversal exists if and only if for any $i _ {1} \dots i _ {k}$ such that $1 \leq i _ {1} < \dots < i _ {k} \leq n$, $1 \leq k \leq n$, the following inequality holds:

$$| X _ {i _ {1} } \cup \dots \cup X _ {i _ {k} } | \geq k,$$

where $| Y |$ is the number of elements in $Y$. A corollary of Hall's theorem is the theorem on the existence of Latin squares, stating that any Latin rectangle of order $k \times n$, $1 \leq k \leq n - 1$, can be extended to a Latin square of order $n$. Another corollary of Hall's theorem: Any non-negative matrix $A = \| a _ {ij} \| _ {i, j = 1 } ^ {n}$ such that

$$\sum _ {i = 1 } ^ { n } a _ {ij} = \ \sum _ {j = 1 } ^ { n } a _ {ij} = \ t > 0,$$

can be represented in the form

$$A = \ \alpha _ {1} \Pi _ {1} + \dots + \alpha _ {s} \Pi _ {s} ,$$

where $\Pi _ {1} \dots \Pi _ {s}$ are permutation matrices of order $n$ and $s \leq ( n - 1) ^ {2} + 1$. Hall's theorem also implies that the minimum number of rows and columns of a non-negative matrix containing all positive elements is equal to the maximum number of elements that pairwise are not in the same row or in the same column. The extremal property of partially ordered sets, which is analogous to this theorem, is established by the theorem stating that the minimum number of non-intersecting chains is the same as the size of the maximal subset consisting of pairwise-incomparable elements. The following theorem also bears an extremal character: If for an $n$- set $X$ one collects all the $C ( n, r)$ combinations of $r$ elements and partitions them into $k$ non-intersecting classes, then, given an integer $m$, there exists an $n _ {0} = n _ {0} ( m, r, k)$ such that for $n \geq n _ {0}$ there is a subset of $m$ elements $Y \subset X$ for which all the $C ( m, r)$ combinations belong to the same class.

The travelling-salesman problem is an extremal problem too; it consists in composing the shortest route visiting $n$ towns and returning to the starting point, where the distances between the towns are known. This problem has applications in the study of transportation networks. Combinatorial problems of an extremal character are considered in the theory of flows in networks and in graph theory.

A significant portion of combinatorial analysis consists of enumeration problems. For their solution one either indicates a method of sorting out combinatorial configurations of a given class, or one determines the number of them, or one does both. Typical results of enumeration problems are: The number of permutations of order $n$ with $k$ cycles is equal to $| S ( n, k) |$, where $S ( n, k)$ is the Stirling number of the first kind, defined by the equation

$$x ( x - 1) \dots ( x - n + 1) = \ \sum _ {k = 0 } ^ { n } S ( n, k) x ^ {k} ;$$

the number of partitions of a set of $n$ elements into $k$ subsets is equal to the Stirling number of the second kind

$$\sigma ( n, k) = \ { \frac{1}{k! } } \sum _ {j = 0 } ^ { k } (- 1) ^ {j} \left ( \begin{array}{c} k \\ j \end{array} \ \right ) ( k - j) ^ {n} ;$$

and, the number of arrangements of $m$ distinct objects in $n$ distinct cells with no cell empty is equal to $n! \sigma ( m, n)$.

A useful device for the solution of enumeration problems is the permanent of a matrix. The permanent of a matrix $A = \| a _ {ij} \|$( $i = 1 \dots n$; $j = 1 \dots m$, $n \leq m$) the elements of which belong to some ring, is defined by the formula

$$\mathop{\rm per} A = \ \sum _ {( j _ {1} \dots j _ {n} ) } a _ {1j _ {1} } \dots a _ {nj _ {n} } ,$$

where the summation is carried out over all possible arrangements of size $n$ from $m$ distinct elements. The number of transversals of some family of subsets of a finite set is equal to the permanent of the corresponding incidence matrix.

A whole class of problems on the determination of the number of permutations with restricted positions reduces to the calculation of permanents. For convenience, these problems are sometimes formulated as problems on the arrangement of mutually non-attacking pieces on an $n \times n$ chessboard. Connected with the determination of the permanents of certain classes of matrices are variants of the problem of dimers, which arises in the study of the phenomenon of adsorption and consists in the determination of the number of ways of combining the atoms of di-atomic molecules on some surface. Its solution can also be obtained in terms of Pfaffians (cf. Pfaffian), which are certain functions of matrices close to determinants. The problem of the number of Latin rectangles (squares) is also connected with the development of effective methods for calculating permanents of certain $( 0, 1)$- matrices.

For the calculation of permanents one applies the formula:

$$\mathop{\rm per} A = \ \sum _ {k = m - n } ^ { m } (- 1) ^ {k - m + n } \left ( \begin{array}{c} k \\ m - n \end{array} \ \right ) S _ {k} ,$$

$$S _ {k} = \sum _ {1 \leq j _ {1} < \dots < j _ {k} \leq m } \prod _ {i = 1 } ^ { n } \left ( \sum _ {l = 1 } ^ { m } a _ {il} - \sum _ {r = 1 } ^ { k } a _ {ij _ {r} } \right ) .$$

There are a large number of inequalities giving an estimate of the size of the permanent in certain classes of matrices. The determination of the extremal values of the permanent in specific classes of non-negative matrices is of interest. For a $( 0, 1)$- matrix $A$ with given values $r _ {1} \dots r _ {n}$ of the number of ones in the rows one has the estimate

$$\mathop{\rm per} A \leq \prod _ {i = 1 } ^ { n } ( r!) ^ {1/r _ {i} } ,$$

cf. [12]. The famous van der Waerden conjecture, that the minimum permanent of a doubly-stochastic matrix of order $n$ is equal to $n!/n ^ {n}$ was proved, independently, by D.I. Falikman (1979) and G.P. Egorichev (1980), cf. [13].

An important role in the solution of enumeration problems is played by the method of generating functions (cf. Generating function). A generating function

$$f ( t) = \ \sum _ {n = 0 } ^ \infty a _ {n} t ^ {n}$$

sets up a correspondence between the sequence $( a _ {0} , a _ {1} , . . . )$ and the elements of some ring, and is regarded as a formal power series. According to this definition, generating functions are effectively used for the solution of enumeration problems in parallel with methods of recurrence relations and finite-difference equations. In obtaining asymptotic formulas for the generating functions, analytic functions of a real or complex variable are usually employed. In the latter case, the Cauchy integral is applied in finding expressions for the coefficients.

There are results in the direction of a possible unification of enumeration methods; these are connected with the study of so-called incidence algebras and the use of the Möbius function on a partially ordered set (see for example, [10]). In the solution of enumeration problems, an essential role is played by the formalization of the concept of indistinguishability of objects. The use of the notion of equivalence of objects with respect to a certain group of permutations in combination with the application of the method of generating functions forms the basis of the so-called Pólya theory of enumeration (see [10]), the essence of which is as follows. Consider the set $Y ^ {X}$ of configurations

$$f: X \rightarrow Y,\ \ | X | = m,\ \ | Y | = n.$$

On the set $X$, a group $A$ of permutations acts, thus defining an equivalence relation $\sim$ under which $f \sim f _ {1}$, $f, f _ {1} \in Y ^ {X}$, if there exists an $\alpha \in A$ such that $f ( \alpha ( x)) = f _ {1} ( x)$ for all $x \in X$. To each $y \in Y$ corresponds a characteristic $[ y] = ( s _ {1} \dots s _ {k} )$, where $s _ {i}$, $i = 1 \dots k$, are elements of an Abelian group. The characteristic of the configuration $f$ is given by the formula

$$[ f] = \ \sum _ {x \in X } [ f ( x)].$$

If $a ( s _ {1} \dots s _ {k} )$ is the number of elements $y \in Y$ with a given value of the characteristic and $b _ {m} ( s _ {1} \dots s _ {k} )$ is the number of inequivalent configurations $f \in Y ^ {X}$,

$$F ( y _ {1} \dots y _ {k} ) = \ \sum _ {( s _ {1} \dots s _ {k} ) } a ( s _ {1} \dots s _ {k} ) y _ {1} ^ {s _ {1} } \dots y _ {k} ^ {s _ {k} } ,$$

$$\Phi _ {m} ( y _ {1} \dots y _ {k} ) = \sum _ {( s _ {1} \dots s _ {k} ) } b ( s _ {1} \dots s _ {k} ) y _ {1} ^ {s _ {1} } \dots y _ {k} ^ {s _ {k} } ,$$

then Pólya's fundamental theorem states that

$$\Phi _ {m} ( y _ {1} \dots y _ {k} ) =$$

$$= \ Z ( F ( y _ {1} \dots y _ {k} ), F ( y _ {1} ^ {2} \dots y _ {k} ^ {2} ) \dots F ( y _ {1} ^ {m} \dots y _ {k} ^ {m} )),$$

where $Z$ is the cyclic index of the group $A$, defined by the equation

$$Z ( t _ {1} \dots t _ {m} ; A) =$$

$$= \ \sum _ {j _ {1} + 2j _ {2} + \dots + mj _ {m} = n } C ( j _ {1} \dots j _ {m} ; A) t _ {1} ^ {j _ {1} } \dots t _ {m} ^ {j _ {m} } ,$$

and $C ( j _ {1} \dots j _ {m} ; A)$ is the number of elements of the cyclic class $\{ 1 ^ {j _ {1} } \dots m ^ {j _ {m} } \}$( cf. Symmetric group) of $A$. This theorem is based on Burnside's lemma: The number of equivalence classes $N ( A)$ defined on the set $X$ by the permutation group $A$ is given by the formula

$$N ( A) = \ { \frac{1}{| A | } } \sum _ {\alpha \in A } j _ {1} ( \alpha ),$$

where $j _ {1} ( \alpha )$ is the number of unit cycles of $\alpha \in A$. Pólya's theory has applications in the solution of enumeration problems in graph theory and in the enumeration of carbon chemical compounds. There is a generalization of Pólya's theory to the case when the equivalence of two configurations is defined by two groups $G$ and $H$ acting on $X$ and $Y$, respectively (see [4] and [10]). In this form it is applied, for example, in the determination of the number of non-isomorphic abstract automata.

If $X = \{ 1 \dots m \}$, $Y = \{ a _ {1} \dots a _ {n} \}$ and $\sigma : X \rightarrow Y$, where $a _ {j}$ is used as an image $\alpha _ {j}$ times, then the expression

$$[ \sigma ] = \ [ a _ {1} ^ {\alpha _ {1} } \dots a _ {n} ^ {\alpha _ {n} } ] ,\ \ \alpha _ {1} + \dots + \alpha _ {n} = m,$$

is called the first specification of $\sigma$. If the numbers $\alpha _ {1} \dots \alpha _ {n}$ contain $\beta _ {0}$ zeros, $\beta _ {1}$ ones, etc., then the expression

$$[[ 0 ^ {\beta _ {0} } \dots m ^ {\beta _ {m} } ]],\ \ \beta _ {0} + \dots + \beta _ {m} = n,$$

$$\beta _ {1} + 2 \beta _ {2} + \dots + m \beta _ {m} = m,$$

is called the second specification. Under some specification of the groups $G$ and $H$ defining the equivalence of configurations $\sigma : X \rightarrow Y$, it is possible to give a method of constructing generating functions for the enumeration of the inequivalent configurations. This method, called the general combinatorial scheme, can be subdivided into four particular cases, according as the groups $G$ and $H$ take values in the identity group $E$ or the symmetric groups $S _ {n}$ of corresponding orders. These particular cases are the models for the majority of the known combinatorial schemes (see [9], [10]).

1) The commutative non-symmetric case: $G = S _ {m}$, $H = E$. This models combination schemes of distributing identical objects into different cells, etc. The generating function for the enumeration of inequivalent configurations $\sigma$ such that

$$[ \sigma ] = \ [ a _ {1} ^ {\alpha _ {1} } \dots a _ {n} ^ {\alpha _ {n} } ] ,$$

$$\alpha _ {i} \in \Lambda _ {i} \subseteq \mathbf N _ {0} = \ \{ 0, 1 , . . . \} , \ \Lambda = ( \Lambda _ {1} \dots \Lambda _ {n} ),$$

has the form:

$$\Phi ( t; x _ {1} \dots x _ {n} ; \Lambda ) = \ \prod _ {j = 1 } ^ { n } \ \sum _ {\alpha _ {j} \in \Lambda _ {j} } ( tx _ {j} ) ^ {\alpha _ {j} } .$$

2) The non-commutative non-symmetric case: $G = E$, $H = E$. This models allocation schemes of distributing distinct objects into different cells, etc. The generating function for the enumeration of inequivalent configurations $\sigma$ such that

$$[ \sigma ] = \ [ a _ {1} ^ {\alpha _ {1} } \dots a _ {n} ^ {\alpha _ {n} } ] ,\ \ \alpha _ {i} \in \Lambda _ {i} ,\ \ \Lambda = ( \Lambda _ {1} \dots \Lambda _ {n} ),$$

has the form:

$$\widetilde \Phi ( t; x _ {1} \dots x _ {n} ; \Lambda ) = \ \prod _ {j = 1 } ^ { n } \ \sum _ {\alpha _ {j} \in \Lambda _ {j} } \frac{t ^ {\alpha _ {j} } }{\alpha _ {j} ! } x _ {j} ^ {\alpha _ {j} } .$$

3) The commutative symmetric case: $G = S _ {m}$, $H = S _ {n}$. This models schemes of distributing identical objects into identical cells, the enumeration of the partitions of natural numbers, etc. The enumeration of configurations $\sigma$ such that

$$[[ \sigma ]] = \ [ [ 0 ^ {\beta _ {0} } \dots m ^ {\beta _ {m} } ] ] ,\ \ \beta _ {j} \in \Lambda _ {j} ,\ \ \Lambda = ( \Lambda _ {1} , \Lambda _ {2} , . . . ),$$

is based on the use of generating functions of the form:

$$\Psi ( t; x _ {1} , . . . ; \Lambda ) = \ \prod _ {j = 1 } ^ \infty \ \sum _ {\beta _ {j} \in \Lambda _ {j} } ( x _ {j} t ^ {j} ) ^ {\beta _ {j} } .$$

4) The non-commutative symmetric case: $G = E$, $H = S _ {n}$. This models schemes of partitioning finite sets into blocks, distributing distinct objects into identical cells, etc. The enumeration of configurations $\sigma$ such that

$$[[ \sigma ]] = \ [ [ 0 ^ {\beta _ {0} } \dots m ^ {\beta _ {m} } ] ] ,\ \ \beta _ {j} \in \Lambda _ {j} ,\ \ \Lambda = ( \Lambda _ {1} , \Lambda _ {2} , . . . ),$$

is based on the use of generating functions of the form:

$$\widetilde \Psi ( t; x _ {1} , . . . ; \Lambda ) = \ \prod _ {j = 1 } ^ \infty \ \sum _ {\beta _ {j} \in \Lambda _ {j} } \left ( \frac{x _ {j} t ^ {j} }{j! } \right ) ^ {\beta _ {j} } { \frac{1}{\beta _ {j} ! } } .$$

An important place in combinatorial analysis is taken up by asymptotic methods. They are applied both for the simplification of complex finite expressions for large values of the parameters entering into them, as well as for obtaining approximate formulas in roundabout ways when the exact formulas are unknown. It is sometimes convenient to formulate a combinatorial problem of an enumerative character as a problem of finding the characteristics of the distribution of some random process. Such an interpretation makes it possible to apply the well-developed apparatus of probability theory for finding asymptotics or limit theorems. Classical schemes of random allocations of objects in cells are open to a detailed investigation from these points of view; so also are random partitions of sets, the cyclic structure of random permutations, as well as various classes of random graphs, including graphs of mappings (see [8], [9], [11]).

The probabilistic approach is applied in the study of the combinatorial properties of symmetric groups and semi-groups. The limiting distribution of the order of a random element of the symmetric group $S _ {n}$ as $n \rightarrow \infty$ has been investigated, as also have the asymptotics of the probability of the generation of random elements of them. For certain classes of random non-negative matrices, the distributions have been studied of the number of zero rows in a matrix and in permanents, and estimates have been given of the probability of the primitiveness of such matrices. For the proof of the existence of combinatorial configurations without constructing them, one sometimes employs a certain specific probabilistic device. The essence of this device consists in the proof of the existence of the configuration (without constructing it) by means of an estimate of the probability of some event (see [7]).

#### References

 [1] J. Riordan, "An introduction to combinational analysis" , Wiley (1958) [2] H.J. Ryser, "Combinatorial mathematics" , Carus Math. Monogr. , 14 , Math. Assoc. Amer. (1963) [3] M. Hall, "Combinatorial theory" , Blaisdell (1967) [4] E.F. Beckenbach (ed.) , Applied combinatorial mathematics , Wiley (1964) [5] F. Harary, "Graph theory" , Addison-Wesley (1969) pp. Chapt. 9 [6] F Harary, E. Palmer, "Graphical enumeration" , Acad. Press (1973) [7] P. Erdös, J. Spencer, "Probabilistic methods in combinatorics" , Acad. Press (1974) [8] V.F. Kolchin, V.P. Chistyakov, "Combinatorial problems of probability theory" Itogi Nauk. i Tekhn. Teor. Veroyatnost. Mat. Stat. Teoret. Kibernet. , 11 (1974) pp. 5–45 (In Russian) [9] V.N. Sachkov, , Questions of cybernetics. Proc. Seminar on Combinatorial Mathematics , Moscow (1973) pp. 146–164 (In Russian) [10] V.N. Sachkov, "Combinatorial methods in discrete mathematics" , Moscow (1977) (In Russian) [11] V.N. Sachkov, "Probabilistic methods in combinatorial analysis" , Moscow (1978) (In Russian) [12] H. Minc, "Permanents" , Addison-Wesley (1978) [13] G.P. [G.P. Egorichev] Egorychev, "The solution of van der Waerden's problem for permanents" Adv. in Math. , 42 : 3 (1981) pp. 299–305

The marriage problem is the following. Let there be a set $\{ g _ {1} \dots g _ {n} \}$ of $n$ girls and a set $\{ b _ {1} \dots b _ {m} \}$ of $m$ boys. Each girl $g _ {i}$ likes a subset $B _ {i} \subset \{ b _ {1} \dots b _ {m} \}$ of boys. When is it possible that each girl marries a boy she likes? The solution is of course given by the P. Hall theorem on distinct representatives, and this theorem is also known as the marriage theorem or the P. Hall marriage theorem. The abbreviation SDR is often used for systems of distinct representatives. Let $G$ be the bipartite graph (cf. Graph, bipartite) consisting of the vertices $\{ g _ {1} \dots g _ {n} , b _ {1} \dots b _ {m} \}$ and with an edge joining $g _ {i}$ and $b _ {j}$ if and only if girl $i$ likes boy $j$( and no other edges). Then a solution of the marriage problem provides a matching, and in this context the marriage theorem is also known as the P. Hall matching theorem.