# Probability of a run of *n* or more of some color from a subset of colors drawing without replacement?

I recently asked the question "Probability of a run of k or more of a subset of categories in m multinoulli trials?" with a very nice answer from member Tad.

I'm trying to extend a result from a prior question "Probability of drawing a run of a specific color from an urn with two colors of balls?" to the same subset of categories/colors as the above, that is, from a Multinoulli draw to a Hypergeometic draw, i.e., given an urn with N balls of k differing colors, where $(C_1,C_2...,,C_k)$ are the frequencies for each color, and drawing balls until the urn is exhausted, what is the probability of seeing a run of n or more of the same color, where the color is one of some subset of all colors (or equivalently the number of possible permutations of draws that meet the run criteria).

Concretely, say the urn has 10 black, 20 red, 30 blue balls. I draw the balls one at a time without replacement. What is the probability of seeing a run of 3 or more black, or 3 or more blue, in sequence?

I came across the beautifully presented and answered question "How many permutations of a multiset have a run of length k?" when searching, which has a nice result for runs of any of the colors.

Question: can the latter be extended to limit counts to some subset of the available colors? I've been pondering it for a few days, and I'm at an impasse (though to be honest my combinatorics is very rusty).

• @CameronWilliams: Done. Mea culpa.. Aug 4 '15 at 22:42

If I'm following Andrew Wood's solution that you linked to, you can handle different run bounds by using $q_{r_i,n_i}(t)$ in place of $q_{r,n_i}(t)$. For this problem you want to set some of the $r_i$'s equal to infinity. No problem - $q_{r,n}(t)$ for "$r=\infty$" is obtained by setting $x^r=0$; that is, $$\sum_{n=0}^\infty q_{\infty,n}(t) x^n = \exp(tx).$$ Thus it appears $q_{\infty,n}(t) = t^n/n!$.