I have an integer programming problem with $L$ variables $x_1, x_2, x_{L}$ which all assume integer values and the following constraints must stand:
- $x_i \geq 0$
- $x_1 = 10$
- $x_2 + x_3 + ... + x_{L} = 36$
how can I find the max and min of the following quantity?
- $\displaystyle{\sum_{l = 1}^{L-1} x_{l}\,x_{l + 1}}$
My question is more oriented towards finding out the algorithm used to solve this problem that the exact number of max and min value but obviously if you can come up with an answer without using integer programming that is still more than welcome!
When $L=2$, there is only one feasible solution and the unique minimiser/maximiser is $(x_1,x_2)=(10,36)$, which gives a function value $360$.
When $L\ge3$, the global minimum value is obvious: it is $0$ and a minimiser is given by $(x_1,x_2,x_3,x_4,\ldots,x_L)=(10,0,36,0,...,0)$. For global maximum, it is always true that $$ x_{k-3}x_{k-2} + x_{k-2}x_{k-1} + x_{k-1}x_k \le x_{k-3}(x_{k-2}+1) + (x_{k-2}+1)x_{k-1} + x_{k-1}(x_k-1) $$ for all $k\ge4$. Therefore we can always assume that $x_L=x_{L-1}=\cdots=x_4=0$. The objective function then becomes $10x_2+x_2(36-x_2)=x_2(46-x_2)$ and its maximum occurs when $x_2=\frac{46}{2}=23$ and $x_3=36-x_2=13$. Hence the maximum value is $529$.