In: Advanced Math
The solution uses the Havel Hakimi Theorem.
The Havel Hakimi Theorem states that:
Suppose that G =
(d1,d2,d3,.....,dn) be
a non-increasing sequence.
Consider the new sequence G' =
(d2-1,d3-1,.......dd1+1 -
1,dd1+2,.......dn) which is obtained from the
above sequence by removing the first term d1 and
subtracting 1 from the next d1 terms.
Then, the new sequence G' is the degree sequence of a graph iff G
is the degree sequence of some graph.
Now, turning towards the problem:
For this, we write the degree sequence in non-increasing order
:
(3,3,3,1,1,1,1,1)
Step 1: (3,3,3,1,1,1,1,1)
Step 2: (2,2,0,1,1,1,1) = (2,2,1,1,1,1,0)
Step 3: (1,0,1,1,1,0) = (1,1,1,1,0,0)
Step 4: (0,1,1,0,0) = (1,1,0,0,0)
To draw the graph back, we need to follow the steps in reverse and
start with (1,1,0,0,0).