# Is this correct solution to arranging consecutive flowers?

Suppose I have 8 indistinguishable white flowers and 2 indistinguishable red flowers. Out of all the distinguishable arrangements, what's probability of selecting an arrangement with at least 6 consecutive white flowers.

We have $$\frac{10!}{8!2!} = 45$$ arrangements. If I treat a block of 6 white flowers as one object, then we have 6w,w,w,r,r. This gives $$\frac{5!}{2!2!} = 30$$, but we shouldn't over count when the other white flowers are adjacent to the block of 6w. This means we must remove all the 7 white arrangements, so 7w,w,r,r gives $$\frac{4!}{2!} = 12$$, but we over count the 8 blocks of white flowers. Hence, $$\frac{3!}{2!} = 3$$, so $$12 - 3 = 9$$, and $$30 - 9 = 21$$. So, the probabilty is: $$\frac{21}{45} = \frac{7}{15}$$.

I have two questions, did I get it right? And, is there a better way to do this if I did?

• That numbed seems very high. Imagine the $8$ white ones in a row, with gaps. Each red can go in any gap, independently, with equal probability. There are nine gaps and, even for one red, more than half break the desired streak.
– lulu
Commented Jun 21 at 16:35

I would count arrangements with at least six consecutive white flowers by conditioning on the longest white block:

Case 1: Longest White block is $$8$$ (denoted $$W^8$$). There are three ways this could happen: $$RRW^8$$, $$RW^8R$$, and $$W^8RR$$.

Case 2: Longest White block is $$7$$. There are six ways this could happen: $$RWRW^7$$, $$WRRW^7$$, $$WRW^7R$$ and reversals of these.

Case 3: Longest White block is $$6$$. There are nine ways this could happen: three ways where everything else is to the left of $$W^6$$; three ways where everything else is to the right of $$W^6$$; and three ways where there is stuff on both sides of $$W^6$$).

This all gives a total of $$18$$ arrangements of interest. So the corresponding probability of such an arrangement is $$\frac{18}{45}=\frac{2}{5}$$.

• So, my mistake was that I was still over counting. For 8W it's $3$ which makes 7W have $\frac{4!}{2!} - 2(3) = 6$, and for 6W we have $\frac{5!}{2!2!} - 2(6) - 3(3) = 9$. I.e., it each step I have to increase how many copies of the previous ones I remove. Commented Jun 21 at 23:19
• BTW, $\frac{18}{45} = \frac{2}{5}$. Commented Jun 21 at 23:29
• Between two red flowers, there are three spaces (including ends) which can be viewed as bins where clumps of white flowers can be inserted, $$\;\square R \square R \square$$

• First insert the two "extra" $$(>6)$$ white flowers using stars and bars in $$\binom{2+3-1}{3-1} = 6$$ ways

• The "mandatory" clump of $$6$$ white flowers can go to any of the $$3$$ bins, giving favorable ways of $$6\cdot3 = 18$$ against total ways $$\binom{10}2 =45$$

• Thus $$Pr = \frac{18}{45} = \frac25$$

$$\mathtt{To\; generalise}$$

Let $$r$$ = number of red flowers
$$w=$$ "mandatory" clump of whites ($$=6$$ here)
$$x, = "extra" whites available ($$=2$$ here), then

$$Pr = \dfrac{(r+1)\times\dbinom{x+r}{r}}{\dbinom{x+w+r}{r}}$$