Greedy algorithm Packing problem
-
05-11-2019 - |
题
Assume that $A$ is the set of objects such that each object $x_i \in A$ has value $w_i$. We wish to pack these objects into group, each pack containing at least $k$ objects. Our goal is to minimize the maximum difference between the maximum and minimum value of each packs. in other words, our goal is to minimize $L$ with the constraint that all packs should have more than $k$ object in them.
$$L = \max_{i \in \mathrm{packs}} \left\{\max_{j \in \mathrm{pack}(i)}w_j - \min_{k \in \mathrm{pack}(i)}w_k \right\}.$$
For example for the following packing, $L$ is $\max{(30-20, 120 - 100)} = 20$. $$[20, 30] \;\; [100,110,120]$$
I was wondering if there is a greedy algorithm that can do the job.
没有正确的解决方案
不隶属于 cs.stackexchange