practice problems pending
Q1.
In a group of 20 students:
5 are Yellow House
7 are Red House
4 are Blue House
4 are Green House
How many ways can you choose:
(i) 12 kids, such that exactly 3 kids from each house are present.
(ii) 10 kids, such that at least 2 kids from each house are present.
(iii) 15 kids, such that at least 3 kids from each house are present.
S1.
Attempt 1:
(i) 5C3 * 7C3 * 4C3 * 4C3
(ii) 5C2 * 7C2 * 4C2 * 4C2 * 12C2
(iii) 5C3 * 7C3 * 4C3 * 4C3 * 8C3
In the above attempt, (i) is correct.
But (ii) and (iii) are overcounting.
Why?
In (ii), Let's say we pick A,B from yellow house and the during 12C2 pick C from yellow house.
We also have counted the case where we first pick A,C from yellow and then pick B during 12C2.
So this is wrong. Same for (iii).
Another thought: to use stars and bars where houses are buckets and students are objects.
But for stars and bars, the objects have to be same to each other. Here they are distinct.
But stars and bars can tell us how many ways are there to group them.
Y + R + B + G = 10
Each of them is minium 2.
So
y + r + b + g = 2
n = 2, k = 4
(2 + 4 - 1) C(4 -1) = 5C3 = 10
So there are 10 distinct ways to pick kids from houses.
Essentially there are 2 classes of solutions here.
2 extra kids go to the same house.
4Y 2R 2B 2G and 3 others = 18,900 ways
2 extra kids go to the different houses:
3 Y 3R 2B 2G and 5 others = 42,840 ways
Add them to get the answer = 61,740 ways
(iii)
15 kids, at least 3 from each house.
Using stars and bars n = 3, k = 4
(3 + 4 - 1)C(4 - 1) = 6C3 = 20 ways to create patterns which is too much.
So let's do the reverse. Choose which 5 kids will be left behind.
5 = n, k = 4
(5+4-1)C(4-1) = 8C3 = 56 ways
But this is even more?
Actually, do it manually. That's easier. We need to leave behind 5 kids.
Now,
Case 1:
Leave behind 4R, pick 1 from the rest: 7C4 * [5C1 + 4C1 + 4C1]
Case 2:
Leave 3R. 2 from the rest.
7C3 * [5C2(Y) + 5C1*4C1(YB) + 5C1*4C1(YG) + 4C1*4C1(BG)]
Case 3:
Leave 2R. 3 from the rest.
7C2 * [5C2*4C1(YB) + 5C2*4C1(YG) + 5C1*4C1*4C1(YBG)]
Case 4:
Leave 1R. 4 from the rest.
7C1 * [5C2*4C1*4C1]
Case 5:
Leave 0R. Not possible. Since other houses have only 4 kids left.
Can also be done using generating functions.
Comments
Post a Comment