Mathematics (JEE)Very hardCodeforces Div2 D
In how many ways can 9 distinct balls be placed into 4 distinct boxes so that no box is empty?
- A. 7770
- B. 186480
- C. 183412
- D. 262144
Correct answer: B. 186480
Inclusion-exclusion over empty boxes gives sum (-1)^j C(4,j)(4-j)^9 = 186480, which is 4! times S(9,4) = 7770.
Practise more Permutations, Combinations and Probability questionsPermutations, Combinations and Probability: notes and key points
More Permutations, Combinations and Probability questions
- How many functions from a 6-element set to a 3-element set take exactly two distinct values?
- In how many ways can 12 distinct books be placed on 3 distinct shelves so that no shelf holds more than 6 books?
- In how many ways can 10 identical candies be given to 4 distinct children so that every child gets at least 2 candies?
- In how many ways can 8 identical balls be placed into 5 distinct boxes so that no box contains exactly one ball? (Boxes may be empty.)
- What is C(3000, 1500) mod 1009, where 1009 is prime?
- What is the exponent of 5 in the prime factorisation of C(1000, 500)?