# Minimization of multiple absolute sums

I know that on fist glance this seems as already explained problem on many internet places, but I haven't found solution anywhere. Anyway, here is my function:

$$F=\sum_{i=0}^N |S_i|$$ where $$S_i=\sum_{j=0}^M A_kX_j$$ for k=1, 2, ...N*M, and $$A_k$$ are constants.

The goal is to minimize function F, where $$X_j$$ is variable, including conditions:

$$|S_i|\le B_i$$ for every i and $$\sum_{j=0}^M X_j=C$$ where $$B_i$$ and C are constants.

It would be helpful to know what part of mathematics is dealing with these problems, or even better to understand algorithm how to write program code.

• A few comments: Your definition of $S_i$ is not dependent on $i$, and I'm pretty sure you are looking for linear programming as a method. – Don Thousand Mar 28 at 13:41
Introduce a new variable $$q_i$$ to represent and replace every $$|S_i|$$ term, and add the constraint $$-q_i \leq S_i \leq q_i$$. With that, you have a linear program and when you optimize, you will have $$q_i = |S_i|$$ at the optimum (otherwise it would be possible to improve the solution by decreasing $$q_i$$)