How many different squares have their vertices at some of the points
(
x
,
y
)
with integers
x
and
y
if
0
<
x
<
9
and
0
<
y
<
9
?
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.
To paraphrase Marta Reese's solution, consider squares of side lengths 1 , 2 , 3 , 4 , 5 , 6 , 7 . Then for these size squares, parallel to the axes, there are 7 2 , 6 2 , 5 2 , 4 2 , 3 2 , 2 2 , 1 2 such squares having vertices in the 8 × 8 dot array. Now, but for a square of size 1 , there is only 1 possible square that can be formed by the 4 points along its perimeter. For a square of side 2 , there's 2 possible using the 8 points along its perimeter, one of them at an angle like a diamond. For a square of side 3 , there are 3 possible using the 1 2 points along its perimeter. Etc. So, for the total number of squares, we have
7 2 ⋅ 1 + 6 2 ⋅ 2 + 5 2 ⋅ 3 + 4 2 ⋅ 4 + 3 2 ⋅ 5 + 2 2 ⋅ 6 + 1 2 ⋅ 7 = 3 3 6
Ah yes, your neat bijection for squares on a grid .
Position (x, y) in the bottom left corner and call this (0,0). From this point there are 7 possible squares. Move to (0, 1). There are now 6 possible squares. Move to (0,2), (0,3), (0,4), (0,5), and (0,6) to find 5, 4, 3, 2, and 1 possible squares. Now move to (1,0). There are now 6 possible squares. Move to (1,1), (1,2), (1,3), (1,4), (1,5), (1,6) to find 5, 4, 3, 2, 1 possible squares. Move to (2,0), (3,0), (4,0), (5,0), and (6,0), repeating the exercise. Thus, the total so far is 7 + 6 + 5 + 4 + 3 + 2 + 1 + 6 + 5 + 4 + 3 + 2 + 1 + 5 + 4 + 3 + 2 + 1 + 4 + 3 + 2 + 1 + 3 + 2 + 1 + 2 + 1 + 1 = 84.
Since we started at (0,0), we missed all of the possible squares expanding from the other 3 corners. So multiply 84 by 4 to get 336 possible squares.
Problem Loading...
Note Loading...
Set Loading...
To count the squares, let's first divide them into groups so that within each of the groups all the squares can be generated from one another by sliding them up and down and/or left and right. In the listing below, each group is identified only by the square closest to the lower left corner of the grid, point (1, 1), and each square is described only by the coordinates the two of its vertices closest to the lower left corner. For each group so identified, the number of the squares in that group is then listed.
(2, 1), (1, 1), 49 ... (2, 1), (1, 2), 36 ... (2, 1),(1, 3), 25 ... (2, 1), (1, 4), 16 ... (2, 1), (1, 5), 9... (2, 1), (1, 6), 4 ... (2, 1), (1, 7), 1
(3, 1), (1, 1), 36 ... (3, 1), (1, 2), 25 ... (3, 1), (1, 3), 16 ...(3, 1), (1, 4), 9 ... (3, 1), (1, 5), 4 ... (3, 1), (1, 5), 1
(4, 1), (1, 1), 25 ... (4, 1), (1, 2), 16 ... (4, 1), (1, 3),9 ... (4, 1), (1, 4), 4 ... (4, 1), (1, 5), 1
(5, 1), (1, 1), 16 ... (5, 1), (1, 2), 9 ... (5, 1), (1, 3), 4 ... (5, 1), (1, 4), 1
(6, 1), (1, 1), 9 ... (6, 1), (1, 2), 4 ... (6, 1), (1, 3), 1
(7, 1), (1, 1), 4 ... (7, 1), (1, 2), 1
(8, 1), (1, 1), 1
Adding them all together can be done by using formulas for the sum of squares, but it's not a real saving in this case.