We have a rectangle $ABCD$.
The walk starts at $A$. Let $X$ be the time required to visit all the vertexes. (We independently go to the adjacent vertex with probability 1/2).
Calculate $EX$.
Some of the calculation I made
$$E|X|=EX=\int_0^\infty P(X>t)dt=\int_0^\infty 1-P(X<=t)dt$$ but I have literally hardly any idea on how to calculate $P(X<=t)$. This excercise is ahead of my program at the uni yet, but I would like to know how to compute it.
The system can be in one of $5$ states. State $1:$ we have visited one vertex State $2:$ we have visited two adjacent vertices State $3:$ we have visited three vertices and we are at one of the vertices on the ends. State $4:$ we have visited three vertices and we are at the middle vertex State $5$: we have visited all vertices
Let $E(i)$ be the expected number of steps remaining to visit all vertices if we are presently in state $i,$ for $i=1,2,3,4,5.$ We start having visited one vertex, so we want to compute E(1). We have $$ \begin{align} E(1)&=1+E(2)\\ E(2)&=1+\frac12E(2)+\frac12E(3)\\ E(3)&=1+\frac12E(4)+\frac12E(5)\\ E(4)&=1+E(3)\\ E(5)&=0 \end{align}$$
Solve the system; $E(1)$ is the answer. If we don't say that vertex A has been visited at the start, but only count a transition to a vertex as a visit to that vertex, then the answer is $1+E(1).$