Maths Olympiad Prep

Track / Stage 2 / 176 of 240 #416 of 2444

Problem 416

Combinatorics Difficulty 2.7 Multiple choice CEMC Pascal · Canada · 2026

The diagram consists of thirty-four 1×11\times 1 squares. Using only the grid
lines to form squares, how many squares of all sizes are in the
diagram?

Pick one

Next problem →

Official solution

We can systematically count the number of squares by considering
the possible sizes of the squares.

Case 1: Squares of size 1×11\times1.

There are 34 such squares.

Case 2: Squares of size 2×22\times2.

Begin with a 2×22\times2 square in
the top left corner of the diagram. Shifting this 2×22\times2 square one column to the right
gives a second 2×22\times2 square.
Shifting this second 2×22\times2
square one column to the right again gives a third 2×22\times2 square. Thus, there are 33 such 2×22\times2 squares within the top two rows
of the diagram.

Each of these 33 squares can be
shifted down one row to give 33 more
2×22\times2 squares, each contained
within the second and third rows of the diagram. Continuing in this way,
there are 33 such 2×22\times2 squares within rows three and
four, rows four and five, rows five and six, and rows six and seven.
Thus, there are 3×6=183\times6=18 such
2×22\times2 squares.

The first and the last of these 1818
squares are shown in the following diagram.

[[IMAGE0]]

There are 44 additional 2×22\times2 squares. One of these occupies
the leftmost two squares within rows five and six. This square can be
shifted down one row, and each of these 2×22\times2 squares can be shifted four
columns to the right. The first and the last of these 4 squares are
shown in the following diagram.

[[IMAGE1]]

In total, there are 18+4=2218+4=22
squares of size 2×22\times2.

Case 3: Squares of size 3×33\times3.

Beginning with a 3×33\times3 square
in the top left corner of the diagram and counting in a similar way,
there are 22 such 3×33\times3 squares within the top three
rows of the diagram.

There are 22 such 3×33\times3 squares within rows two through
four, rows three through five, rows four through six, and finally rows
five through seven. Thus, there are 2×5=102\times5=10 such 3×33\times3 squares. The first and the last
of these 1010 squares are shown in
the following diagram.

[[IMAGE2]]

There are 22 additional 3×33\times3 squares. One of these occupies
the leftmost three squares within rows five through seven. The second of
these occupies the rightmost three squares within rows five through
seven.

These 22 squares are shown in the
following diagram.

[[IMAGE3]]

In total, there are 10+2=1210+2=12
squares of size 3×33\times3.

Case 4: Squares of size 4×44\times4.

There is a 4×44\times4 square that
occupies all four columns within rows one through four. This square can
be shifted downward one row to occupy rows two through five, shifted
downward one row again to occupy rows three through six, and finally one
more time to occupy rows four through seven. These are the only 4×44\times4 squares and thus there are 44 in total. The first and the last of
these 44 squares are shown in the
following diagram.

[[IMAGE4]]

There are no squares with dimensions greater than 4×44\times4, and so there are 34+22+12+4=7234+22+12+4=72 squares of all sizes in the
diagram.

Source: CEMC, University of Waterloo, licensed CC-BY-NC-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.