Build a larger area using smaller squares

I have a large square edge N. I want to calculate the number of small squares needed to build this large square using smaller squares with edge values ​​from 1to N-1. I have an unlimited number of such small squares. The only limitation is that I have to use the number of minimumsmaller squares. For example, if N = 3, I can build this square using 5 size squares 1and 1 size square 2. How can I solve this problem for any given value N?

+1
source share
1 answer

For even Nyou can use 4 squares of the side N/2, which is the minimum possible. For the odd, Nit's a little trickier. One possible solution for the odd None is one square (N+1)/2, 3 of (N-1)/2and a N-1size of 1, but I'm not quite sure what is the minimum ... For example, if N=9, this gives 12 squares, where there is a better solution of 9 3x3 squares. This may be the best solution for the simple N.

0
source

All Articles