Make It Count!

The diagram below shows a grid, based on a 20 × 20 20\times 20 square; in two opposite corners of the square, smaller squares of 7 × 7 7\times 7 have been removed.

How many rectangles can you find in this grid?


Inspiration .


The answer is 18179.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

First we count the rectangles for a complete 20 × 20 20\times 20 grid. Then we subtract those rectangles which intersect the cut-out square on in one corner; and the same for the other corner. Finally, we add in all rectangles which intersect both squares, because we subtracted them twice.

A rectangle is the intersection of a horizontal strip and a vertical strip. In each case, we can count the possible horizontal strips and vertical strips separate, and multiply.

For the full 20 × 20 20\times 20 grid, there are

  • 20 possible ways to choose a horizontal strip of height 1,

  • 19 possible ways to choose a horizontal strip of height 2,

  • and so on, to 1 possible way to choose a horizontal strip of height 20.

That gives 1 + 2 + + 20 = 210 1 + 2 + \cdots + 20 = 210 horizontal strips, and likewise 210 vertical strips, for a total of N 1 = 21 0 2 = 44100 rectangles in the large square . N_1 = 210^2 = 44100\ \ \text{rectangles in the large square}.

We pick one corner square and ask how many rectangles intersect it. There are

  • 7 horizontal strips of height 1 that intersect it,

  • 7 horizontal strips of height 2 that intersect it,

  • etc. to 7 possible strips of height 14 that intersect it,

  • 6 possible strips of height 15 the intersect it,

  • 5 possible strips of height 16 that intersect it, etc.

That gives 7 + 7 + + 7 + 6 + 5 + 4 + 3 + 2 + 1 = 20 7 ( 1 + 2 + 3 + 4 + 5 + 6 ) = 140 21 = 119 7 + 7 + \cdots + 7 + 6 + 5 + 4 + 3 + 2 + 1 = 20\cdot 7 - (1 + 2 + 3 + 4 + 5 + 6) = 140 - 21 = 119 horizontal strips that intersect the chosen corner square, and we find the same count for vertical strips. Thus there are N 2 = 11 9 2 = 14161 rectangles intersecting a specific corner square . N_2 = 119^2 = 14161\ \ \text{rectangles intersecting a specific corner square}.

How many rectangles intersect both corner squares? There are

  • 1 horizontal strip of height 8 that intersect both,

  • 2 horizontal strips of height 9,

  • etc. to 7 horizontal strips of height 14,

  • 6 horizontal strips of height 15,

  • 5 horizontal strips of height 16, etc.

Since 1 + 2 + + 6 + 7 + 6 + + 2 + 1 = 49 1 + 2 + \cdots + 6 + 7 + 6 + \cdots + 2 + 1 = 49 , this makes for N 3 = 4 9 2 = 2401 rectangles intersecting both corner squares . N_3 = 49^2 = 2401\ \ \text{rectangles intersecting both corner squares}.

To finish up, the number of rectangles in the grid is N 1 2 N 2 + N 3 = 44100 2 14161 + 2401 = 18 179 . N_1 - 2N_2 + N_3 = 44100 - 2\cdot 14161 + 2401 = \boxed{18\:179}.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...