Graph realization problem

The graph realization problem is a decision problem in graph theory. Given a finite sequence $$(d_1,\dots,d_n)$$ of natural numbers, the problem asks whether there is a labeled simple graph such that $$(d_1,\dots,d_n)$$ is the degree sequence of this graph.

Solutions
The problem can be solved in polynomial time. One method of showing this uses the Havel–Hakimi algorithm constructing a special solution with the use of a recursive algorithm. Alternatively, following the characterization given by the Erdős–Gallai theorem, the problem can be solved by testing the validity of $$n$$ inequalities.

Other notations
The problem can also be stated in terms of symmetric matrices of zeros and ones. The connection can be seen if one realizes that each graph has an adjacency matrix where the column sums and row sums correspond to $$(d_1,\ldots,d_n)$$. The problem is then sometimes denoted by symmetric 0-1-matrices for given row sums.

Related problems
Similar problems describe the degree sequences of simple bipartite graphs or the degree sequences of simple directed graphs. The first problem is the so-called bipartite realization problem. The second is known as the digraph realization problem.

The problem of constructing a solution for the graph realization problem with the additional constraint that each such solution comes with the same probability was shown to have a polynomial-time approximation scheme for the degree sequences of regular graphs by Cooper, Martin, and Greenhill. The general problem is still unsolved.