Combinatorics theory - Grouping of objects
How do we divide 7 distinct objects into groups of 3 and 4?
It's quite simple. We just need to select 3 objects from 7. So it's 7C3.
Which is same as 7!/(3!4!).
Ok, now how do we create groups of 3 and 3 from 6 objects?
Is it 6C3?
No, there is an issue here.
Let's say the objects are A,B,C,D,E,F.
When we do 6C3,
we will get (A,B,C), (D,E,F) as well as (D,E,F), (A,B,C).
Which are essentially the same groups.
So we will have to divide by 2!. 2 here is the number of groups of the same size.
So if we have to divide (m + n) objects into groups of m and then:
1. if m != n then (m+n)!/(m!n!)
2. if m = n then (2m)!/(m!m!2!)
-----------------------------------------------------------------
So far we have discussed formation of 2 groups.
Now let's discuss more than 2 groups.
------------------------------------------------------------------
Let's say we have to divide 9 objects into groups of 2,3,4.
Now first we choose 2 from 9 and then choose 3 from remaining 7.
So it becomes 9C2*7C3 = 9!/(2!7!) * 7!/(3!4!) = 9!/(2!3!4!)
And this can be generalized further.
If m objects have to be divided into p,q,r where each of p,q,r are distinct then there are
m!/(p!q!r!) ways to do so.
If any groups are same then we have to divide by the factorial of that number also.
Let's say we have to divide 17 objects into groups of 2,2,3,3,3,4, then there are:
17!/(2!2!2! 3!3!3! 4!) ways to do so.
---------------------------------------------------------
Example problems:
Q1: In how many ways can 2026 different objects be divided into 1013 equal groups?
Ans:
2026!/{(2! ^ 1013).1013!}
Q2: In how many ways can 9 different toys be distributed equally among 3 kids?
First wrong attempt:
9!(3! 3! 3! 3!)
Why is it wrong?
Because that's only the number of ways of dividing the objects into groups.
Additionally we need to multiply by 3! to account for number of ways of distributing them among 3 kids.
Q3: During election campaign, 3 districts are to be canvassed by 20,15,10 volunteers respectively. If 100 volunteers are available, in how many ways can this be done?
100C45 to select volunteers.
45!/(20! 15! 10!) for dividing into groups.
Now should we multiply by 3! like the last question for distributing the groups among districts?
No.
Why?
Because the question mentions 'respectively', which means that the first village will get 20 volunteer group, second will get 15 and third will get the 10 volunteer group. There is no other way.
Q4: In how many ways can 5 different balls be distributed among 3 different boxes so that no box is empty?
2 Ways to create groups and distribute:
1,1,3 => {5!/(1!1!2! 3!)}*3!
1,2,2 => {5!/(2!2!2! 1!)}*3!
Total: 150
One wrong way to do this:
First give one ball to each box: 5C3*3!
Then for each of the remaining 2 balls there are 3 ways to pick a box: So multiply by 9.
Finally: 5C3 * 3! * 3 * 3 = 540
Why is it wrong?
We are only interested in **how many** final distributions are there and not interested in **how** we arrive at the final distribution.
This wrong solution is actually counting **how** we arrive there.
For e.g. if we give Ball1 to Box1 initially and eventually Box1 has Ball1 and Ball2, it should be same as Ball2 in Box1 initially and Ball1 came later.
Q5- In how many ways can 17 people depart in 2 cars(capacity 4 pax) and 3 bikes(capacity 3 pax)?
(a) when internal arrangement in the vehicle is immaterial => people can sit in any way they like inside a car or bike and that order won't matter.
Step 1: Divide in groups: 17!/(4!4!2! 3!3!3!3!)
Step 2: Distribute 2 groups in cars and 3 in bikes: 2!3!
So finally: 17!2!3!/(4!4!2! 3!3!3!3!)
(b) when internal arrangement matters:
Multiply by: 4!4!3!3!3!
So you will get: 17!
Surprise! It's same as seating all of them in one single line!
Comments
Post a Comment