[Math] Does there exist a general graph for any degree sequence of even natural numbers

graph theory

Suppose you have a given degree sequence $(d_1,d_2,\dots,d_n)$, where $d_i$ is even for every $i$. Does there exist a general graph with this degree sequence?

I say yes, the easiest way is to take any isolated graph of $n$ vertices, $\{v_1,\dots,v_n\}$, and then at each $v_i$, put in $d_i/2$ loops, so $\deg(v_i)=d_i$ for all $i$. Is this cheating? It seems very easy, and it all hinges on the fact that graph is allowed to have multiple edges between vertices.

As a follow up question, is there some way, sufficient and/or necessary conditions to tell if a graph with a given degree sequence exists, given that the sum of the degree sequence is even? (It may not necessarily be the case that every degree may be even itself.)

Best Answer

Self-loops make the question rather uninteresting. If you forbid them, the answer is given by the Erdős–Gallai theorem.