Puzzle

You’re a musician working on your next hit album, which will include $13$ songs. Every day, you sit down to write a song. The probability that you’ll succeed is $p = 0.1$. If you succeed, you get “in the zone” — and the probability of you writing a song the next day becomes $q = 0.3$. If you succeed the next day, you stay in the zone. Otherwise, your probability returns to $p = 0.1$.

On average, how many days will it take you to finish your album?

Solution

Before we get into it, congratulations to the $20.3\%$ of you who got the correct answer. We saw many interesting approaches, and chose to spotlight winner Ervin Varga who pursued a unique backwards recursion.

mic + music notes.png

Last month’s puzzle asked you to consider the plight of the songsmith — thirteen songs to finish the album, while trying to stay in the zone and avoid a cold spell.

In our featured solution, the big insight is that every songwriting session (the number of days spent writing a given song) after the first one is identical — they start out in “the zone” and risk becoming ordinary songwriting sessions.

This gives us $12$ songwriting sessions that start out in “the zone”, along with the very first one which starts cold.

Expected waiting time

If our songwriter starts in the zone, they have probability $q$ to write a song on day one.

If they don’t write a song that day, then they’ll leave the zone and have probability $p$ per day to write one until they succeed. The probability to end up out of the zone is $(1-q)$ and the expected amount of time to write a song in this state is $1$ day for the one wasted in “the zone”, plus $1/p$ days on average to write one cold for a total of $(1 + 1/p)$ expected days.

So, they have probability $q$ to write the song in $1$ day and probability $p$ to write it in ${(1+1/p)}$ days, and the expected time to write a song, starting from “the zone” is

$$ \begin{align*}T_z &= q+(1-q)(1+1/p) \\ &= 1 + \frac{1-q}{p}.\end{align*} $$

Thinking about writing the whole album, each songwriting process after the first one starts out in “the zone.” So, if we call the time to write a song starting cold $T_c$, the total expected time to write the album is

$$ \begin{align*}T &= T_c + 12T_z \\ &= \frac1p + 12\left(1+\frac{1-q}{p}\right) \\ &= \frac{13}{p} + 12\left(1-\frac{q}{p}\right). \end{align*} $$

Inspecting the result, it agrees with intuition. Without a “zone”, writing the album would take $13/p$ days. Comparing this to our solution that takes the zone into account,