This question arose while playing a board game that uses cards. Imagine we have 11 cards total. 3 are red (R), 1 is blue (B), and 7 are yellow (Y). How many ways can we randomly order the 11 cards so that B comes before all 3 R?

Intuitively, I know the 1 B card will come before all 3 R cards 25% of the time, and this helps me check my answer. I thought my method was correct, but my count is clearly too high because it gives a ~27% probability.

I'm interested in a concise way to solve this. I've posted my work below to show an honest attempt, but it has two shortcomings: it's wrong, and it seems overly complicated. After reading this answer I think there might be a way to consolidate my terms using a summation (after all, I am partitioning the event space $A$), but I couldn't figure out how to do that.

My solution:

The length of the sample space is $$|S|=\frac{11!}{(3!)(7!)}=1,320$$ because there are 11 cards total, but the 3 reds aren't distinct, and the 7 yellows aren't distinct.

I conceptualized the event $A$ as the subspace of $S$ where the blue/red cards are ordered B R R R (if we temporarily ignore the yellows). There's only 1 distinct way to produce that arrangement. So, I tried to find $|A|$ by figuring out how many ways to arrange the 7 Y into _B_R_R_R_ where each of the 7 yellows can go into any of the underscores _.

We can take the 7 yellows and split them into a single group containing 7. We could put that single group (7Y) into 5 spots (the first _, the second _, etc.). Or we could break our 7Y into 2 groups (6Y & 1Y). The number of distinct, ordered ways to arrange those 2 groups in our 5 _ spots is $P_{5, 2}$. Or we could break our 7Y into three groups (5Y, 1Y, 1Y). Those 3 groups can be arranged distinctly across the 5 _ spots in $P_{5,3}$ $/$ $2!$ ways.

I did this for all possible disjoint groupings and got the results below. For each grouping, I've counted the number of distinct ways those groups can be placed in the 5 _ spots.

  • break 7Y into 1 group:
    • 7Y ($P_{5, 1}$)
  • break 7Y into 2 groups:
    • 6Y, 1Y ($P_{5, 2}$)
    • 5Y, 2Y ($P_{5, 2}$)
    • 4Y, 3Y ($P_{5, 2}$)
  • break 7Y into 3 groups
    • 5Y, 1Y, 1Y ($P_{5, 3}$ $/$ $2!$)
    • 4Y, 2Y, 1Y ($P_{5, 3}$)
    • 3Y, 3Y, 1Y ($P_{5, 3}$)
    • 3Y, 2Y, 2Y ($P_{5, 3}$ $/$ $2!$)
  • break 7Y into 4 groups
    • 4Y, 1Y, 1Y, 1Y ($P_{5, 4}$ $/$ $3!$)
    • 3Y, 2Y, 1Y, 1Y ($P_{5, 4}$ $/$ $2!$)
    • 2Y, 2Y, 2Y, 1Y ($P_{5, 4}$ $/$ $3!$)
  • break 7Y into 5 groups
    • 3Y, 1Y, 1Y, 1Y, 1Y ($P_{5, 5}$ $/$ $4!$)
    • 2Y, 2Y, 1Y, 1Y, 1Y ($P_{5, 5}$ $/$ $2!3!$)

When I sum all of the parentheses, I get $$P_{5,1} + 3P_{5,2} + 2P_{5,3} + \frac{2P_{5,3}}{2!} + \frac{2P_{5,4}}{3!} + \frac{P_{5,4}}{2!} + \frac{P_{5,5}}{4!} + \frac{P_{5,5}}{2!3!} = 360$$

But I'm over-counting by 30. The correct answer should be $0.25*1,320 = 330$.

  • $\begingroup$ It just occurred to me that there might be an easier way to count if we treat the 3 R's as distinct (R1, R2, R3), and treat the 7 Y's as distinct (Y1, Y2...). I'm probably using 11!/(3!7!) because that's the method I just learned in my stats class. If you see a simpler solution that treats the problem differently ("how many distinct arrangements are there if the R's and Y's are distinct"), that'd be great too, and I should be able to adapt it to the way I've thought about it. $\endgroup$
    – jdcrossval
    Sep 2, 2021 at 14:21

1 Answer 1


The error in your solution is that you are missing a factor of $1/2!$ in your term for (3Y, 3Y, 1Y).

This is generally a type of "stars and bars" combinatorics question. As you considered, we essentially have 5 "bins" formed by the 4 B and R cards, and want to put the 7 Y cards into these spaces.


By arguments you can follow in the linked page, we arrive at their Theorem 2. The total number of possible arrangements is

$$ {n+k-1}\choose{k-1} $$

Where there are $n = 7$ yellow cards to be placed into the $k = 5$ bins. This gives $330$, matching your work.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.