I am currently working on a problem at work where we have paint buckets of different sizes and we need to create a calculator that given a required quantity of paint it will calculate the required quantity of each bucket size minimising wastage. It needs to use the biggest size possible but minimising wastage. I am sure this sort of algorithm has a name but I can’t find it. I found the Knapsack Algorithm and the Coin Change Algorithm but they are not exactly the same.
Any idea about the name of this algorithm? It seems a fairly generic problem. I am sure an algorithm exists already.