What is the maximum total possible number of rectangles in the picture?

Your objective for this puzzle is to find the maximum total number of rectangles in the pictured four overlapping squares. I believe it may be more than 36.

• Do squares count as rectangles? Feb 7, 2019 at 1:35
• How exactly does this differ from the second part of Four squares into many squares? Feb 7, 2019 at 7:24
• @YoutRied yes! A square is a rectangle. :) A rectangle is a parallelogram whose sides intersect at 90° angles. Now, since a rectangle is a parallelogram, its opposite sides must be congruent. A square is also a parallelogram whose sides intersect at 90° angles. Therefore, like a rectangle its opposite sides are congruent. This means that a square is a specialized case of the rectangle and is indeed a rectangle. Feb 9, 2019 at 0:42

Assuming squares are rectangles then I believe there are

23

rectangles. My proof is shown pictorially below.

• Can't confirm but will accept because it might be right and well-constructed answer. Feb 11, 2019 at 23:00

As others have confirmed, I believe the answer is

23

However, I wanted to give a different way of indexing them to show that we've caught them all.

General assumption:

1. All squares overall with all other squares with exactly 2 intersections
2. The intersections are of two adjacent sides
3. Each intersection involves exactly 2 squares (which you can infer from the previous two)

These are the types of rectangles that exist:

• 4: All sides belong to a single square.
• 22: Two sides belong to one square, two sides belong to another. (It will always be adjacent sides).
• (31: Three sides belong to one square and one to another. This cannot happen.)
• 211: Two sides belonging to one square (again adjacent sides), one to a second, and one to a third.
• 1111: All four sides belonging to different squares.

Now, by symmetry, all of these possibilities exist for all possible combinations of squares.

For one square, only one rectangle exists (a type 4).

For two squares, there are 2 type 4s, and 1 type 22, for a total of 3.

For three squares, there are 3 type 4s, 3 type 22s (combination 3,2), and 3 type 211s (combination 3,1) = 9.

And drum roll, the moment of truth:

For four squares there are:

• 4: 4 (combination 4,1)
• 22: 6 (combination 4,2)
• 211: 12 (combination 4,2,1,1)
• 1111: 1 (combination 4,4)
• Total: 23

Doing this with 5 yields 50, but suspiciously, 1,3,9,23,50 is not in OEIS. So either I will have to add it, or I've made a mistake somewhere...

• Good job . You are really fast
– user56760
Feb 13, 2019 at 18:38
• ^1 for your good explanation
– user56760
Feb 13, 2019 at 18:39
• +2 for your good explanation Feb 14, 2019 at 0:05

I like

23

too.

Count by grouping the rectangles by their top left corner: