# Formulating a LP minimization problem

## Attempt

Let $$x_i$$ be the number of workers to be hired that starts its shift on day $$i$$. So we want to minimize the function $$f( {\bf } ) = \sum_{i=1}^7 x_i$$. The constraints:

$$x_1 \leq 17$$ $$x_1 + x_2 \leq 13$$ $$x_1 + x_2 + x_3 \leq 15$$ $$x_1+x_2+x_3+x_4 \leq 19$$ $$x_1 + x_2 + x_3 + x_4 + x_5 \leq 14$$ $$x_2 +x_3 + x_4 + x_5 + x_6 \leq 16 \; \; \; \text{day 1 needs 2 days off}$$ $$x_3 + x_4 + x_5 + x_6 + x_7 \leq 11$$ $$x_i \geq 0$$

Is this a correct formulation?

• On day one, if you require $17$ workers, then you need AT LEAST $17$ workers. On day two, if you require $13$ workers, then you need AT LEAST $13$ workers etc. – Retty Oct 21 '18 at 6:07

The nurse who are present on day $$1$$ are the ones who start from day $$4,1,5,6,7$$. Hence,
$$x_1 + x_4 + x_5 + x_6 + x_7 \ge 17.$$