I want to minimize the amount of unused space in a binpacking problem. I keep seeing binpacking being described as using the least amount of bins possible. Example (emphasis mine):
assign each item to a bin such that number of total used bins is minimized
https://www.geeksforgeeks.org/bin-packing-problem-minimize-number-of-used-bins/
Would minimizing the amount of bins guarantee the least amount of waste? And if so, is there a minimum amount of bins (based on the algorithm used, not necessarily the one from the above link) that we need to use before it is efficient? Or is binpacking "by default" efficient in minimizing waste?
Say your bins have capacity $c$, you have a total weight $w$ to put in the bins and you use $n$ of them. Then the wasted space $W$ is : $$W = \text{total bins capacity} - \text{weight put into them} = nc - w$$ Since $c$ and $w$ are fixed, minimising $W$ amounts to minimising $n$, since each is an increasing function of the other. Intuitively, using more bins adds to the total bins capacity without changing how much you use it, so you effectively increase the wasted space.