Concept: Distributing Distinct Objects with Constraints
We need to distribute 5 distinct balls (each of a different color) among 3 persons such that each person gets at least one ball. This is a problem of surjective functions (onto functions) from a set of 5 elements to a set of 3 elements, where no person is left empty-handed.
Step 1: Understand the Total Unrestricted Ways
If there were no restrictions, each of the 5 distinct balls can be given to any of the 3 persons. So, for each ball, there are 3 choices.
Total ways without restrictions:
Step 2: Subtract the Invalid Cases
But we must exclude cases where at least one person gets no ball. We use the principle of inclusion-exclusion.
Let:
- be the set of distributions where Person 1 gets no ball.
- be the set where Person 2 gets no ball.
- be the set where Person 3 gets no ball.
We want the number of distributions where none of A, B, or C occurs, i.e.,
Step 3: Apply Inclusion-Exclusion Principle
By inclusion-exclusion:
Calculate each term:
- (balls go only to Persons 2 and 3)
- Similarly, ,
- (all balls go to Person 3 only)
- Similarly, ,
- (no person gets any ball, impossible for 5 balls)
So,
Step 4: Compute Valid Distributions
Valid distributions where each person gets at least one ball:
Final Answer
The total number of ways is .
Related Topics
- Principle of Inclusion-Exclusion: A counting technique to calculate the number of elements in the union of multiple sets by considering their intersections.
- Surjective (Onto) Functions: Functions where every element of the codomain is mapped to by at least one element of the domain.
- Stirling Numbers of the Second Kind: The number of ways to partition a set of n objects into k non-empty subsets. Here, it is S(5,3)=25, but then we assign subsets to 3 distinct persons (3! ways), so 25 × 6 = 150, which matches.
Formulae and Theory
Number of onto functions from a set of m elements to a set of n elements (m ≥ n):
For m=5, n=3: