A solution to a similar-looking paradox is that there are an infinite number of balls in the urn and an infinite number of balls not in the urn.

Here's our small modification: we have a countably infinite number of balls labeled with the natural numbers. At each step, we take one ball, put it in the urn, and take the next ball, and set it aside -- this seems to be the same as putting it in the urn and taking it out.

So how many balls are in the urn? Clearly after n steps we have put n balls in the urn (by induction), so as n->infinity there are a countably infinite number of balls in the urn. And how many did we take out (i.e., are not in the urn)? At each step we set aside one ball, so at infinity we have set aside a countably infinite number of balls.

This may seem contradictory, but ask yourself how many odd numbers there are -- of course countably infinitely many. These correspond exactly to the balls in the urn. And the even numbers -- also countably infinite -- correspond to the balls we took out of the urn (set aside).

So why does it matter which ball we take out at step n? The reason is that infinite algorithms (also called supertasks) don't behave like finite algorithms, so sometimes we get seemingly contradictory or unintuitive results.