How to solve $X^TAX = B$ where each element of $X$ can only take $0$ or $1$ as their values

74 Views Asked by At

I want to solve $$X^TAX = B$$ where $X$,$A$ and $B$ are matrices. $X$ is $n\times2$, $A$ is $n\times n$ (sparse), $B$ is $2\times2$, $x_{ij}$ is $0$ or $1$.and the row sums of X is $1$, What should I do ?