[Math] Expected number of bridges

probabilitystatistics

There are 10 islands in a row. Each island is linked to the successive one by 2 bridges. One of these two is the correct bridge i.e. it will take you to the other side. The other is a bad bridge i.e. if you take that one you will be taken back to the first island and will have to start over again. The probability of any of the two connecting bridges being good or bad is 0.5.What is the expected number of bridges that you need to cross before reaching the last island ?
Also once you have crossed a bridge you remember it to be good or bad so that you are not crossing the bad bridges more than once.
Any help is appreciated. Thank you.

Best Answer

We solve the problem on the understanding that we remember bad bridges. It is not clear whether one is also expected to solve the amnesiac version.

For $i=1$ to $9$, let $X_i=1$ if we take the wrong bridge in trying to get from island $i$ to island $i+1$. Let $X_i=0$ otherwise.

The "extra" cost of a mistake in trying to get from $i$ to $i+1$ is $iX_i$. This is because if $X_i=1$ then we have spent one bridge crossing on the bad bridge, and there are $i-1$ additional bridges we must cross.

The total number of bridges is therefore $9+\sum_{i=1}^9 iX_i$.

By the linearity of expectation, the expectation of this is $9+\sum_{i=1}^9 iE(X_i)$.

Each $X_i$ has expectation $\frac{1}{2}$. Thus our expectation is $9+\frac{1}{2}\frac{(9)(10)}{2}$.

Related Question