# Counting problem involving infinite

• dsfranca
In summary, the problem is that the function that describes what happens to a ball when it's put back into a box doesn't behave like you might expect it to.

#### dsfranca

I was confonoted with the following problem today, and thought it was interesting enough to discuss it here:

## Homework Statement

You have a box with balls numbered 1,2,3...n.
Suppose you began, by taking out balls numbered 1–100
and then put ball 1 back. Suppose you then removed balls 101–200
and put ball 2 back. Then you took balls 201–300 into your lap, found
ball 3, and put it back. And so forth. After doing this countably many
times, which balls are left in your lap?

## The Attempt at a Solution

I was tempted to affirm that, as there is a bijection between the number of balls that were put back to the box and the number of times you repeat this, f(n)=n, after n steps all balls would be inside the box . However, as there is also a function from N to the number of balls you have outside, namely f(x)=99x, I would conclude that you have the same number of balls inside and outside the box, in other words, the set of balls in the box and the one of balls outside it have the same cardinality.
Is this last conclusion correct?

I hope I was able to express myself clearly!
Thanks,
Daniel

However, as there is also a function from N to the number of balls you have outside, namely f(x)=99x

This is a function that says how many balls are out of the box on the nth step. But we're not worried about the nth step, we're worried about after you've done 'every' step. You can't plug infinity into f(x) there and get a reasonable answer.

3. The Attempt at a Solution
I was tempted to affirm that, as there is a bijection between the number of balls that were put back to the box and the number of times you repeat this, f(n)=n, after n steps all balls would be inside the box .

This is a better way to think about it. To put it even better: let's track what happens to the nth ball:

It's removed from the box in step [n/100]+1 ([n/100] is n/100 rounded down). Then on step n it's added back. Then it never leaves the box again. So every ball ends up in the box at the end

I understand what you mean. I think we can compare this situation with a limit, given an arbitrary n ball, we can find an even bigger n so that the ball will back in the box. But what really bothers me is the fact that this solution points to every ball being in the box, although the number of balls outside the box is also increasing when the number of steps is big. Although this can be just a counter-intuitive result, I am still not satisfied with it!
Thanks,
Daniel