Thread: question about "infinity" in math

1. question about "infinity" in math

Suppose you had a random number generator that was capable of generating real numbers of infinite precision (this would be something better than current computer PRNG's, which can only produce numbers of fixed precision, and aren't really truly random). What is the probability of this RNG generating an integer-like number (something like 24.0)? The number of integers and real numbers that can be generated are both infinite, but intuitively, the infinity of integers should be "smaller" than the infinity of real numbers.

2. My intuition is that there there would be no possibility, because there are infinitely more real numbers than integers. Of course, no computer could ever do that, so the question may be meaningless.

3. Originally Posted by Jens
My intuition is that there there would be no possibility, because there are infinitely more real numbers than integers.
Yeah. That would be the same probability of its generating a number with a fractional part of .999...

4. But then, each time you use the thing, whatever number you got, the odds of getting that number were zero before it happened.

5. Can the probability of getting any number be zero? With a hypothetical perfect RNG, the probability of getting any number should be equal to the probability of getting any other number. So if the probability of getting one number is zero, then they would all be zero. Doesn't this mean the RNG would spit out NO numbers whatsoever? But it does (or should), so the probability should be a small but non-zero number.

Jens, yes, I do agree that no computer may ever be able to serve as such as perfect RNG. But for the purposes of this exercise, let's pretend that we do have such a thing. Let's say it's the dice that God plays with

6. You could easily make this a precise question simply by increasing both the precision and range and watching what happens to the probability of getting an integer. The probability is simply the range over the precision, it makes no difference how large each of those is. Thus you can't just say "both are infinite", because what will always matter is their ratio.

7. If you have a "true" random number generator and your range is infinity, I think the probabilities of generating a number say 10.0 (Or any number) is zero Or alternatively 1 to infinite, which realistically is zero.

8. Any specific number, yes, but as for getting an integer, it's the ratio of range to precision. If I have a precision that only includes one place after the decimal point, my range can be anything you like, even infinite (in principle, of course that's impossible in practice), and the chance of getting an integer is always 1/10. If I have two decimal places, it's 1/100, etc. But my full precision must include all the places to the left of the decimal as well, so that's where the range comes in. Thus getting back to the OP, even if I have infinite precision and infinite range, I still have to specify how much of that infinite precision is used on the left of the decimal place, and how much on the right, in terms of a ratio.

9. quote, "The number of integers and real numbers that can be generated are both infinite, but intuitively, the infinity of integers should be "smaller" than the infinity of real numbers. end quote"... Umm....

Hay wait a minite... that can't be right, can it?
Infinite is infinite... There can be no 'larger' portion of infinite possibilities. Any less than infinite, is not infinite. How did you let this go?

10. There are indeed different "levels of infinity". For example, there are an infinite number of rational numbers between 0 and 1, and an infinite number of irrationals there as well, but if you truly pick a random point on a line from 0 to 1, it will always be an irrational number. This is because the irrationals are 'uncountably infinite' and the rationals are 'countably infinite'. The latter means that since rationals can be expressed as fractions, you can count them (indeed, overcount them) by going 1/1, 1/2, 1/3, 2/3, 1/4, 2/4, 3/4, 1/5, 2/5, 3/5, 4/5,... see the pattern? But you cannot do that with the irrationals. Or another way to think of that, rationals have repeating decimals, irrationals don't -- so the latter are arbitrarily more numerous in a given range with arbitrary precision. But the OP also specified that the range was arbitrarily large, so that's why we haven't enough information to tell how likely the integers, or the rationals, will be compared to the irrationals.

11. Originally Posted by CodeSlinger
What is the probability of this RNG generating an integer-like number (something like 24.0)?
Infinitely small, that is 0. The probability of a given value in a continuous probability function is always 0, even if the function is limited.

Originally Posted by CodeSlinger
The number of integers and real numbers that can be generated are both infinite, but intuitively, the infinity of integers should be "smaller" than the infinity of real numbers.
Your intuition is right, there are "different-sized" infinities. The size of an infinity is called cardinality. The cardinality of the set of real numbers, Aleph-1, is larger than the cardinality of the set of integers, Aleph-0 which is the smallest possible infinity. Interestingly, one can't prove mathematically that there are intermediate cardinalities between those two.

12. You're getting hung up on infinity.
Whatever the odds are for getting, say, 23.99999999999999999999999999999999999999999999999 999999999999999999999999999999999999999999999 etc.etc., they are exactly the same as getting 24. Of course that first number is not infinitely precise, but anyway, I hope the point is made.

This fallacy prevents peole using "1 2 3 4 5 6" as their lottery number, when the odds of that coming up are exactly the same as any other number.

John

13. Probability of getting anything in an infinite set is:
1/infinity
Which is undefined, not 0. It is the same as divide by 0.
It is a common misunderstanding.

14. Thanks for the responses ladies and gents After reading through your replies and a1call's linked page, I *think* I got it. The probability of getting an integer (or any other number) from the hypothetical perfect RNG is simply 1/infinity, an infinitely small number tending to, but *not* equal to, zero. The way I "visualize" this is that as I run (execute, crank through) the RNG more and more times, the ratio of integers versus real numbers will continue to decrease and converge on zero. The same way that as I flip a coin more and more times, the ratio of heads to tails will converge to 1:1.

Ken G, in belated response to your question, I was thinking that the hypothetical perfect RNG would have infinite precision on both the left hand side and the right hand side of the decimal point. As you said, if there is one decimal point precision, the odds would be 1/10, if there are two, the odds would be 1/100. So given infinite precision on the RHS, the odds should be (if I'm thinking about this correctly) 1/infinity. Same result as above, slightly different path. Which I take to be a good sign; if the two reasoning gave different results, my noodles would really be baked!

Thank you, everyone, for humoring me

15. Originally Posted by CodeSlinger
So given infinite precision on the RHS, the odds should be (if I'm thinking about this correctly) 1/infinity.
That's true if you have finite precision on the LHS-- but that's not the case if you have an infinite range of numbers. You have to specify the digits of precision on both sides, or at least their ratio if they tend to infinity, before you can know what the probability of getting an integer is. There's no escaping the fact that there's no way to actualize an infinite decimal expansion, you need a finite algorithm to generate it and only that algorithm can answer the OP. You are right that the probability of getting any particular number tends to zero as either the range or the precision tends to infinity, for any random algorithm.

16. Ok, this part I still don't understand. Why does the precision on the LHS matter in the probability of getting an integer? Only the RHS differentiates integers from non-integers.

17. Order of Kilopi
Join Date
Apr 2004
Posts
7,310
Originally Posted by CodeSlinger
Suppose you had a random number generator that was capable of generating real numbers of infinite precision (this would be something better than current computer PRNG's, which can only produce numbers of fixed precision, and aren't really truly random). What is the probability of this RNG generating an integer-like number (something like 24.0)? The number of integers and real numbers that can be generated are both infinite, but intuitively, the infinity of integers should be "smaller" than the infinity of real numbers.
Your problem is lacking information. You say you have a random number generator, but as soon as you abandon finite probability spaces (and the integers are certainly infinite) you must specify which kind of randomness you're talking about.

Originally Posted by CodeSlinger
Can the probability of getting any number be zero?
Yes.

Originally Posted by CodeSlinger
With a hypothetical perfect RNG, the probability of getting any number should be equal to the probability of getting any other number. So if the probability of getting one number is zero, then they would all be zero.
It depends on what you mean by "perfect" RNG. The probability need not be zero for all real numbers.

Originally Posted by CodeSlinger
Doesn't this mean the RNG would spit out NO numbers whatsoever?
No, it doesn't, actually.

18. Established Member
Join Date
Jan 2005
Posts
1,945
I remember a thread I started a while ago about "flawed questions", if anyone remembers.

Like :"Can Jesus miocrowave a burrito so hot that even He can't eat it?"

(Obviosly not intended to start some sort of religious debate, unless you're Homer Simpson or Ned Flanders)

I'm wondering if this is a flawed question?

I think the probability is 0, as you could probably define a density function and try to calculate the area under the curve at a single point.

Wow..this question is a bugger, isn't it?

But is it a flawed question?

Pete

Note: I suppose you could try to calculate the probability of finding a random integer from the real number system and it would still be 0 (or a limit as x goes to infinity), but how about an interval of real numbers?

19. Hello Disinfo Agent,

What are the different kinds of randomness? The kind of randomness I was thinking about for the hypothetical RNG is one where given infinite time, all real numbers would be enumerated. Would this be perfect uniform randomness?

You said that the probability of getting a number can be zero, and went onto say that this does not mean the RNG would spit out no numbers whatsoever. Can this be in the case of a perfect uniform RNG (if that is the right term for what I'm thinking about), where the probability of getting any number should be equal to the probability of any other number? Can an event that has zero probability still occur?

20. Originally Posted by peter eldergill
Note: I suppose you could try to calculate the probability of finding a random integer from the real number system and it would still be 0 (or a limit as x goes to infinity), but how about an interval of real numbers?
The first part is precisely what I was trying to ask in the OP. My current thinking is that it is not zero, but an infinitely small number that tends to zero. For the second part, I think the answer should be the same, since for any given interval there are still an infinite number of real numbers contained within.

21. Order of Kilopi
Join Date
Apr 2004
Posts
7,310
Originally Posted by CodeSlinger
Hello Disinfo Agent,

What are the different kinds of randomness? The kind of randomness I was thinking about for the hypothetical RNG is one where given infinite time, all real numbers would be enumerated.
But there are many different ways of doing that. Infinitely many, as a matter of fact. Infinitely many different RNGs that can be constructed, if you will.

Originally Posted by CodeSlinger
Would this be perfect uniform randomness?
Uniform randomness is one kind of randomness, but here's the kicker: with uniform randomness, you'll never manage to span all the integers, only a finite subset of them.

Originally Posted by CodeSlinger
You said that the probability of getting a number can be zero, and went onto say that this does not mean the RNG would spit out no numbers whatsoever. Can this be in the case of a perfect uniform RNG (if that is the right term for what I'm thinking about), where the probability of getting any number should be equal to the probability of any other number? Can an event that has zero probability still occur?
Yes to both questions. In infinite spaces, and event with zero probability isn't necessarily impossible; just very, very unlikely.

22. Originally Posted by Disinfo Agent
But there are many different ways of doing that. Infinitely many, as a matter of fact. Infinitely many different RNGs that can be constructed, if you will.
Cool I'm not particularly concerned about how this might be achieved. As long as it is not a logical impossibility (which would render this line of questioning moot), that's good enough for now.

Originally Posted by Disinfo Agent
Uniform randomness is one kind of randomness, but here's the kicker: with uniform randomness, you'll never manage to span all the integers, only a finite subset of them.
Given infinite time, though, it would, yes? In any case, I think this is also tangential to the question at hand. My mind is feeble, one brain-twister at a time, please

Originally Posted by Disinfo Agent
Yes to both questions. In infinite spaces, and event with zero probability isn't necessarily impossible; just very, very unlikely.
How can this be? I thought the very definition of "impossible" is "an event with zero probability". This is what I would like to focus on, if you don't mind.

23. Order of Kilopi
Join Date
Apr 2004
Posts
7,310
Originally Posted by CodeSlinger
Given infinite time, though, it would, yes?
No, with a uniform distribution you're always confined to some bounded interval [a, b]. Even for the positive integers, the simplest infinite set you can think of, there is no distribution (no RNG) that is uniform.

Originally Posted by CodeSlinger
How can this be? I thought the very definition of "impossible" is "an event with zero probability".
No, "impossible" just means that it never happens.
And in finite spaces that's equivalent to saying that the event has zero probability -- but not in infinite spaces. In infinite spaces, "most" events have zero probability.

24. Originally Posted by peter eldergill
But is it a flawed question?
Yes, not enough information is given about the algorithm that would be needed to actually do this.
Note: I suppose you could try to calculate the probability of finding a random integer from the real number system and it would still be 0 (or a limit as x goes to infinity), but how about an interval of real numbers?
The number of integers in any fixed interval is finite, the number of rationals is countably infinite, and the number of reals is uncountably infinite, so that tells you the hierarchy of likelihoods. But to get an actual probability, you still need to know how the number is being selected. Let's say we take a fixed interval, move a random distance along it, and then measure the point where we stop. Now the probabilities are going to depend on how precise our measurement is. But in the limit as the precision increases (the density of "tickmarks" on our ruler), the chance of getting an integer drops toward zero. Still, we always get a rational result-- we cannot measure something irrational, though we can certainly conceptualize an irrational distance. In some ideal sense, we expect all random distances to be irrational, by the hierarchy, but in practice none of them ever are. The mathematicians can argue it out with Zeno, I want an algorithm.

25. Order of Kilopi
Join Date
Apr 2004
Posts
7,310
Nevertheless, Ken, a sequence of rational numbers can converge to an irrational number.

26. Certainly-- but convergence is not an algorithm for generating that number, it is more like the label of the number. Saying my name is "Ken" is not the same as telling me how that name can get pulled from a hat. I need a finite algorithm to know what we are talking about. I suppose one could say that if we have infinitely precise RNGs we are assuming we can have infinite algorithms, but I prefer to think of such things as a limit as finite algorithms get arbitrarily complicated. I don't know what it means to say "pick a random point on a line segment"-- what is a point and how do you tell which one you've picked?

27. Originally Posted by Disinfo Agent
No, with a uniform distribution you're always confined to some bounded interval [a, b]. Even for the positive integers, the simplest infinite set you can think of, there is no distribution (no RNG) that is uniform.
I don't think this is true; consider the following algorithm:

Have one program/machine count integers up from 0
Have another program/machine count integers down from -1
Record all output from both programs/machines

Given infinite time, this should give you all integers from infinity to negative infinity (uniformly, no less!).

Originally Posted by Disinfo Agent
No, "impossible" just means that it never happens.
And in finite spaces that's equivalent to saying that the event has zero probability -- but not in infinite spaces. In infinite spaces, "most" events have zero probability.
My brain just asploded. Can you give me some references to read on this? Preferably at a beginner level please.

Edit: Just realized that the "algorithm" can be simplified to *one* program machine that alternates between counting upward in positive integers and downward in negative integers. So it would spit out output like "0, 1, -1, 2, -2, 3, -3 ...". This would get the job done, for half the sticker price
Last edited by CodeSlinger; 2007-Sep-10 at 05:56 PM. Reason: brainstorm

28. Hi Ken G, I asked you this earlier, but it probably got lost in the shuffle. I still don't understand why the LHS precision would factor in the probability of fetching an integer from a system of real numbers. Because as far as I can tell, only the RHS differentiates integers from non-integers.

29. Originally Posted by CodeSlinger
Hi Ken G, I asked you this earlier, but it probably got lost in the shuffle. I still don't understand why the LHS precision would factor in the probability of fetching an integer from a system of real numbers. Because as far as I can tell, only the RHS differentiates integers from non-integers.
You're right that only the number of digits on the right of the decimal will matter for the integer probability, but I'm imagining that that number is determined by the difference between the total number of digits you have to the total number that will be on the left of the decimal, as the latter is what controls the range. So if the range is the number of digits on the left, expressed as a power of 10, and the total precision is the total number of digits, as a power of 10, then the ratio of the former to the latter is the integer probability-- which is also the number of digits on the right, as a negative power of 10. So what I mean is, if the range and precision are both infinite, it's still not clear "how many digits are left over" to be put to the right of the decimal. We might, for example, assert that there's always only one decimal digit, even as the range and precision go to infinity. More information is needed.

30. Ok, I see. As I said earlier, I'm positing infinite precision on the RHS. Given this, am I correct in thinking that the probability in question should be 1/infinity?
Last edited by CodeSlinger; 2007-Sep-10 at 06:24 PM. Reason: I can't read, removed useless verbiage

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•
here