# Gale–Ryser theorem

The Gale–Ryser theorem is a result in graph theory and combinatorial matrix theory, two branches of combinatorics. It provides one of two known approaches to solving the bipartite realization problem, i.e. it gives a necessary and sufficient condition for two finite sequences of natural numbers to be the degree sequence of a labeled simple bipartite graph; a sequence obeying these conditions is called "bigraphic". It is an analog of the Erdős–Gallai theorem for simple graphs. The theorem was published independently in 1957 by H. J. Ryser and David Gale.

## Statement

A pair of sequences of nonnegative integers $(a_{1},\ldots ,a_{n})$ and $(b_{1},\ldots ,b_{n})$ with $a_{1}\geq \cdots \geq a_{n}$ is bigraphic if and only if $\sum _{i=1}^{n}a_{i}=\sum _{i=1}^{n}b_{i}$ and the following inequality holds for all $k\in \{1,\ldots ,n\}$:
    $\sum _{i=1}^{k}a_{i}\leq \sum _{i=1}^{n}\min(b_{i},k).$
Sometimes this theorem is stated with the additional constraint $b_{1}\geq \cdots \geq b_{n}$. This condition is not necessary, because the labels of vertices of one partite set in a bipartite graph can be rearranged arbitrarily.
In 1962 Ford and Fulkerson gave a different but equivalent formulation of the theorem.

## Other notations

The theorem can also be stated in terms of zero-one matrices. The connection can be seen if one realizes that each bipartite graph has a biadjacency matrix where the column sums and row sums correspond to $(a_{1},\ldots ,a_{n})$ and $(b_{1},\ldots ,b_{n})$.
Each sequence can also be considered as an integer partition of the same number $m=\sum _{i=1}^{n}a_{i}$. It turns out that partition $(a_{1}^{*},\ldots ,a_{n}^{*})$ where $a_{k}^{*}:=|\{b_{i}\mid b_{i}\geq k\}|$ is the conjugate partition of $(b_{1},\ldots ,b_{n})$. The conjugate partition can be determined by a Ferrers diagram. Moreover, there is a connection to the relation majorization. Consider sequences $(a_{1},\ldots ,a_{n})$, $(b_{1},\ldots ,b_{n})$ and $(a_{1}^{*},\ldots ,a_{n}^{*})$ as $n$-dimensional vectors $a$, $b$ and $a^{*}$. Since $\sum _{i=1}^{k}a_{i}^{*}=\sum _{i=1}^{n}\min(b_{i},k)$, the theorem above states that a pair of nonnegative integer sequences a and b with nonincreasing a is bigraphic if and only if the conjugate partition $a^{*}$ of $b$ majorizes $a$.
A third formulation is in terms of degree sequences of simple directed graphs with at most one loop per vertex. In this case the matrix is interpreted as the adjacency matrix of such a directed graph. When are pairs of nonnegative integers $((a_{1},b_{1}),...,(a_{n},b_{n}))$ the indegree-outdegree pairs of a labeled directed graph with at most one loop per vertex? The theorem can easily be adapted to this formulation, because there does not exist a special order of b.

## Proofs

The proof is composed of two parts: the necessity of the condition and its sufficiency. We outline the proof of both parts in the language of matrices. To see that the condition in the theorem is necessary, consider the adjacency matrix of a bigraphic realization with row sums $(b_{1},\ldots ,b_{n})$ and column sums $(a_{1},\ldots ,a_{n})$, and shift all ones in the matrix to the left. The row sums remain, while the column sums are now $a^{*}$. The operation of shifting all ones to the left increases a partition in majorization order, and so $a^{*}$ majorizes $a$.
The original proof of sufficiency of the condition was rather complicated. Krause (1996) gave a simple algorithmic proof. The idea is to start with the Ferrers diagram of $b$ and shift ones to the right until the column sums are $a$. The algorithm runs in at most $n$ steps, in each of which a single one entry is moved to the right.

## Stronger version

Berger proved that it suffices to consider those $k$th inequalities such that $1\leq k<n$ with $a_{k}>a_{k+1}$ and the equality for $k=n$.

## Generalization

A pair of finite sequences of nonnegative integers $a$ and $b$ with nonincreasing $a$ is bigraphic if and only if $\sum _{i=1}^{n}a_{i}=\sum _{i=1}^{n}b_{i}$ and there exists a sequence $c$ such that the pair $c,b$ is bigraphic and $c$ majorizes $a$. Moreover, in is also proved that pair $a$ and $b$ has more bigraphic realizations than pair $c$ and $b$. This yields to the result that regular sequences have for fixed numbers of vertices and edges the largest number of bigraphic realizations, if n divides m. They are the contrary sequences of threshold sequences with only one unique bigraphic realization, which is known as threshold graph. Minconvex sequences generalize this concept if n does not divide m.

## Characterizations for similar problems

Similar theorems describe the degree sequences of simple graphs and simple directed graphs. The first problem is characterized by the Erdős–Gallai theorem. The latter case is characterized by the Fulkerson–Chen–Anstee theorem.