Cutting a square into seven rectangles

Cosmo has cut a square into seven rectangles, so that the seven lengths $\ell_1,\ldots,\ell_7$ and the seven widths $w_1,\ldots,w_7$ of these rectangles satisfy $$\{\ell_1,\ldots,\ell_7\}\cup\{w_1,\ldots,w_7\} ~=~ \{1,2,3,4,\ldots,14\}.$$

Question: What are the possible side lengths of this square?

• I thought I would make a related puzzle: Tile an odd rectangle with odd rectangles, with no repeated side lengths. Apparently there's some obscure thing stopping me... computer search keeps going for ever with no solutions. Probably related to each side needing at least three rectangle edges due to the all odd requirement. I'm tiling with rectangles having edges from 1 to 63 which allows up to 16 rectangles. It's possible you just need more. Apr 25 '18 at 9:22

From the deleted answer from frodoswalker we know the possible ranges of the squares:

Our maximum area is $1*2+3*4+5*6+7*8+9*10+11*12+13*14=504$, which means the maximum square width is $\lfloor \sqrt{504} \rfloor = 22$

Our minimum area is $1*14+2*13+3*12+4*11+5*10+6*9+7*8=280$, which means the minimum square width is $\lceil \sqrt{280} \rceil = 17$

The biggest size available to our rectangles is $14$. Therefore we know that each side of the square consists of at least $2$ rectangles. Let's look at some possible configurations. The key aspect here is, that each dimension (width or height) of each rectangle must be different.

2 rectangles per side

It is easy to see, that using this configuration there is no solution. We would need to fill the remaining rectangle area in the middle with the remaining 3 rectangles. This is not possible without at least 2 of them having the same width or height.

3 sides with 2 rectangles, 1 side with 4 rectangles

Above we see some of the possible configurations with 4 rectangles at the top. It's easy to see, that we can't fill the remaining area with the remaining rectangle.

The same applies if we try to put 5 rectangles on 1 side of the square.

2 sides with 2 rectangles, 2 sides with 3 rectangles

Above there is a configuration with 3 rectangles at top/bottom and another one with 3 rectangles at top/right. With 1 rectangle remaining we can't fill the remaining area.

3 sides with 2 rectangles, 1 side with 3 rectangles

Above we see 2 different configurations which allow us to find correct solutions. Other configurations can be reached by rotation or mirroring and will be ignored here.

We can define the following equations for both images:

$x0 + x1 + x2 = x3 + x4 = x5 + x6 = x7 + y8$

For the left variant only:

$x2 = x9 + x4$
$x10 = x1 +x9$
$x3 = x0 + x10$
$x5 = x11 + x12$
$x11 = x7 + x13$
$x8 = x6 + x12 + x13$

And for the right variant:

$x1 = x9 + x10$
$x4 = x2 + x10$
$x3 = x0 + x9$
$x5 = x11 + x12$
$x7 = x11 + x13$
$x6 + x12 = x8 + x13$

Feeding them into a computer returns several solutions for squares with size 18 to 22. There is an answer from f'' for the 22 square. Here are 18 to 21:

Apparently there is no solution for a square with size 17.

Here is an example to show that it is possible with a side length of 22.

I don't think it can be done. To tile a rectangle with smaller rectangles such that no two rectangles have a common side length in the simplest way (apart from the trivial case of a single rectangle) requires 5 rectangles: 1 in each corner, surrounding a 5th one.

Other configurations can be made by replacing one of the rectangles with 5 in a similar way. Thus you could have 1, 5, 9,... (potentially) but not 7.

This turns out is not true. I was uncertain, but thanks to @f'' for the counter-example

Here are all the possible solutions, just for completeness. No distinct set of rectangles has more than one solution.

Method: Used my program to tile squares of each possible size using the complete set of 91 possible rectangles, but disallowing repeated side lengths, and discarding solutions with less than 7 rectangles. About 15 minutes run time. Program also discards rotations and reflections.

$18\times 18$: $3$ solutions

$19\times 19$: $12$ solutions

$20\times 20$: $2$ solutions

$21\times 21$: $5$ solutions

$22\times 22$: $2$ solutions