We may also consider it as a prisoners' problem. Prisoners are randomly called into the room to move one card. He can only see the top cards. Once all cards are ordered correctly on the left stack, they will be released. Furthermore, we may assume each prizoner is called only once. (Suppose there are enough prizoners, thousands.)
Assuming the final order is smallest on top.www.ddhw.com
1. When there are no empty stacks: If the middle card is the biggest, move the second biggest card to the middle stack. Otherwise move middle to cover the smaller card.
2. When the left stack is empty and middle is not: If middle is bigger than right or right is empty, move the middle card to right. Otherwise move middle to left. www.ddhw.com
3. When the middle stack is empty and right is not: If right is smaller than left or left is empty, move right to left. Otherwise move right to middle.
4. When the right stack is empty and left is not: If left is bigger than middle or middle is empty, move left to middle. Otherwise move left to right. www.ddhw.com
The basic idea is to set the middle stack to the correct order. When done, dump it to the right stack in reversed order, and then dump it back to left in the correct order. If failed in any step, start the next round with the middle stack again. In each round, the "orderliness" is better than the previous round. So in finite steps we will achieve total orderliness.
It is a very slow process, taking O(N^2) steps or more. www.ddhw.com
I never formally proved that the approach always works, although I think it can be proved by induction. I tried to find a simple proof such as assigning an orderliness value to each state, but was not successful. (I did simulate it in my computer for a few thousand times with 100 cards, and that should be good enough ) So anybody is still welcomed to prove it or to provide another method.www.ddhw.com