Let $d = (d_1,d_2,\dots, d_n)$ be a nonincreasing sequence of nonnegative integers, that is, $d_1 \geq d_2 \geq · · · \geq d_n \geq 0$. Show that:
there is a loopless graph with degree sequence d if and only if $\sum_{i=1}^{n}d_i$ is even and $d_1 \leq \sum_{i=2}^{n}d_i$