How does one solve this kind of problem? Maximize z = x1^2 + x2^2 + x3^2 x1.x2.x3 = 6 x1,x2,x3 all positive integers. In the above, it looks like one can look and find that the answer is 1,1,6(probably) - but how does one solve more complicated problems of this nature?
asked
Gen |

One possibility is to use Constraint Programming: http://kti.ms.mff.cuni.cz/~bartak/constraints/
answered
Tallys Yunes ♦ |

The following approach introduces binary variables as Paul suggested, but you can avoid factoring by taking the log of both sides of your product constraint. And both the objective and constraints are linear here.
answered
Rob Pratt |

I don't know that I would recommend it in general, but you could formulate it as a 0-1 integer linear program by factoring the RHS value (I'm assuming just the one constraint) and using binary variables to decide in which original variable (x1, x2, ...) each factor lives. The objective ends up a quadratic function of the binary variables, which can be linearized by introducing more variables.
answered
Paul Rubin ♦♦ |