Hacker News new | ask | show | jobs
by Viliam1234 2781 days ago
"Rational" numbers are those that can be expressed as a fraction of two integers. For example, a square root of two is not rational.

"Computable" numbers are those that can be calculated by a computer (with unlimited memory, but finite speed) with arbitrary (not infinite) precision in finite time. As a rule of thumb, anything you can express using words like "plus", "minus", "square root", "logarithm" etc. is going to be computable.

> irrational numbers would require infinite computational steps to resolve

No, this is not the real reason. Both "1/3" and "square root of 2" have infinite number of decimal places, so neither can be fully written by a computer program. However, each of them can be approximated to e.g. one billion decimal places.

To show you how most numbers are not rational, consider only numbers of form "A + B * square root of two", where A and B are rational. Each different pair of A and B gives you a unique number. Among them, the numbers with B = zero are rational, and numbers with B <> zero are irrational. (Furthermore, all rational numbers can be expressed like this, but many irrational numbers, such as "square root of three" are outside of this set.) This should make it intuitively obvious why a randomly picked number is infinitely unlikely to be rational.

But the rabbit hole goes much deeper.

Let's ignore all technical details, and take a set of all numbers you can describe (unambiguously, and without any paradox) by a sentence of a finite length (including any finite number of equations of a finite length). If you need a whole book to define a number, so be it. Take all numbers humans can describe.

The point is that all these numbers are just an infinite minority in the vast ocean of real numbers.

How can that be? What else is missing? This seems tricky, because -- by definition -- I should be unable to give you an example of a number that cannot be described. But even if I can't give you a specific number, I can point you towards a concept: the numbers whose decimal digits are all randomly generated.

Any number that can be described by a finite description, contains a finite amount of information. A number with infinitely many randomly generated digits contains an infinite amount of information. To put it differently, when you generate numbers with infinite number of random decimal digits, you would have to be infinitely lucky to generate a number which only happens to contain a finite amount of information (for example, when all randomly generated digits happen to be zeroes). But the former are the real numbers, and the latter are the computable numbers. So if you take a random real number, you have to be infinitely lucky to get a computable one.

There is actually more, because "infinitely more" does not adequately describe the difference between comparing "rational" with "irrational, but still computable" numbers (both infinities have the same cardinality), and "computable" with "real" numbers (infinities of a different cardinality)... but this part, I am afraid, is beyond lay interpretations and requires paying attention to some technical definitions. A simple version is that the rational numbers and the computable numbers can both be numbered by integers, if we choose a sufficiently smart numbering scheme; but for real numbers, even this is impossible. But it takes some technical details to explain why it is so, and why it matters so much.