I'm having trouble deriving the return time for a Markov chain. The graph has $n$ vertices and is connected by $n - 1$ edges. So we can draw this as a horizontal line of nodes with node $1$ all the way to the left and node $n$ all the way to the right. At each intermediate node $i$ there is a $1/2$ probability that it moves to node $i - 1$ and a $1/2$ probability it moves to $i + 1$ and at node $1$ and $n$ there is a probability of $1$ that it moves to node $2$ and $n-1$ respectively.
I have to derive an equation for the expected return time that I return to node $1$ starting from node $1$.
I'm just having trouble starting so any hints toward the right direction will be very helpful.
Thanks!