Assume there are $n$ coins in a circle. They show Heads with probability $1/2$ and Tails with probability $1/2$.

--Iterative step---

One of the coins that shows Heads is randomly chosen and this coin and its two neighbors (the coin on the right and the one on the left from it) are flipped again. The probability of showing Heads for any coin from now on is $p$.

This procedure repeats.

We need to find the function of the expected number of iterations to get all Tails in the circle.

Can you help me with this? Is there any elegant way to proceed?

• "One of the coins that shows Heads"-- is this chosen at random? Mar 29, 2016 at 22:22
• After the iterative step your event is ill defined. Probability of what showing heads is now p? All 3? Mar 29, 2016 at 22:23
• @CommonerG: yes, at random. I editied the question.
– Vika
Mar 29, 2016 at 22:28
• @kodlu: all three, and this will be the probability from that step and all subsequent steps. I edited the question.
– Vika
Mar 29, 2016 at 22:29
• Does the first flip (when the probabilities are 1/2) count as an iteration? Mar 29, 2016 at 22:33

Conditional on not having all tails in the first place, the number of iterations is geometrically distributed with success probability $(1-p)^3$. You need an average of $\frac{1}{(1-p)^3}$ iterations. The probability of not having all tails in the first place is $\frac{7}{8}$ so the average number of iterations you need is $\frac{7}{8(1-p)^3}$.
When $p=\frac{1}{2}$, you need an average of 7 iterations.