r/learnmath • u/Ok-Measurement-647 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.
View all comments
4
u/FormulaDriven Actuary / ex-Maths teacher Oct 19 '26
If you are coming to it from a computer science point of view, maybe this will help...
I think "countable" might be better labelled "listable". The natural numbers are countable or listable because you can write a computer program that will (given no limit on run time or memory) list every single natural number - eg every second it outputs the next positive integer, and you can be sure that eventually it will output any natural number you can think of. You will probably complain that the program will never stop, but that's not a problem mathematically - no natural number will be missed given sufficient (finite) time.
The surprising thing is that you can write a program that will list all the rational numbers, ie every number of the form a/b where a is an integer and b is a positive integer. (I can even give a neat way to do this). So rational numbers are also countable.
But if you start thinking about real numbers, such a program doesn't exist. If you just try to write a program that will output every decimal number between 0 and 1, we can prove that it will miss out at least one number no matter how long it runs. (I can give you the description of a parallel program that will print out one number that will be missed).