Five balls are to be places in three boxes. Each can hold all the five balls. In how many different ways can we place the balls so that no box remains empty, if balls and boxes are all different?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
Why are you adding the 3 at the end? Shouldn't we be subtracting it because 2 boxes are left empty? I put the answer as 144 because of that...
Log in to reply
That is so because this case has been subtracted twice when we considered the ways in which 1 box is empty. Hence we need to compensate.
In terms of sets:
∣ A ∪ B ∣ = ∣ A ∣ + ∣ B ∣ − ∣ ( A ∩ B ) ∣
Notice that we subtract ( A ∩ B ) and not add it. Hope it helps...
Log in to reply
I understand now! Thanks!
please explain another way. I don't understand this way.
In other words, we have to divide 5 distinct balls to 3 distinct boxes such that no box is remained empty. Possible configuration for boxes are: permutations of (2,2,1) and (3,1,1) .
So, total number of ways of doing (2,2,1) divisions is (5!/2! 2! 1!)/2!. Now, this is to be arranged in 3 boxes, so total number of ways 15 * 3! = 90
Similarly, total number of ways of doing (3,1,1) divisions is (5!/3! 1! 1!)/2!. Now, this is to be arranged in 3 boxes, so total number of ways 10 * 3! = 60
So, by Fundamental principle of counting, total number of ways = 90+60 = 150
We want to compute the number of surjections (since no box ought to remain empty) from the set [ [ 1 , 5 ] ] of numbered balls to the set [ [ 1 , 3 ] ] of numbered boxes.
And it is well known that the number of surjections from [ [ 1 , n ] ] to [ [ 1 , m ] ] (with n ≥ m ) is
cardinal of [ [ 1 , m ] ] [ [ 1 , n ] ] m n − ( cardinal of i = 1 ⋃ m E i , where E i is the set of functions of [ [ 1 , m ] ] [ [ 1 , n ] ] that don’t take the value i k = 1 ∑ m ( − 1 ) k − 1 ( k m ) ( m − k ) n )
Hence the wanted number is :
3 5 − 3 × 2 5 + 3 × 1 = 1 5 0
Problem Loading...
Note Loading...
Set Loading...
Total ways of placing 5 balls in 3 boxes = 3 5
Total ways in which 1 box is empty = 3 × 2 5
Total ways in which 2 boxes are empty = 3
Using principle of inclusion and exclusion:
Total ways of placing balls so that no box remains empty = 3 5 − 3 × 2 5 + 3 = 1 5 0