Consider the variable sized bin packing
$$ \begin{align*}\tag{P1a}\label{P1a} & {\underset{\mathbf{ x }, \mathbf{ y }}{\text{minimize}}} & & \sum_{j=1}^nf_jy_j\\[3pt] & \text{subject to} & & \sum_{i=1}^{m} w_{i}x_{ij} \leqslant C_{j}y_j,\forall\,j\in\{1,\dots,n\}\tag{P1b}\label{P1b}\\[3pt] & & & \sum_{j=1}^n x_{ij}=1, \forall\, i \in\{1,\dots,m\}\tag{P1c}\\[3pt] & & & x_{ij}, y_j \in\{0, 1\}, \forall\, i\in\{1,\dots,m\}, j\in\{1,\dots,n\}\tag{P1d}. \end{align*} $$
The problem \eqref{P1a} can be found for example in variable sized bin packing problem.
The problem \eqref{P1a} can be seen as:
- We have set of bins $\{1,\dots,n\}$ each with a weight $f_j$, a set of items $\{1,\dots,m\}$ each with a weight $w_i$. For each bin $j$, there is a capacity $C_{j}$.
- We would like to assign all items to the bins such that every item is assigned to exactly one bin and the weights of items assigned to bin $j$ does not exceed the capacity $C_{j}$.
I am curious about the case where the weights of the items are all equal, say $w_i=1$ for all $i$. Can we derive an optimal algorithm in this case or it is still NP-hard?
I can't find an NP-hardness reduction but I think that we can do this algorithm:
- sort the bins by $C_j$ in decreasing order;
- start with bin 1, fill it with items until $C_1$ is reached;
- go to the next bin and loop.
I have tried this algorithm with few examples but I cannot prove its optimality though.
Could you help please?