1

My first thoughts was that this had something to do with infinite geometric series, but upon closer inspection I saw that this isn't a geometric series. I then tried to factor it into $$2\left(\frac23+\frac29+\frac2{27}+\dots\right)+2\left(\frac29+\frac2{27}+\frac2{81}+\dots\right)+2\left(\frac2{27}+\frac2{81}+\frac2{243}+\dots\right)+\dots$$But since this is infinite too, I am not sure how to proceed.

*this is not the original question, I was just able to deduce it to this. Let me know if there's an easier was to solve this:

You have been placed in the center of a maze. Each room is a shape and paths are lines. Every move, you randomly pick a path, leading you to a different room, independent of any previous moves. Once you reach a star room, you win. What is the expected number of moves you will make before winning?

enter image description here

Anne Bauval
  • 34,650
  • 1
    Welcome to MathSE. This MathJax tutorial explains how to typeset mathematics on this site. – N. F. Taussig Apr 19 '23 at 14:20
  • How did you transform the series in your title into the series in your body? The latter is easier to calculate:$$\frac43\left(\sum_{n\ge0}3^{-n}\right)^2=\frac43\left(\frac32\right)^2=3.$$ – Anne Bauval Apr 19 '23 at 14:46
  • 1
    @AnneBauval The transformation isn't too difficult. Take the original series, and subtract $\displaystyle2\cdot \frac23 + 2\cdot \frac23\cdot \frac13 + 2\cdot \frac23\cdot\frac13\cdot \frac13 + \cdots$ termwise. See what you're left with. Rinse and repeat. – Arthur Apr 20 '23 at 10:50
  • @Arthur Oh I see, thank you! $$(1-x)\sum_{n=1}^\infty nx^{n-1}=\sum_{n=0}^\infty x^n$$indeed! I forgot that trick (less known than the one of differentiating the geometric series). – Anne Bauval Apr 20 '23 at 11:46

2 Answers2

4

Symmetry helps to solve the underlying puzzle (I think this is easier and less error prone than using the series).

There are only three states: $S_0$ means you are in the center, $S_1$ means you are in a square, $S_2$ means you are done (you have reached the star).

Let $E=E_0$ be the expected number of moves it takes given that you are in $S_0$ (so this is the answer you want).

Let $E_1$ be the expected number of moves it takes given that you are in a square.

Clearly $E_0=E_1+1$.

We also have $$E_1=\frac 23\times 1+\frac 13\times (E_0+1)=1+\frac 13\times E_0\implies E_0=3$$

and we are done.

As a minor variant, consider the first two moves. Either we are done (probability $\frac 23$) or we are back in the center (probability $\frac 13$). Thus $$E=\frac 23\times 2+\frac 13\times (E+2)\implies E=3$$

Note, the series you wrote in the title is $$\sum_{n=1}^{\infty}\frac {4n}{3^n}$$ which you can compute by differentiating $\frac 1{1-x}=\sum x^n$ and adjusting the terms a little (there are other ways to compute it, of course). I note that this also gives the value $3$ in the end.

lulu
  • 70,402
1

To take you down the road you have already started, note that in the expression $$ 2\cdot\left(\frac23+\frac29+\frac2{27} + \cdots\right)+2\cdot\left(\frac29+\frac2{27}+\frac2{81} + \cdots\right)+2\cdot\left(\frac2{27}+\frac2{81} + \frac2{243} +\cdots\right)+\cdots $$ each of the brackets is a geometric series. And also, going from bracket to bracket, each is a third of the one before, so the whole sum is also a geometric series. Use what you know about geometric series to find the sum in the first bracket. Then use that each bracket is a third of the one before, and use what you know about geometric series to find the whole sum.

Arthur
  • 199,419