Popular Posts

Friday, June 24, 2011

Combinations problem

Q : There are 10 friends planning for a movie.There is no guarantee that all people will go for movie.Either one can go or two or.....ten. How many ways they can go?

Ans: It is simple combinations problem.
10C0 + 10C1 +10C2+......_10C9+10C10 = 2powerN - 1;

OR  we can solve in different way.
Assume all people are like bits.Either one can go or cannot go.
each has two possibilities.For all 10 people it is 2powerN.But it includes the case of no one is going.
Final value is 2powerN - 1

Number of rectangles in NxN matrix is Nc2*Nc2(Square is also a rectangle)
Number of squears in NxN matrix is n*(n+1)*(2n+1)/6;
Refer :http://www.teachingideas.co.uk/maths/chess.htm

For N grid chess board,it will have N+1 rows and N+1 columns.Then answer will become (N+1c2) * (N+1c2)

No comments:

Post a Comment