Let's say I have 1000 small squares of equal size that are each 5x5. How do I calculate the dimensions of the smallest square that all of these 5x5 squares will fit into without overlapping?
This sounds like an optimization problem where you have to minimize the perimeter of the square, whilst keeping all the stuff in.
In a normal optimization for perimeter, we have p = 2x + 2y and A = xy where we wish to minimize p and maximize A.
You will also have to take into account the nature of the blocks.
Interesting. Well the solution I came up with was to take the area of the smallest square and multiply it by the number of squares. The square root of the total area would be the length of one side of the large square. I'm just not sure if this is the most efficient solution.