1
$\begingroup$

I am studying bins and balls experiment from Introduction to Algorithms by CLRS. We are finding the expected number of tosses for every bin to contain at least one ball. I do not understand this equation.

  • 1
    Set $$b-i+1=k$$2017-02-05
  • 0
    write down sum explicitly, turn around the summation order, write as indexed sum again2017-02-05

1 Answers 1

2

You are simply reversing the summation: $$\begin{align} & \sum_{i=1}^{b}\frac{b}{b-i+1} \\= & b \sum_{i=1}^{b}\frac{1}{b-i+1} \\= & b \left( \frac1{b}+\frac1{b-1}+\cdots+\frac12+\frac11\right) \\ = & b \left( \frac1{1}+\frac1{2}+\cdots+\frac1{b-1}+\frac1b\right) \\ = & b \sum_{i=1}^{b}\frac{1}{i} \end{align}$$