You are given a 100 by 201 Rectangular Chess Board. How many Squares of all sizes can you count?
Can you generalize for a by board ?
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.
Consider a n by m board where m = n + r .
The number of 1 by 1 squares is n ∗ m .
The number of 2 by 2 squares is ( n − 1 ) ∗ ( m − 1 )
The number of 3 by 3 squares is ( n − 2 ) ∗ ( m − 2 ) and so on.
Thus the number of squares is the summation of n ∗ ( n + r ) that is summation of n 2 + n r where n has value from 1 to n .
Summation of n 2 = 6 n ( n + 1 ) ( 2 n + 1 )
Summation of r n = 2 r n ( n + 1 )
The equation simplifies to 6 n ( n + 1 ) ( 2 n + 1 + 3 r )
Substitute n = 1 0 0 and r = 1 0 1 , The number of squares is 8 4 8 4 0 0