Skip to main content
3 of 3
added 893 characters in body

Help solving a recurrence relation

For solving a related probability problem, I need to solve the following recurrence relation:-

$q(r,b,L)=\frac{b}{r+b}q(r,b-1,L)+\sum_{k=1}^{L}\frac{r}{r+b}\times\cdots \times \frac{r-(k-1)}{r+b-(k-1)}\times\frac{b}{r+b-k}q(r-k,b-1,L)$

where $r, b$ and $L$ are positive integers with the following conditions: $q(r,b,L) = 1$ whenever $r \leq L$ and $q(r,0,L) = 0$.

How do I solve this recurrence relation?

Added: The motivation behind this recursion is this problem:- Suppose there's an urn containing $r$ red balls and $b$ blue balls. At each trial, I'm drawing a ball at random from the urn, without replacement. Let $R$ denote the event of drawing a red ball, and let $B$ denote the event of drawing a blue ball. I'm conducting $r+b$ trials of this experiment. I'm interested in finding the distribution of the longest run of red (and blue) balls, and thus its expected value.

The first $L+1$ picks of a ball from the urn are considered with a condition on the first pick resulting in a blue ball. Also, under the condition that the first $k$ picks result in a red ball and the $(k+1)^{th}$ pick in a blue ball (with $0≤k≤L$), the probability of no run of length $L+1$ is $q(r−k,b−1,L)$. Then, the law of conditional probability is applied to get to get the recursion for $q(r,b,L)$.