# Integer programming with Matlab

I'd like to know how to solve in MATLAB the following integer optimization problem :

$\underset{B,D}{\arg\min} \Vert{Y-XDB}\Vert_{2}$

where $X,Y$ are given matrices.

The constraint is the following : the matrix $D$ must be a diagonal matrix and its elements must be 0 or 1.

• Matrix $B$ does not have any restrictions? And what are the sizes of all matrices? – fibonatic May 24 '16 at 22:27
• Matrix $B$ has no particular restriction, it is the regression operator to be determined. The size o the matrixe are the following: X and Y are $N \times n$, D is $n \times n$ and $\beta$ $n \times p$. – user41037 May 24 '16 at 22:44
• If $X$ is invertible wouldn't $D=I$ and $B=X^{-1}Y$ be the solution? Or are you also looking for solutions when $X$ is not invertible? – fibonatic May 24 '16 at 22:50
• Indeed, but the purpose is also to find the matrix D that minimizes this norm. Besides, D must be diagonal with 0 or 1 as diagonal elements. I know this problem is related to Mixed Integer Nonlinear Programming, but i don't know how to solve it. – user41037 May 24 '16 at 22:51
• The identify matrix $I$ only has ones on its diagonal, so satisfies the criteria. – fibonatic May 24 '16 at 22:58