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

Advertisements

3 Comments

  1. vivek
    Posted May 16, 2011 at 7:07 am | Permalink | Reply

    I would do it as n*(n+1)/2. Sum of n natural numbers;
    its like sum of (1,2,3,4) if n = 4

  2. Varun
    Posted May 16, 2011 at 7:24 am | Permalink | Reply

    sigma(n)

  3. ghanashyam
    Posted May 16, 2011 at 7:53 am | Permalink | Reply

    an update blog on the solution http://shyamiam.wordpress.com/2011/05/16/155/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: