I have already posted this question here but have not received an answer so I am cross-posting with hope to reach a larger amount of mathematicians:
Let $T=\{1,\cdots,n\}$ and consider the following mixed integer linear problem $P$: $$ \max \sum_{t\in T} x_{t} $$ subject to $$ I_t=I_{t-1}+a_{t}-x_{t}\quad t\in T\\ I_t \le M_t(1-y_t)\quad t\in T\\ x_t \le M_ty_t \quad t\in T\\ I_t,x_t \ge 0 \quad t\in T\\ y_t \in \{0,1\}\quad t\in T $$ $I_0$ and $a_t$ are given parameters in $\mathbb{R}^+$ and $M_t$ is a large constant. This problem is quite similar to a lot-sizing problem with capacities $M_t$, production variables $x_t$, demands $a_t$, in which we have constraints $I_t=I_{t-1}\color{red}{-}a_{t}\color{red}{+}x_{t}$ (but no constraints $I_t \le M_t(1-y_t)$).
I would like to show that $P$ is NP-hard. The decision version of $P$ is clearly in NP. I am trying to show that the binary knapsack problem reduces to $P$ in polynomial time.
My try: I consider the following knapsack problem : $$ \min\{ \sum_{t \in T}c_t y_t\;|\;\sum_{t\in T}v_t y_t \ge b, \; y_t\in \{0,1\} \} $$ and solve an instance of $P$ with:
- $M_t = v_t\quad \forall t \in T$
- $a_t =0 \quad \forall t=1,...,n-1$
- $a_n = b$
- $I_0 = 0$
Variables $I_t$ can be eliminated by noting that $$ I_t = I_0 + \sum_{j=1}^t(a_j-x_j) $$ and so the decision version of $P$ is equivalent to finding a feasible solution of $$ I_0 + \sum_{j=1}^t(a_j-x_j) \ge 0 \quad t \in T\\ I_0 + \sum_{j=1}^t(a_j-x_j) \le M_t(1-y_t) \quad t \in T \\ x_t \le M_ty_t \quad t\in T\\ x_t \ge 0 \quad t\in T\\ y_t \in \{0,1\}\quad t\in T $$ With the chosen data, we get: $$ b-\sum_{j=1}^t x_j \ge 0 \quad t \in T\\ b- \sum_{j=1}^t x_j \le v_t(1-y_t) \quad t \in T \\ x_t \le v_t y_t \quad t\in T\\ x_t \ge 0 \quad t\in T\\ y_t \in \{0,1\}\quad t\in T $$
Now, if I were able to show that $b-\sum_{j=1}^t x_j = 0 \; \forall t \in T$, by combining it with $x_t \le v_t y_t \; \forall t \in T$, I would get $$ b \le \sum_{t\in T} v_t y_t $$ which would finish the proof. For every $t\in T$ such that $y_t =1$ it is the case since the equations become $b-\sum_{j=1}^t x_j \ge 0$ and $b-\sum_{j=1}^t x_j \le 0$.
- Is there any way to prove this this way? How can I deal with the cases for which $y_t =0$?
- I am pretty sure that if $M_t=M\; \; \forall t \in T$, then $P$ is no longer NP-hard. Can anyone confirm this?
Another intuitive approach would be to reduce the lot sizing problem to $P$, but I did not get very far. Any help is appreciated!