662 views
1 votes
1 votes
Number of ways to distribute 6 distinct balls into 3 distinct boxes,such that each box contains at least 1 ball?

3 Answers

3 votes
3 votes

This problem can be solved by counting the number of ONTO functions from A->B
where |A|=6, and |B|=3

# ONTO Functions = Total functions - {Not Onto Functions}
=$3^6 - (3C1*2^6 - 3C2*1^6 + 3C3*0^6)$
= 729 - (192 - 3 + 0)
= 729 - 189 = 540

edited by
1 votes
1 votes

6 distinct balls , 3 distinct boxes     // condition : each box must be non-empty

part 1) total ways to distribute 6 distinct balls to 3 distinct boxes , when there is no condition

every ball has 3 homes and there are 6 such balls so it's 3*3*3*3*3*3=36

Out of these 36 ways we have to subtract ways when there is exactly one box is empty ans when there is exactly 2 boxes are empty.

Part 2 ) case 1 : # ways when exactly 2 boxes are empty :  select 2 boxes out of 3 (3C2)and then put 6 balls in one box(16)

total = 3C2*16=3 ways

Part 2 ) case 2 : # ways when exactly 1 box is empty :-select one box out of 3 (3C1 ways) put 6 balls into 2 boxes such that no box remain empty (let consider this x)


now we have to find 'x' , follow same step total ways - when exactly one empty = 26-(2C1)*16=62 ways

put the value of x so # ways when exactly 1 box is empty =(3C1)*62=186


so total ways when no box would be left empty = (part 1)- (part 2 case 1)-(part 2 case 2)

36-3-186=729-189=540 ways

Related questions

0 votes
0 votes
1 answer
1
Swarnava Bose asked Jun 3, 2023
400 views
Consider the set of 4 -digit positive integers. How many of them have their digits in :-a) strictly decreasing order ?b) non decreasing order ?c) non increasing order ?...
1 votes
1 votes
1 answer
2
Acejoy asked Oct 25, 2021
443 views
Suppose there are 4 cricket matches to be played in 3 grounds. The number of ways the matches can be assigned to the grounds so that each ground gets at least one match i...
0 votes
0 votes
1 answer
3
Prakhar Garg asked Apr 9, 2019
931 views
How many 5 letter word possible having atleast 2 a's ?
0 votes
0 votes
0 answers
4