Answer:
The expected number of minutes the rat will be trapped in the maze is 21 minutes.
Step-by-step explanation:
The rat has two directions to leave the maze.
The probability of selecting any of the two directions is, [tex]\frac{1}{2}[/tex].
If the rat selects the right direction, the rat will return to the starting point after 3 minutes.
If the rat selects the left direction then the rat will leave the maze with probability [tex]\frac{1}{3}[/tex] after 2 minutes. And with probability [tex]\frac{2}{3}[/tex] the rat will return to the starting point after 5 minutes of wandering.
Let X = number of minutes the rat will be trapped in the maze.
Compute the expected value of X as follows:
[tex]E(X)=[(3+E(X)\times\frac{1}{2} ]+[2\times\frac{1}{6} ]+[(5+E(X)\times\frac{2}{6} ]\\E(X)=\frac{3}{2} +\frac{E(X)}{2}+\frac{1}{3}+\frac{5}{3} +\frac{E(X)}{3} \\E(X)-\frac{E(X)}{2}-\frac{E(X)}{3}=\frac{3}{2} +\frac{1}{3}+\frac{5}{3} \\\frac{6E(X)-3E(X)-2E(X)}{6}=\frac{9+2+10}{6}\\\frac{E(X)}{6}=\frac{21}{6}\\E(X)=21[/tex]
Thus, the expected number of minutes the rat will be trapped in the maze is 21 minutes.