I have 10 boxes, and each box can hold items. I also have 5 different types of objects. Each item can hold 2 objects.
No box can hold more then 1 of the same object, but it is possible for it to hold none. Also each object should be paired with the each other type of object as well (but only once). What is an algorithm to determine the least amount of boxes required to store the all combinations of objects?
B1 -> [O1 O2] B2 -> [O1 O3] B3 -> [O1 O4] B4 -> [O1 O5] B5 -> [O2 O3] B6 -> [O2 O4] B7 -> [O2 O5] B8 -> [O3 O4] B9 -> [O3 O5] B10 -> [O4 O5]
Best Case (What I want to achieve):
B1 -> [O1 02] [O3 O4] B2 -> [O1 O3] [O4 05] B3 -> [O1 04] [O2 O5] B4 -> [O1 O5] [O2 04] B5 -> [O3 O5] [O2 04]
The number of boxes, types of objects can both change. While for the sake of the actual formula the number of objects per item can change, I only need to deal with the scenario where there is 2.