How to calculate the number of rectangles in a chess board using permutation and combination ?
why do you need permutations or combinations for that? :O :O !!
not the number of squares..... the number of rectangles in it
oh oh oh sorry.. my bad :)
do u know how to do it ?
Squares would be a slightly easier problem, but it's the same basic concept.
m thinking wait.!
so when you say rectangles would you include squares too!?
of course....
seems quite overwhelming .. i got no clue how to start :-/
oh.... :(
maybe if we started with something smaller.. and pick up some knack.. what about counting the same for a 3 x 3 mini chess board (9 squares) ?
Sounds like a good way to get your head around it. You'd have the 1X1, the 1X2 (make sure you double the number that fit to account for the same pattern rotated by 90 degrees), the 1X3 (same thing as 1X2), the 2X2, the one 3X3, and the 2X3 (same as all others which are not square, you have to double the number)
hmm... yes.... 1 box = 1 sq and 1 rect 4 boxes = 5 sq and 9 rect..... getting any idea ?
1 box = 1 rect (including square :P ) 4 box = 9 rect (including 5 squares)
@Mashy yes.... getting any idea ?
trying doing the Numb3r1's method.. that coudl be the actual way of doing it.. using perms and combos!
@Numb3r1 i'm not getting you clearly.....
is the answer 28^2 ?
sorry 36^2 ??
Actually, I'm seeing a pattern here. Each mxn box, with n>m, can fit in 2(9-n)^2 times (unless m=n, then it's only (9-n)^2 times
Mashy, if you were thinking C(n) (count the unique boxes which can be found in an nxn chessboard) is given by T(n) (triangular number n)squared, let's look at 3x3. I count 9 1x1+12 2x1 + 6 3x1 + 4 2x2 + 4 2x3 + 1 3x3 box(es)=36=T(3) squared! Looks like you got it!
I'm checking 4x4, just to be sure.
16 1x1 24 2x1 16 3x1 8 4x1 9 2x2 12 2x3 6 2x4 4 3x3 4 3x4 1 4x4 Adds up to 100! That's it!
yes you are right.... its 6^2 for 9 boxes and 10^2 for 4 boxes
@Mashy yes i think the answer is 36^2..... i'm getting it
That's just 1296.
so... if the board is in the order mxm then the number of rectangle in it is [m(m+1)/2] ^ 2
Final solution achieved!
yes..... thank you so much guys.... :)
thank you @Numb3r1 and @Mashy :)
i thought.. in order to get a rectangle.. you need to chose any two points in x axes and any 2 points in y axis.. each ordered pair of 2 points on x and y axes constitute a rectangle. so .. how many ways can you chose 2 points from 9 points ? ( 8 squares 9 points).. that is 9C2.. so total ways is 9C2 times 9C2
@Mashy thats a cool one.... i mean the actual answer in terms of permutation and combination..... thank you so much....
your welcome :) :)!
Join our real-time social learning platform and learn together with your friends!