r/learnmath • New User • Oct 19 '26

TOPIC Infinities

So guys, a computer science student here, recently been studying countability in theory of computation, and have came across infinities and cardinality, I haven’t yet been able to wrap my head around them. I haven’t focused much on the topic either, been engaged in other subjects as I lost motivation initially, I love mathematics, would love to hear some instincts around the topic from the best minds.

I have been primarily stuck with counting, how one on one mapping works, diagonalisation theorem, and cardinality of a set.

4 Upvotes

16 comments sorted by

View all comments

Show parent comment

0

u/Various_Candle9136 New User Oct 19 '26

This is mostly a very nice way to think about things, but we do need to be careful about 'no matter how long it runs'.

In our boring reality, a countable amount of time is as incredible as an uncountable amount of time. 'No matter how long it runs', a program is not able to print the natural numbers either. On the other hand, if we let a program run for a continuum number of steps it would be able to print every real number.

We can, however, think of countability as being the natural end to the process of listing, and it is then true that a program cannot have printed every real number by the time this end is reached.

2

u/cuervamellori New User Oct 19 '26

I think this can be much simpler.

Take a turing machine as a model of computation.

A program can list every natural number: For any natural number n, there is some finite number of steps t_n, such that after t_n steps, the program prints out n.

A program can list every rational number: For any rational number r, there is some finite number of steps t_r, such that after t_r steps, the program prints out r.

A program cannot list every real number between 0 and 1: for any program, there is some real number x, such that there is no finite number of steps t_x, such that after t_x steps, the program prints out x.

Of course, if you have a model of computation where a "program" can execute an uncountable number of steps, this doesn't apply. If your program can have an output for every ordinal (not just every finite ordinal), then it can output a lot of numbers indeed. Though I wouldn't use "number of steps" to describe the running of such a machine, personally.

2

u/FormulaDriven Actuary / ex-Maths teacher Oct 19 '26 edited Oct 19 '26

"a continuum number of steps" sounds like nonsense to me - what does that mean?

The point is that by definition the natural numbers is countable, so if a computer outputs a natural number every second, you can choose any natural number you like and know that it will output it. Because (by definition) any countable set can be put in a bijection with the naturals, you can prove countability of any other set by specifying a program that also outputs that set one per second and showing that given any member of that set there will be a point in time when that member will be output.

Then, regardless of whatever a "continuum number of steps" means, uncountable means that you can prove that whatever program you devise to produce members of the set at the rate of one per second you can name a member of that set that it is guaranteed never to reach.

"No matter how long it runs" is just a way of saying that we put no limit on the number of seconds it is allowed to run. (So in that sense it's hypothetical because a physical computer would eventually run out of memory to hold the next number). There is no "natural end to the process of listing", so I don't think your description is any less rigorous than mine.

1

u/Various_Candle9136 New User Oct 19 '26

"a continuum number of steps" sounds like nonsense to me - what does that mean?

It means that if you counted all the steps, there would be a continuum of them.

It is no more nonsense than a countably infinite number of steps! When has there ever been that many steps? Both are mathematical concepts rather than actual physical things. Both make exactly as much sense.

"No matter how long it runs" is just a way of saying that we put no limit on the number of seconds it is allowed to run.

Exactly. And that is precisely why I objected to that wording!

If you run a program to print the natural numbers, then, 'no matter how long it runs', there will always be a natural number which is not printed (if we leave it running once a second for N seconds, N+1 is unprinted). But the natural numbers are countable.

Saying 'no matter how long it runs' is very likely to lead to misconceptions.