Problem #5
A bug walks randomly along the edges of a square. At each step of the
walk it proceeds to one of the adjacent vertices with a probability
of 1/2. On average, how many steps will it take for the bug to visit all
of the vertices of the square?
What if the square is replaced by a regular n-gon?