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?
