<s>[INST] Given the graphic sequence of a simple graph, how to construct the adjacency matrix? Suppose I have the graphic sequence (7,6,6,6,5,4,4,2), how do I get the adjacency matrix out of it?
 [/INST] The graph has $8$ vertices, and $\tfrac{1}{2}(7+6+6+6+5+4+4+2)=20$ edges by the Handshaking Lemma.  We can exhaustively generate the non-isomorphic $8$-vertex $20$-edge graphs with vertex degrees between $2$ and $7$ using geng which comes with nauty using:
geng 8 20:20 -d2 -D7

I wrote a script that filters out the ones that don't have degree sequence (7,6,6,6,5,4,4,2) leaving two remaining.  The two graphs are as follows:

I've marked the vertices with their degrees, and their corresponding adjacency matrices are given below.
$\begin{array}{|cccccccc|} \hline 0 & 0 & 0 & 1 & 0 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 
1 & 1 \\ 1 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 & 0 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 1 & 
1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 \\ \hline \end{array}
 \quad\quad\quad
\begin{array}{|cccccccc|} \hline 0 & 0 & 0 & 0 & 1 & 0 & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 1 & 1 & 1 \\ 0 & 0 & 0 & 1 & 0 & 1 & 
1 & 1 \\ 0 & 0 & 1 & 0 & 1 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 0 & 1 & 1 & 1 \\ 0 & 1 & 1 & 1 & 1 & 0 & 1 & 1 \\ 0 & 1 & 1 & 1 & 
1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 0 \\ \hline \end{array}$
</s>