We are considering the following problem:
Given an integer $n$ and a sequence of integers $r_i,\ 1\le i\le n$, with $0\le r_i\le n-1$ does there exists a symmetric matrix $A$ such that the diagonal elements of $A$ are $0$'s, the off-diagonal elements are only $-1$ and $1$ and for each $i$ there are exactly $r_i$ $1$'s on the $i$-th row of $A$? How do we construct such a matrix? How do we construct all such matrices (up to some equivalence relation).
For example, if $n$ is even and half of $r_i$ are equal to $n$, the other half to $n-1$. How do we construct such matrices? What about the case when $\{r_i\}_{i=1}^n$ is a constant sequence? When such a matrix exists?
The problem is related to the existence of certain codes with given distances between the codewords.