Constructing a Graph from Squared Adjacency Matrix I have a homework problem that has got me stumped:

Draw a graph whose adjacency matrix A is such that:
  \begin{bmatrix}3&1&0&1&2\\1&2&1&1&1\\0&1&2&2&0\\1&1&2&3&0\\2&1&0&0&2\end{bmatrix}
  is equal to A2

This seems almost impossible to do without either square rooting the matrix (which is not something we have learned), or by brute forcing the problem, which seems like it could take forever. I was wondering if anyone could provide some insight or tips on how to simplify the problem.
So far, I know that verticies A and D likely share an edge, but other than that I have no idea.
Is this even possible to do??

Not a full answer, but potentially helpful.
I used the following MiniZinc model to get a suitable matrix:
int: n = 5;
set of int: N = 1..n;
array[N,N] of int: A2 = 
    array2d(N, N, [3, 1, 0, 1, 2,
                   1, 2, 1, 1, 1, 
                   0, 1, 2, 2, 0, 
                   1, 1, 2, 3, 0, 
                   2, 1, 0, 0, 2]);
array[N,N] of var 0..2: A;

%  A has to be symmetric
constraint 
  forall(i, j in N where i < j) 
    (A[i, j] == A[j, i]);

%  A*A = A2
constraint  
  forall(i, j in N where i < j) 
     (A2[1, j] == sum([ A[i,k] * A[k, j] | k in N]));  

I assumed that the adjacency distances are rather small. 
The adjacency matrix has to be symmetric.
Result:
$$A = \begin{bmatrix}
0&0&1&0&0 \\
0&0&1&0&0 \\
1&1&0&1&2 \\
0&0&1&1&0 \\
0&0&2&0&1
\end{bmatrix}$$
Graph:

Source
