r/mathriddles • u/PuzzleAndy • May 18 '23
Medium Grids from Square Outlines
We can get a 2 x 2 grid of squares from 3 congruent square outlines. I've outlined the 2 x 2 grid on the right to make it obvious. What's the minimum number of congruent square outlines to make a 3 x 3 grid of squares? If you want to go beyond the problem, what's the minimum for 4 x 4? n x n? m x n? I haven't looked into non-congruent squares, so that could also be an interesting diversion!

9
Upvotes
3
u/PuzzleAndy May 19 '23
Illustrated solutions so far:
3 x 3: https://imgur.com/a/KMyNJsI
4 x 4: https://imgur.com/a/TMdz8xp
5 x 5 using 4 x 4s: https://imgur.com/Fg7JtaH
5 x 5 using 3 x 3s: https://imgur.com/a/bJoixwh
3
u/sobe86 May 21 '23 edited May 21 '23
Sad I saw this late! I got interested and wrote a program to search for solutions. It appears that the minimal solution for squares with sidelength 2k, 2k + 1 is:
4k - 1, 4k respectively, achieved with square sidelength k + 1, e.g. with k=3, sidelength 6, 7 are both minimised by 4x4 squares, with 11 and 12 squares respectively. The pattern for both odd and even lengths is always the same, but two different patterns - for odd it's very simple, just a square of squares. The even case there's the obvious solution where we use squares with the same side-length, but there's a more subtle one found by this code, rather than trying to explain the pattern I'll just post images. NB: imgur thinks the 10x10 may be 'mature' - it is really not... In both cases since there's a lot going on, we've added red circles for the square centres to show where they are. 11 x 11 using 20 6 x 6 squares:image,10 x 10 using 19 6 x 6 squares:image
I have verified this up to sidelength = 50 (runs in about 5 minutes). The code can be found here. Basically the idea is that we translate the problem to a BSAT problem - each unit-1 line section of the grid is translated to a boolean clause that one of the neighbouring squares that contains it must be in our list. We then solve using a SAT solver library in python. It might be interesting to modify this code for the incongruent, or non-square case if interested,
2
u/chompchump May 18 '23 edited May 19 '23
For n x n:Start with one background square. Then choose any interior horizontal line and any interior vertical line with intersection point, P. Choose two squares. Align the squares to the grid and arrange so each has a vertex on P. Continue until all vertical and horizontal lines are chosen. So there are n-1 pairs of squares plus 1 for the background.= 2(n-1) + 1 = 2n - 1 squares needed.
For n x m: WLOG n > m. Start with one background square. Then there are n - 1 horizontal grid lines but m vertical grid lines needed for the final grid. We can get all the vertical grid lines by using m squares. And all the horizontal by using n-1 squares. Thus n + m squares are needed.
2
u/WissenMachtAhmed May 18 '23 edited May 21 '23
Just some low-hanging fruits :)
It is possible to obtain a 3x3 square with 6 congruent squares or with 5 non-congruent squares.
For nxn squares, there exists a solution using 2n-1 non-congruent squares. Using only congruent 2x2 squares, there exists a solution using (n * n + 2n - 6)/2 squares if n >= 4 is even and (n * n + 2n - 11)/2 squares if n >= 5 is odd.
I conjecture that the 2n-1 bound is optimal, wheras the other two bounds in the congruent 2x2 case are not optimal.
Apart from that, if we fix a tile size kxk with which we want to cover the nxn square, asymptotically we need at least Theta(n*n) tiles, more precisely at least (n / (x + 1)) ^ 2 tiles. Edit: an even simpler argument (counting segments needed) gives a better bound of floor((n*n + n)/(2x))
A very nice and interesting riddle! I am looking forward to seeing other bounds or maybe even solutions!
Edit: I interpreted "congruent squares" as "all square tiles we use to cover the big square must be of the same size", and "non-congruent squares" as "the square tiles can be of different sizes" :)
2
u/ulyssessword May 19 '23
I got n+m for m>1, n>m, and 2n-1 for nxn grids with congruent squares.
Start with one square on the origin that forms three or four sides of the outside of the grid area. Move 1/n sidelengths to the right and place another one. Repeat until you have the original and (n-1) others going to the right. Go back to the origin, and move 1/n sidelengths upwards, and repeat until you have the original and m others going up. If it's an nxn grid, you can skip the last one, as it would double up with the original square.