I have the following optimization problem that I want to solve (note that the $X$ variable consists of a binary matrix subject to a single constraint).
First, some definitions:
My $X$ variable: $$ X = \underset{n\times m}{\underbrace{\pmatrix{ x_{11} & x_{12} & \dots &x_{1m} \\ x_{21} & \ddots \\ \vdots & & \ddots\\ x_{n1} & & & x_{nm} }}}\ \ \ \ \ x_{ij} \in \{ 0,1 \} $$
Other entities (constants) that I need to compute the cost function:
$$ A = \underset{n\times m}{\underbrace{\pmatrix{ a_{11} & a_{12} & \dots &a_{1m} \\ a_{21} & \ddots \\ \vdots & & \ddots\\ a_{n1} & & & a_{nm} }}}\ \ \ \ \ a_{ij} \in \{ 0,1 \} $$
$$ \mathbf{r} = \underset{m\times 1}{\underbrace{\pmatrix{r_1 \\ r_2 \\ \vdots \\ r_m}}}\ \ \ r_i = \frac{1}{\overline{r}}\ \ \ \ \forall i\in\{1,\dots,m\} $$
$$ \mathbf{o}^{(m)} = \underset{m\times 1}{\underbrace{\pmatrix{o_1 \\ o_2 \\ \vdots \\ o_m}}}\ \ \ o_i = 1\ \ \ \ \forall i\in\{1,\dots,m\} $$
$$ \mathbf{o}^{(n)} = \underset{n\times 1}{\underbrace{\pmatrix{o_1 \\ o_2 \\ \vdots \\ o_n}}}\ \ \ o_i = 1\ \ \ \ \forall i\in\{1,\dots,n\} $$
$$ \mathbf{t} = \underset{m\times 1}{\underbrace{\pmatrix{t_1 \\ t_2 \\ \vdots \\ t_m}}}\ \ \ t_i = \overline{t}\ \ \ \ \forall i\in\{1,\dots,m\} $$
$$ \mathbf{p} = \left(A - X\right)^T\mathbf{o}^{(n)} $$
I have just one constraint that is: $$ X\mathbf{o}^{(m)} = \mathbf{t} $$
The cost function that we want to minimize is:
$$ J = \frac{1}{2}\left(\mathbf{r} - \mathbf{p}\right)^T\left(\mathbf{r} - \mathbf{p}\right) $$
The search space is pretty huge since the number of solutions is ${\binom{n}{\overline{t}}}^m$. I'm pretty sure I can try to find a reasonable solution by using genetic algorithms, but is it possible to formulate and solve the problem by means of quadratic programming?
The main issue here is that I don't think I can rearrange my equations as follows (and $X$ in my case is a matrix, instead of a vector):
$$ J = \frac{1}{2}\mathbf{x}^TQ\mathbf{x} + \mathbf{c}^T\mathbf{x} $$ s.t. $$ A\mathbf{x} \le \mathbf{b} $$