Why can't we have constraints on both ends in linear programming?

73 Views Asked by At

In linear programming we have constraints like

$$x+2y\le5 \qquad \qquad 4x+5y\le8$$

Let's say we have a question about an athlete's diet. In that case, couldn't that athlete have a diet where a particular nutrient will have a min and max intake, which would somehow make constraints like

$$500\le4x+5y\le1200$$

Why can't we formulate such questions? And how would we solve them? Is there such kind of thing already in the Mathematical Programming world?

1

There are 1 best solutions below

1
On BEST ANSWER

Of course you can have both maximum and minimum constraints. Just remember that (if $m$ is the minimum and $M$ is the maximum) $$m \leq a_1x_1 + b_2x_2 + \ldots +a_nx_n \leq M$$ is equivalent to two simultaneous inequalities: $$m \leq a_1x_1 + b_2x_2 + \ldots +a_nx_n $$ $$a_1x_1 + b_2x_2 + \ldots +a_nx_n\leq M$$

Finally, multiply both sides of the first inequality with $-1$:

$$-a_1x_1 - b_2x_2 - \ldots -a_nx_n \leq -m$$ $$ a_1x_1 + b_2x_2 + \ldots +a_nx_n\leq M$$

As you can see, we have expressed both the minimum and the maximum conditions using only single inequalities of the form $\leq$, so we can just plug those into the Simplex algorithm and solve.