Suppose that we have two towers of equal height $N$, each tower consisting of $N$ coins piled on top of each other. Now suppose we have a machine or whatever that takes a coin from one of the towers and move it to the other one. That is, a coin can be moved from tower $A$ to tower $B$ with $50\%$ probability or from $B$ to $A$ with $50\%$ probability.
The question is: How many such moves on average will it take before the height of either tower $A$ or tower $B$ i zero?
It can be transformed into an equivalent problem, where a machine prints $0$ or $1$ with equal probability and we want to find the average length of the sequence before there are $N$ more $0$'s than $1$'s or the other way around.
I think I have solved it, though I'm not sure my though process is correct.
The solution is:
Let $f(n)$ be the average number of steps, where $n$ is the height of the towers. Now, suppose we double the height of each tower and we want to find $f(2n)$.
By definition, the average number of steps required before either tower $A$ or $B$ have height $n$ is $f(n)$. From here, there is an equal probability that we either go back to the starting position or that the tower becomes empty.
So: $$f(2n) = f(n) + 0.5[f(n) + f(2n)] + 0.5f(n)$$
Solving for $f(2n)$ we get:
$$f(2n) = 4f(n)$$
Hence, $f(n)$ must take the form $f(n)=cn^2$, where $c$ is a constant.
Since $f(1) = 1 \Rightarrow c=1$, the solution is: $f(n) = n^2$.