# Problem of the Week #46 - February 11th, 2013

Status
Not open for further replies.

#### Chris L T521

##### Well-known member
Staff member
Thanks to those who participated in last week's POTW!! Here's this week's problem (going along with the probability theme for the Graduate POTW)!

-----

Problem: A rat is trapped in a maze. Initially it has to choose one of two directions. If it goes to the right, then it will wander around the maze for three minutes and will then return to it's initial position. If it goes to the left, then with probability $\frac{1}{3}$ it will depart the maze after two minutes of traveling, and with probability $\frac{2}{3}$ it will return to it's initial position after five minutes of traveling. Assuming that the rat is at all times equally likely to go to the left or to the right, what is the expected number of minutes that it will be trapped in the maze?

-----

#### Chris L T521

##### Well-known member
Staff member
No one got this week's question correct. You can find my solution below.

Let $T$ represent the total time in the maze. Let $X=\begin{cases} 0 & \text{if go to right with p=1/2.}\\1 & \text{if go to left with p=1/2.}\end{cases}$ Therefore,
\begin{aligned}E[T]&=\sum\limits_{x=0}^1E[T|X=x]\\ &=\frac{1}{2}(E[T]+3)+\frac{1}{2}E[T\mid X=1]\\ &= \frac{1}{2}(E[T]+3)+\frac{1}{2}\left(\frac{2}{3}(E[T]+5)+\frac{1}{3}(2)\right)\\ &=\frac{5}{6}E[T]+\frac{21}{6}\end{aligned}
Therefore, $E[T]=\frac{5}{6}E[T]+\frac{21}{6}\implies \frac{1}{6}E[T]=\frac{21}{6}\implies E[T]=21$. Thus, the expected number of minutes that the rat spends in the maze is 21 minutes.

Status
Not open for further replies.