# Tiling a square with rectangles

Tile completely this 47 x 47 square with 52 rectangles. Each rectangle must contain precisely one numbered cell, and that number must be the area or perimeter of the rectangle it finds itself in. This puzzle is the creation of Freddy Barrera. No peeking at the solution please!

• can rectangles overlap each other? Jun 25, 2019 at 2:37
• No, they do not overlap. Jun 25, 2019 at 2:50
• I've added logical-deduction since this is a form of puzzle known as Shikaku, even if this might not be able to be solved logically. Jun 25, 2019 at 3:16
• @OmegaKrypton No. Notice that numbers in the board range from 1 to 52 with no repetitions. Jun 25, 2019 at 12:20
• Note: rot13(bqq ahzoref zhfg or nernf, cevzr ahzoref zhfg or bar jvqr) Jun 25, 2019 at 13:29

I started from the lower side, then worked the left side until the upper-left corner. After that, there were some trial-and-errors on the center and finally completed the right side. • This is the solution known to me, most likely unique. It is the creation of Freddy Barrera: mathoverflow.net/questions/324654/…. Jun 26, 2019 at 1:56
• You should add attribution to the OP @BernardoRecamánSantos Jun 26, 2019 at 14:56
• Just got it, didn't even see you already did it. Nice puzzle! Jun 26, 2019 at 15:01

The beginnings of a solution, where warmer colors correspond to areas, and cooler colors to perimeters (Last updated 6-26): Reasoning:

1, 2, 7, 15, and 47 are solved as in Michael's answer above. 6 must now be the perimeter of a 1x2 domino, otherwise we reach the paradox alluded to in Michael's answer. 29 is forced into the horizontal position, in turn forcing 23 horizontal and making 8 the perimeter of a 1x3 block. 12 must fill the blank spot to the right of 29, with height either 5 or 12. 19 must be horizontal.

Cont.

17 must fill the corner between 7 and 15, because if 46 (as a 2x21 block) fills it, then 17 must fill the corner between it and 15, and 19 must fill the corner between it and 29, but then a blank spot to the left of 12 cannot be filled. 9 must then be a 3x3 block. 4 cannot be taller than 1 block, because then the corner between 9 and 12 cannot be filled without blocking the corner between 12 and the edge. 4 then must be the perimeter of a 1x1 block because otherwise 27 is forced to fill a gap of width-2, an impossibility. 37 fills the corner since 42 cannot, forcing 16 to be the perimeter of a 5x3. Various other forcings yield the diagram.

I believe that also

5 and 35 are forced to form a contiguous rectangle due to 32's position, forcing 46 to be the perimeter of an 11x12.

• your 37 is 38 blocks long. Jun 26, 2019 at 0:09
• ...which means several blocks above it are also too long since I used it as a measuring stick... I'm still working on it. Jun 26, 2019 at 0:14
• Some helpful logic (maybe). 1. All odd tiles must be 'area' not 'perimeter' as all perimeters are even. All prime odd tiles area P are obviously 1xP. 2. Most even tiles are 'perimeter' not area. This is due to the fact that total area if you use all 'area' tiles and no 'perimeter' tiles is short by 831. Using all even tiles as maximum area you can get up to 851 extra. So only one or a few 'non-perimeter even tiles. Note that 'perimeter' tiles have smaller or larger area than 'area' tiles. So you have some leeway, but not too much as you have to make up that 831 in area. Jun 26, 2019 at 4:53

As far as I've tried, this appears unsolvable

Here's a current diagram. I colored a few squares to simplify my explanation of my process The process I used to come to this:

The 1 square is obvious. Then two must be as it is because otherwise there is no other way to fill in the blue square. Since it is cut it must be in a 1xN rectangle and there is no number on the left most column to fulfill this. Next 6 must be the way it is because there is no other number to enclose the green square, then the same logic can apply to the purple square(s) for 47. Next, 7 must be horizontal, as if it is vertical, then 16 would have to fill the orange square and 27 cannot fill the remaining 2xN rectangle because 27 is odd. Now leaving 15 to fill the orange square and 18 to fill the yellow square. Lastly, since 23 is prime it must be a 1x23 rectangle which does not fit in the configuration horizontally, therefore it must be vertical. However we have now reached a point where there is nowhere for 29 to go.

I'm going to continue to attempt this, as I feel like I may have made a mistake somewhere in my logic. Assistance would be appreciated.

• Did you miss the "area or perimeter" bit? Jun 25, 2019 at 15:30
• I most certainly did. I feel rather foolish now. I'll take another look. Jun 25, 2019 at 16:22
• I think most of your logic is still correct, since odd numbers must correspond to areas. Jun 25, 2019 at 23:25