Category Archives: drawing

counting squares contd.

As a continuation of the previous post on counting squares, here is an update. Only two of my friends commented about their solutions to this simple problem and here are two approaches.

lets assume a board where n = 6. drawing a line would make the board look like this.

+----+----+----+----+----+----+
| \\ |    |    |    |    |    |
+----+----+----+----+----+----+
|    | \\ |    |    |    |    |
+----+----+----+----+----+----+
|    |    | \\ |    |    |    |
+----+----+----+----+----+----+
|    |    |    | \\ |    |    |
+----+----+----+----+----+----+
|    |    |    |    | \\ |    |
+----+----+----+----+----+----+
|    |    |    |    |    | \\ |
+----+----+----+----+----+----+

what i think is the the “indian” geeky way of looking at it is to eliminate the  other half and visualize the same board as

+----+
| \\ | number of squares = 1
+----+----+
|    | \\ | number of squares = 2
+----+----+----+
|    |    | \\ | number of squares = 3
+----+----+----+----+
|    |    |    | \\ | number of squares = 4
+----+----+----+----+----+
|    |    |    |    | \\ | number of squares = 5
+----+----+----+----+----+----+
|    |    |    |    |    | \\ | number of squares = 6
+----+----+----+----+----+----+

and so people arrive with the standard n(n+1)/2 which people remember, thanks to the caning by their high school math teacher for not remembering the sum of natural numbers series upto n :)

but there is a simple way of looking at it
1. the number of squares slashed by the diagonal is n.
2. total number of squares = n^2
3. so remaining squares = (n^2) – n which is equally divided between the two halves
4. so total squares not slashed = [(n^2) – n] / 2 = M
5. so if you want to include the number of squares slashed by the diagonal as
well, then its M + n

I took the first way to get the equation, but that is probably the harder way to do math. a thoughtful layman would come up with the second method first time and is backed by observation.

cheers
shyam

counting squares

while in the midst of trying to solve a problem, a question just struck to me. suppose if there is a chess board of n checks [the normal chess board has 8×8 so n=8], and you draw a diagonal across the entire board from one edge to the other edge, what is the equation that can give us the number of squares in the chess board on one side of the diagonal. squares include those across which the diagonal has been drawn. for instance if a diagonal is drawn across a board with n=4, then the number is 10.

i spent a couple of minutes of thought on how to fit an equation into this but i thought i should have got it faster. there is one approach i followed.. let me know what approach you guys follow!

cheers

shyam