#### CSCI 6454 - Advanced Algorithms - Spring 2014

### Homework #2

#### Due: Feb 24th, 2014

1. Text Exercise 2.13(a)
2. Text Exercise 2.20

3. Text Exercise 2.21

4. Text Exercise 2.24

5. We said in class that the expected number of trials until a collision
is found when throwing balls into $N$ bins is $\sqrt{\pi N/2}$. I want
to know what the expectation is until the *second* collision. Do
this empirically: write a program that throws balls into 1000 bins at
random and records the number of throws when the first collision occurs,
and the second. Do this 1000 times and give the averages. The first
collision should agree with the formula above. What is the constant $c$ you
get for the second collision where the expectation is $c\sqrt{N}$?