Knapsack with multiple bags and items having only weight
This is known as the bin packing problem (which is NP-hard). By simply sorting the decreasing order by their sizes, and then inserting each item into the first bin in the list with sufficient remaining space, we get 11/9 OPT + 6/9 bins (where OPT is the number of bins used in the optimal solution). … Read more