|
Puzzle #27: Number of Squares on a Chessboard
-
How many squares are there on a chessboard or checkerboard?? (the answer is not 64)
Can you extend your technique to calculate the number of rectangles on a chessboard.
This another puzzle that was also e-mailed to me through
this website. My instinct was that the answer was just a lot, but i thought about it and the solution is actually fairly simple...
The first thing is why the answer is not just 64...
All the red squares in the above picture would count as valid squares, so we are asking how many squares of any dimension from 1x1 to 8x8 there are on a chess board.
The key is to think how many positions there are that each size of square can be located...
A 2x2 square, for example, can be located in 7 loactions horizontally and 7 locations vertically. ie in 49 different positions.
Consider the table below...
| size |
horizontal positions |
vertical positions |
positons |
| 1x1 |
8 |
8 |
64 |
| 2x2 |
7 |
7 |
49 |
| 3x3 |
6 |
6 |
36 |
| 4x4 |
5 |
5 |
25 |
| 5x5 |
4 |
4 |
16 |
| 6x6 |
3 |
3 |
9 |
| 7x7 |
2 |
2 |
4 |
| 8x8 |
1 |
1 |
1 |
| |
|
total |
204 |
In total there are 204 positions. this is the sum of the number of possible positions for all the different sized squares.
Can you extend your technique to calculate the number of rectangles on a chessboard?
Below are some examples of possible rectangles...
All of the above examples would be vailid rectanges...
The key to this problem is to think of each rectangle individually and consider the number of positions it can be located. For example a 3x7 rectangle can be located in 6 positions horizontally and 2 vertically. From this we can build a matrix of all the possible rectangles and sum.
| dimesions |
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
|
| |
positions |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
|
| 1 |
8 |
64 |
56 |
48 |
40 |
32 |
24 |
16 |
8 |
|
| 2 |
7 |
56 |
49 |
42 |
35 |
28 |
21 |
14 |
7 |
|
| 3 |
6 |
48 |
42 |
36 |
30 |
24 |
18 |
12 |
6 |
|
| 4 |
5 |
40 |
35 |
30 |
25 |
20 |
15 |
10 |
5 |
|
| 5 |
4 |
32 |
28 |
24 |
20 |
16 |
12 |
8 |
4 |
|
| 6 |
3 |
24 |
21 |
18 |
15 |
12 |
9 |
6 |
3 |
|
| 7 |
2 |
16 |
14 |
12 |
10 |
8 |
6 |
4 |
2 |
|
| 8 |
1 |
8 |
7 |
6 |
5 |
4 |
3 |
2 |
1 |
|
| |
|
|
|
|
|
|
|
|
|
1296 |
In total then there are 1296 possible rectangles.
BACK
|