1

I have a 4x4 matrix of constants $A$ and an unknown column vector of the length 4 $B$.

The sum of $B$'s elements is also a given constant $c$.

We multiply $A×B$ and get a resulting column vector $P$ of length 4.

My task is to set optimal element values for $B$, which are all $\in\Bbb N$, so that the product of the elements in $P$ becomes maximal.

Another restriction is that no element of $P$ may become negative.

I know how to multiply matrices or how to convert them into single equation lines. But I have no idea how to optimize the product of the resulting vector's elements.
How should I approach this problem in general?

  • In the first place, you can't multiply a $4\times4$ matrix with a row vector (which is a $1\times4$ matrix). In the second place, even if it was a column vector, you wouldn't get a $4\times4$ matrix as the result. –  Dec 25 '15 at 18:27
  • @Rahul Yes, sorry. I corrected that. The 4x4 was a typo and I like to mix up the row and column words... No idea why. :-/ Now it's correct, I hope. – Byte Commander Dec 25 '15 at 18:37
  • Why don't you write out the optimization problem using some mathematical notation? – Batman Dec 25 '15 at 18:43
  • Because I'm not familiar with that MathJax (or whatever) syntax... :-( I also don't really know how to describe what I need to optimize mathematically. – Byte Commander Dec 25 '15 at 18:44

1 Answers1

1

I believe this can be solved with standard MINLP (Mixed Integer Nonlinear Programming) solvers. The model can look like:

enter image description here

There are a number of excellent MINLP solvers available (e.g. Baron, Couenne, Bonmin). You can try them out online.