$f(0) = $ | $7,$ |
$f(n) = $ | $2 \cdot f(n - 1) + 1\; \ \text{for all}$ $\text{integers}\ n \geq 1.$ |
$\mathbf{Algorithm}\ \Fib(n)\mathrm{:}$
$\mathbf{if}\ n = 0\ \mathrm{or}\ n = 1$
$\mathbf{then}\ f = n$
$\mathbf{else}\ f = \Fib(n - 1) + \Fib(n - 2)$
$\mathbf{endif};$
$\mathbf{return}\ f$
Let $X$ be the number of students who give their gift to themselves. What is the expected value
$\mathbb{E}(X)$ of the random variable $X$?
Hint: Use an indicator random variable for each student.
For each $i = 1,2,\dots,n$, let $v_i$ be the value (in dollars) of the gift that student $S_i$ buys. Let $Y$ be the value of the gift that student $S_1$ receives, and let $Z$ be the value of the gift that student $S_2$ receives. What is $\mathbb{E}(2 \cdot Y - Z)$?
$//$ | $\text{all coin flips made}$ $\text{are mutually independent}$ |