I have two balls: {A, B} and 3 slots.
- Each slot can contain one of the balls
- Balls can repeat, e.g. {A, A, B} is ok
- Order matters, e.g. {A, A, B} is not the same as {B, A, A}
I want to know the number of combinations that do not contain at least one A and one B.
So for the above case, the answer is 2: {A, A, A} and {B, B, B}.
I need this question answered in the general case: I have X distinct balls, and Y slot, for Y > X. Given the total number of combinations, how many combinations do not contain each of the X balls.
Thank you.