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?

Printable View

- February 6th 2013, 07:07 AMcoinerArrange small squares into one large square?
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?

- February 6th 2013, 01:35 PMchiroRe: Arrange small squares into one large square?
Hey coiner.

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. - February 6th 2013, 03:10 PMcoinerRe: Arrange small squares into one large square?
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.