# The set consisting of random numbers with random lengths

1. Dec 1, 2015

### serp777

Does the set of random integers with random lengths (the number of digits), which hypothetically would generate random numbers with random lengths for eternity, produce all possible integers? It seems to me that this is a natural conclusion but i've never seen a proof of this. A more incredible statement would be that there are integers which could not be produced via this process.

2. Dec 1, 2015

### BvU

I don't see how you can construct an integer that can escape being produced. All integers have the same probability of being produced (namely zero) in a finite time.
I'm not sure how things change if e.g. you first pick a random length (infinitely many possibilities) and subsequently pick a random integer of that length (a finite number of choices).

3. Dec 1, 2015

### Svein

First tell me how you would create that random number generator. If you want to create a random number in a finite time, you will only get random numbers in a finite range...

4. Dec 1, 2015

### jbriggs444

I am not sure that this stands up to rigorous scrutiny but...

As BvU points out, the probability that any particular integer escapes being produced is zero. The probability that any particular integer escapes being produced while all lesser integers are produced is also zero. The case that at least one integer escapes being produced is the infinite union of the cases where some integer escapes being produced while all lower integers are produced. Those component cases are disjoint by construction. By countable additivity, the probability of the union is the sum of the probabilities of all of the component cases. That sum is zero.

5. Dec 1, 2015

### BvU

I like phinds' almost standard referral to the Hilbert Hotel for a nice confrontation with infinities

6. Dec 1, 2015

### micromass

How do you even pick an integer at random? There is no way!

7. Dec 1, 2015

### jbriggs444

It is not possible to pick an integer at random such that all integers are possible and the probability distribution is uniform.

My reading of the problem in #1 is that the requirement that the distribution be uniform has been relaxed but the requirement that the distribution have a non-zero probability for each and every integer has been retained. A procedure such as "flip a coin and count the number of tails prior to the first heads" is almost certain to work for this.

8. Dec 1, 2015

### micromass

Sure. But many people not familiar with probability seem to use the word "at random" to mean "uniform probabilities". If the OP doesn't say this, he needs to specify exactly how he does this random number selection.

9. Dec 1, 2015

### meldraft

Does the randomness allow for numbers to be generated twice? If not, it should be exactly the same as trying to enumerate the set of integers, which is infinite. If it does, on the other hand, it just makes things worse as the probability of a particular integer to be generated is even smaller.