It is known that the sequence $d\_1 \geq d\_2 \geq \ldots \geq d\_n$ of nonnegative integers is the degree sequence of a graph if and only if the sum of the $d\_i$ is even and we have
\[
\sum\_{i = 1}^k d\_i \leq k(k - 1) + \sum\_{i = k + 1}^n \min(d\_i, k)
\]
for all $k \in \{1, \ldots, n\}$. (This is the Erdős–Gallai theorem.) There is also a simple algorithm (the Havel-Hakimi algorithm) for producing a graph with a given valid degree sequence.



> 
> Is there a simple characterization of pairs $\{(a\_1 \geq \ldots \geq a\_m), (b\_1 \geq \ldots \geq b\_n)\}$ of sequences of nonnegative integers such that there exists a bipartite graph with the property that the degrees of the vertices in one part are given by the $a\_i$ and the degrees of the vertices in the other part is given by the $b\_j$?
> 
> 
> 


An obvious necessary condition is that $\sum a\_i = \sum b\_j$, but this is also clearly not sufficient. One can also ask for an algorithm analogous to Havel-Hakimi.



Classification of degree (bi-)sequences of bipartite graphs?
So you are looking for the [Gale-Ryser theorem](http://mathworld.wolfram.com/Gale-RyserTheorem.html). There is a version of Havel-Hakimi for bipartite graphs as well. It says that the pair $(P,Q)$ is bigraphic if and only if the pair $(P',Q')$ is bigraphic, where $(P', Q')$ is obtained from $(P, Q)$ by deleting the largest element $p\_1$ of $P$ and subtracting one from each of the $p\_1$ largest elements of $Q$.


