Posts

Showing posts with the label concept-class

practice problems

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 ...

practice problems

1. 5 chairs, 4 people? How many ways can they sit? 5C4*4! = 120 2. 10 mangoes, 12 apples, 16 guava, 15 bananas. How many ways to eat 3 fruits? Case 1: Every single fruit is distinct. We have 53 fruits in total. So 53C3. That is if the order of eating doesn't matter. If the order of eating matters, then: 53.52.51 Case 2: Fruits of one type are all same.  Case 2.1 - Order of eating doesn't matter. Then this is simply stars and bars. (n+k-1)C(n) where 'n' is the number of items and 'k' is the number of buckets. Here,  n = 3 k = 4 So: All 3 fruits are same: 4C1 = 4 2 Same 1 distinct: 4C2 * 2C1 = 12 All 3 distinct: 4C3 = 4 Total: 20 Case 2.2 - Order of eating does matter. 4 * 4 * 4 = 64 Case 3: One fruit of each type, i.e. I eat 1 mango, 1 apple, 1 banana for e.g. Case 3.1 Fruits of same type are also distinct We have to consider 4 different cases(4C3): Mango, banana, apple = 10*15*12 Mango, banana, guava = 10*15*16 Mango, apple, guava = 10 * 12 * 16 Apple, banana, g...