Friday, 12 June 2015

mathematics - Total no of squares on a Chess Board


Is there any formula than calculates the total number of squares on chessboard?


For example in a 8×8 chessboard, there are squares of sizes 1×1, 2×2, , 8×8.


So I want to know their total number. Is there a general formula for a n×n chessboard?



Answer



There are




12+22+32+42+52+62+72+82=204 squares on an 8×8 board.
In the general case, the number of squares is 12++n2 for an n×n board,
or equivalently,   nk=1 k2.

As @M Oehm noted, a Faulhaber formula lets us simplify this to   n(n+1)(2n+1)6.



This is because ...



For 1×1 squares, there are obviously n2 of them.
You can fit (n1) rows of 2×2 squares in an n2 area, and each row has (n1) in it.
You can fit (n2) rows of 3×3 squares in an n2 area, and each row has (n2) in it.

...
You can fit 2 rows of (n1)×(n1) squares in an n2 area, and each row has 2 in it.
And finally, of course, you can fit 1 (n×n) square in an n2 area.

This expands to
n2+(n1)2++22+12=  nk=1 k2=  n(n+1)(2n+1)6.



No comments:

Post a Comment

Understanding Stagnation point in pitot fluid

What is stagnation point in fluid mechanics. At the open end of the pitot tube the velocity of the fluid becomes zero.But that should result...