16
$\begingroup$

You are given a 15x15 grid and asked to cover it with rectangles whose dimensions are a power of 2. For example you can use rectangles 8x1 and 4x4, but not 2x3. The rectangles must cover every cell of the grid, cannot overlap or be outside the grid. What is the least number of rectangles needed to achieve this covering? Good luck!

This puzzle came from Mathematics Stack Exchange. Note this link contains the answer.

$\endgroup$
3
  • $\begingroup$ Can we use a 1*1 rectangle ? After all, 2^0=1. $\endgroup$ Commented Jun 20, 2023 at 11:50
  • $\begingroup$ yes you can use 1x1 $\endgroup$ Commented Jun 20, 2023 at 22:54
  • 2
    $\begingroup$ If you don't use the 1x1 then you can't cover an odd number of squares. So you have to $\endgroup$
    – Florian F
    Commented Feb 17 at 12:35

4 Answers 4

14
$\begingroup$

I can cover it with

13 pieces

which can be done like this:

AAAABBC11111111
AAAABBC11111111
AAAABBC11111111
AAAABBC11111111
AAAABBC22222222
AAAABBC22222222
AAAABBC33333333
AAAABBC.XYYZZZZ
77777777XYYZZZZ
88888888XYYZZZZ
88888888XYYZZZZ
99999999XYYZZZZ
99999999XYYZZZZ
99999999XYYZZZZ
99999999XYYZZZZ

basically forming four 7x8 rectangles and a monomino at the center, and dividing each of 7x8 into 1x8, 2x8, and 4x8 strips.

enter image description here

$\endgroup$
5
  • $\begingroup$ Nice! I like it. $\endgroup$
    – Graylocke
    Commented Feb 5, 2021 at 5:51
  • 1
    $\begingroup$ Cool! I wonder if there's a nice way to prove this optimal... I can get a lower bound of 12 but don't quite see a nice way to show there's a 13th piece. $\endgroup$
    – Deusovi
    Commented Feb 5, 2021 at 5:52
  • $\begingroup$ You got it! Well done. I thought it would take longer to find this, but you proved me wrong. The puzzle came from Mathematics StackExchange, which contains some interesting generalizations: math.stackexchange.com/questions/3173523/… $\endgroup$ Commented Feb 5, 2021 at 5:53
  • 4
    $\begingroup$ I ran a complete search, it can't be done with 12. Method: Find all sums of relevant areas that give 225, use that list to set the maximum number of rectangles of each area, simple backtracking placement of up to 12 rectangles. 16 hours 45 minutes, 16.7 billion rectangles placed. $\endgroup$ Commented Feb 9, 2021 at 11:37
  • 2
    $\begingroup$ @theonetruepath I found a proof that 13 rectangles are required by hand. $\endgroup$
    – mathlander
    Commented Feb 16 at 0:17
19
+50
$\begingroup$

Here is a proof of the lower bound of 13:

enter image description here

There are thirteen more red cells than blue cells (69 red and 56 blue), but each rectangle with sides that are powers of two can contain at most one more red cell than blue cell. Therefore, it would take 13 rectangles to tile the whole grid.

Why it works (and how I found it):

First, I started with a simple 1x15 array of numbers: enter image description here. This array sums to 4. Every rectangle of numbers with power-of-2 sides sums to at most 1, and negative sums arise with a rectangle consisting of a single negative cell or a rectangle with two cells containing the -2.

I then multiplied the array by itself, creating this array: enter image description here.

This new array sums to 16, and the only problematic rectangles with a sum of more than 1 are those created by multiplying a negative-summing rectangle with the square containing -2.

To fix the two-cell rectangles, I reduced the 4 in the middle to a 2. The sum became 14. All the multi-cell rectangles containing the center have a non-positive sum.

I then colored the squares like a checkerboard with white corners, reduced all the white squares by 1, and increased all the black squares by 1. This dealt with all the problematic single-cell rectangles while not affecting the sums of the rectangles with an even number of cells. The sum of the whole array became 13.

Once this array contained only 1s, 0s, and -1s, I removed the numbers and added colors.

Because all the multi-cell rectangles containing the center have a nonpositive sum, the only way to cover the center in a 13-rectangle tiling is with a 1x1 square.

$\endgroup$
8
  • 2
    $\begingroup$ Nice. It may be easier to read if you also attach a coloured image like in the accepted answer. $\endgroup$ Commented Feb 16 at 4:04
  • 2
    $\begingroup$ Nice! To really complete the proof, one should also proof your property about every rectangle. $\endgroup$ Commented Feb 16 at 6:54
  • 2
    $\begingroup$ @KrisVanBael Completed. $\endgroup$
    – mathlander
    Commented Feb 17 at 0:50
  • 1
    $\begingroup$ Let me also give credit where it is due: I got this idea from the following answer. puzzling.stackexchange.com/questions/90269/… $\endgroup$
    – mathlander
    Commented Feb 20 at 22:20
  • 1
    $\begingroup$ Related: puzzling.stackexchange.com/questions/120034/… $\endgroup$
    – RobPratt
    Commented Feb 23 at 17:09
11
+100
$\begingroup$

Another proof for the lower bound:

1. There is at least one rectangle that doesn't touch the boundary.

Proof: Colour the central 3x3 (note: 7x7 or 11x11 also work) square with a checker board pattern and observe that any rectangle touching the boundary (of the full 15x15 square) will cover the same number (possibly zero) of black and white squares.

2. There are at least 12 rectangles touching the boundary.

Proof: Any rectangle can cover 0,1,2,4 or 8 squares of any side of the 15x15 square. Therefore each side is touched by at least 4 distinct rectangles. The only rectangles touching more than one side are in the four corners and each of those touches exactly two sides. Therefore to cover the boundary at least 4x4-4 = 12 rectangles are required.

$\endgroup$
3
  • $\begingroup$ This is a great proof! It mixes my coloring idea with a geometric argument to create a really short and elegant proof. (The inner rectangle must be the center cell, by the way.) $\endgroup$
    – mathlander
    Commented Feb 17 at 18:00
  • $\begingroup$ @mathlander Thanks! I came up with it partly because I don't understand what makes your proof tick -- the colouring pattern and the number 13 seem to come just out of the blue -- which is cool in its own way. $\endgroup$
    – loopy walt
    Commented Feb 18 at 8:20
  • 1
    $\begingroup$ This is also an elegant proof! Nice work, loopy $\endgroup$
    – justhalf
    Commented Feb 21 at 23:48
4
$\begingroup$

Well... Just using my knowledge of binary... I think the answer is:

16

Because:

Wouldn't 15 be only able to be made up of 8 + 4 + 2 + 1?
And to fit these in, this needs to be in both directions... which makes kind of tartan layers.

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ This is a great start. It is possible to use fewer rectangles though. $\endgroup$ Commented Feb 5, 2021 at 5:40
  • 3
    $\begingroup$ Intriguing... There is a smaller total that uses a more efficient packing of the area than the most efficient packing of the side lengths..? $\endgroup$
    – Graylocke
    Commented Feb 5, 2021 at 5:43
  • 12
    $\begingroup$ That is correct. This is why I thought this would make a nice puzzle. $\endgroup$ Commented Feb 5, 2021 at 5:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.