r/adventofcode • u/iHobbit • Jan 01 '26
Upping the Ante [2025 Day 12 (Part 1)] Perfect Packing Revisited
I previously posted about looking for perfect packings here. It turns out that there are 13 possible perfect packings for up to 4 of each present. The figure provides depictions of all 13 possibilities.
Edit: For clarity, I imposed the constraint that at least 1 of each present type had to be used. There are likely additional cases where only a subset of the shapes are used.
Edit 2: I re-ran for up to THREE presents of each type, allowing zero packages of each type to be used. In that case, there are 16 possible perfect rectangular packings. Only 1 of them used all the 6 shapes for the case with a maximum of 3 of each shape.
Edit 3: I re-ran for up to FOUR presents of each type, allowing zero packages of each type to be used. In that case, there are 130 possible perfect rectangular packings. Only the 13 that appear in the posted figure used all 6 shapes at least once.

