Subjects combinatorics

Red Before Blue 61B90D

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **Problem statement:** We have a bag with 5 blue marbles, 3 red marbles, and 5 white marbles. We pick marbles one by one without replacement. We want to find the number of ways such that all red marbles come before any blue marble. 2. **Understanding the problem:** The marbles of the same color are identical, so permutations within the same color do not count as different ways. 3. **Key insight:** The condition "all red marbles come before any blue marbles" means in the sequence of picked marbles, no blue marble appears before a red marble. White marbles can appear anywhere. 4. **Total marbles:** There are $5 + 3 + 5 = 13$ marbles. 5. **Approach:** We want to count the number of distinct sequences of 13 marbles with 3 red (R), 5 blue (B), and 5 white (W) marbles, where all R appear before any B. 6. **Step 1:** First, consider the positions of red and blue marbles. Since all red must come before blue, the 3 red marbles must appear in the sequence before the first blue marble. 7. **Step 2:** We can think of the sequence as three blocks: red marbles block, blue marbles block, and white marbles interspersed anywhere. 8. **Step 3:** Since white marbles can be anywhere, we need to arrange 3 red marbles, 5 blue marbles, and 5 white marbles such that all red marbles come before blue marbles. 9. **Step 4:** Let's first arrange the red and blue marbles with the restriction. The red marbles must come before blue marbles, so the red marbles occupy some positions before blue marbles. 10. **Step 5:** Now, the white marbles can be placed anywhere among these 3 red and 5 blue marbles. 11. **Step 6:** The problem reduces to counting the number of ways to interleave 5 white marbles with the block of 3 red marbles followed by 5 blue marbles. 12. **Step 7:** The sequence looks like: (R R R) then (B B B B B), and we insert 5 white marbles anywhere in this sequence. 13. **Step 8:** The total number of positions to place white marbles is the number of "gaps" between and around the red and blue marbles. There are $3 + 5 + 1 = 9$ gaps (before the first red, between reds, between red and blue, between blues, and after the last blue). 14. **Step 9:** We distribute 5 identical white marbles into these 9 gaps. The number of ways to do this is given by the stars and bars theorem: $$\binom{5 + 9 - 1}{9 - 1} = \binom{13}{8}$$ 15. **Step 10:** Calculate the binomial coefficient: $$\binom{13}{8} = \binom{13}{5} = \frac{13 \times 12 \times 11 \times 10 \times 9}{5 \times 4 \times 3 \times 2 \times 1} = 1287$$ 16. **Final answer:** There are $1287$ ways to pick the marbles so that all red marbles come before any blue marble.