In how many different ways can 4 squares be chosen on a chessboard such that the 4 squares lie in a diagonal line?
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.
Nice.... (+1)
Log in to reply
I did it the same way :) , i wonder if we can generalize it for a m × n grid
Log in to reply
No.of ways to choose p ( p ≤ n ) squares along diagonals in a n × n grid would be:
2 ( 2 ( r = p ∑ n − 1 ( p r ) ) + ( p n ) ) = 4 ( p + 1 n ) + 2 ( p n ) = 2 ( ( p + 1 n + 1 ) + ( p + 1 n ) )
But I think m × n would require a little bit of more work!!
Nice solution @Vighnesh Shenoy , and nice problem @rohit udaiwal .
The identity you used is called the hockey stick identity . One of you should add this problem to that page as a "Try-It-Yourself" problem!
This will only give the number of ways of selecting 1 × 1 squares on the chess board right?
Assuming the question refers to 1×1 squares only on which we place the pieces
There are 15 diagonals in each direction, in a chess board.
Consider the 15 diagonals in one direction.
diagonal-1 consists of 1 square
diagonal-2 consists of 2 squares
...
diagonal-8 consists of 8 squares
diagonal-9 consists of 7 squares
diagonal-10 consists of 6 squares ... diagonal-15 consists of 1 square
Clearly, only diagonals 4,5,6,7,8,9,10,11,12 contains 4 or more squares
Number of ways we can select 4 squares from the diagonals in one direction
= 4C4 + 5C4 + 6C4 + 7C4 + 8C4 + 7C4 + 6C4 + 5C4 + 4C4
= 1 +5 + 15 + 35 + 70 + 35 + 15 + 5 + 1 = 182
Similarly, we can select 182 squares from the diagonals in the other direction.
Total number of ways = 182 + 182 = 364
I think "in a line" means (diagonally) adjacent squares, so I put the answer 50 first.
" on a line" would imply that they could be anywhere on that line, and then I get 364 as above.
I liked the problem, but I suggest a clarification about what is considered a "diagonal". I first thought you were referring to the main diagonals only.
What of the diagonals with gradient below or above 1? Does it not count?
Problem Loading...
Note Loading...
Set Loading...
Considering the diagonals in one direction the number of ways I can choose squares is,
2 ( r = 4 ∑ 7 ( 4 r ) ) + ( 4 8 )
If I want the total such ways we need to multiply this expression by two.
Thus the number of ways this is possible is, 2 ( 2 ( r = 4 ∑ 7 ( 4 r ) ) + ( 4 8 ) )
To evaluate the summation use he identity,
k = r ∑ n ( r k ) = ( r + 1 n + 1 )
The answer comes out to be 364.