2
$\begingroup$

I'm not a mathematician but I am a software engineering student. From what I've understood so far, the Cantor diagonal argument proves that the real numbers are infinite and uncountable. My biggest confusion arose from that I thought:

"Why aren't the natural numbers uncountable? They continue forever?" or "What's stopping us from replacing the diagonal numbers with natural numbers, and then creating a new natural number which isn't on the list? How do the two things differ?"

But after a decent amount of thinking, googling, asking and watching videos, what I gathered is that they differ because the 0.000001... will always be a fraction of a number regardless of how long or infinite after the decimal point, whereas the natural numbers will just become illogical strings of numbers.

My question is - is this the logic behind it? Am I missing anything? Please explain in easy to understand ways.

Cantor's Diagonal Argument Image

$\endgroup$
7
  • 5
    $\begingroup$ Uncountable is not the same as infinite (unending.) The natural numbers are countably practically by definition. $\endgroup$ Commented May 5 at 18:02
  • 2
    $\begingroup$ Natural numbers do not have infinitely many freely-chosen digits. Any digits after the decimal point makes it not a natural number, and only finitely many digits to the left of the decimal point can be non-zero. There is no natural number with infinitely many digits. $\endgroup$ Commented May 5 at 18:05
  • 1
    $\begingroup$ Suppose you have many things and you start counting them one by one, pointing at something and calling out ‘1’, then, ‘2’,… If you can show that in this way everything will be counted if you go on forever, then the ‘many things’ are countable. However, if you can’t, they’re uncountable. $\endgroup$
    – Soham Saha
    Commented May 5 at 18:06
  • 4
    $\begingroup$ If you try to run Cantor's argument on the natural numbers, you will get an infinite string of digits, and this is not a natural number. Even though there are infinitely many natural numbers, each one of them is represented as a finite string of digits. This is not the case for real numbers. $\endgroup$
    – Karl
    Commented May 5 at 18:31
  • 2
    $\begingroup$ If a set is countable, that just means that we can pair each element of the set with a unique natural number. That is, given any element $e$, we can generate an index number $n$ for it, and the algorithm that generates $n$ is guaranteed to terminate in a finite number of steps for any $e$. $\endgroup$
    – PM 2Ring
    Commented May 5 at 21:18

5 Answers 5

4
$\begingroup$

The diagonal argument Cantor uses to prove the uncountability of the reals cannot be applied to the naturals. That’s because every natural number has but finitely many digits, but the thing produced by the diagonal approach has infinitely many digits, so it cannot be a natural number (let alone a natural number missing from the list).

Besides, the definition of countabilty of a set S does not mean that a person or device can count the elements of S (rattle off the sequence “1, 2, 3, …” while pointing out successive members of S) in a finite time, it requires only that it be possible to associate each element of S with a unique natural number. That’s what’s at the heart of @ThomasAndrews’ comment, because one can simply associate each natural number with itself. Cantor’s argument shows that any way you associate each natural number to a real, there will always be a real that’s left out, that doesn’t receive any natural number.

$\endgroup$
2
  • 1
    $\begingroup$ Is your first argument valid? Where there is a blank space, I could just insert any digit for my new number that I create rather than saying I have to change it. '1 blank' is still different to '1 1'. $\endgroup$
    – Cristof012
    Commented May 5 at 18:42
  • 1
    $\begingroup$ Ok, @Cristof012, you’re right. I’ll edit… $\endgroup$ Commented May 5 at 18:50
3
$\begingroup$

Cantor's Diagonal Argument is almost always taught incorrectly, in several ways. Some are immaterial; for example, he used it on infinite-length binary strings, not real numbers. It works the same on both, but only one is what Cantor did. But some important steps are glossed over, one is the source of your confusion. Another is a logical mistake that intuitive students will sense, but be told (incorrectly) that their intuition is faulty.

Here is an outline of the argument as Cantor used it, including the correction these flaws. I'll add notes along the way, in parentheses, pointing out the differences between it, and what is usually taught.

First off, "0.123000..." is not a real number, it is an infinite-length string of characters. The decimal representation of a real number in [0,1] is such a string. This becomes significant since "0.5000..." and 0.4999..." are different strings that represent the same real numbers. That's one reason why Cantor used strings.

  1. Let T be the set of all infinite-legnth binary strings. (Examples are "0000...", "1111...", and "0101...".)
  2. Let S(n) be an infinite list of such strings. (Cantor did not assume that this list included every such string.)
  3. Let s0 be a string whose nth character is the opposite character to the nth character of s(n).
  4. Show that s0 is an infinite-length binary string, and so must be a member of T. (This is the flaw that bothers you. It is necessary for the proof.)
  5. This proves the proposition that any listing of members of T that can exist must be missing the string s0, that we can construct from the listing.
  6. From this proposition, it follows immediately that a full listing cannot exist. Otherwise, the string s0 would both be a member of T, but also not be a member of T.
$\endgroup$
7
  • 1
    $\begingroup$ These might be oversights/typos, but: 1. What is the 'n' in 'S(n)' for? 2. Are 'S(n)' (uppercase) and 's(n)' (lowercase) different things? $\endgroup$
    – detly
    Commented May 6 at 6:48
  • 1
    $\begingroup$ Hi. I have to add a caveat to your first two sentences: "Cantor's Diagonal Argument is almost always taught incorrectly, in several ways. Some are immaterial; for example, he used it on infinite-length binary strings, not real numbers". By that logic, every mathematical theorem is always taught incorrectly. No doubt Pythagoras and Thales didn't teach their theorems the same way they are taught to 21st-century schoolers. Even Newton and Leibniz didn't present their theorems the same way they are taught today. $\endgroup$
    – Stef
    Commented May 6 at 10:08
  • $\begingroup$ For wanting to correct common shortcomings in presentations of the proof, your (5) is surprisingly sloppy. $\endgroup$
    – Carsten S
    Commented May 6 at 10:29
  • $\begingroup$ Btw, Cantor did not use 0 and 1 but “m” and “w” if I recall correctly. $\endgroup$
    – Carsten S
    Commented May 6 at 10:55
  • $\begingroup$ detly: Habit. Some with less experience wonder what S(*) means. With more experience, they can figure it out. Maybe I should have said "for all n." Stef: I did say it was immaterial. I mentioned it because Cantor specifically said he wasn't using irrational numbers. Carsten: Cantor's wrote that he was proving the proposition "If E1, E2, …, Ev, … is any simply infinite series of elements of the manifold M, then there always exists an element E0­ of M, which cannot be connected with any element Ev." I tried to write that in non-mathematician language. And yes, M used 'm' and 'w'. $\endgroup$
    – JeffJo
    Commented May 6 at 19:28
2
$\begingroup$

Yes your intuition is right about decimals going 'infinitely after the decimal point' making a difference. The problem with the natural numbers is that every natural number must 'end' whereas decimals do not.

Let's say that you did write out the list of all the natural numbers and tried to use Cantor's diagonal argument. I move along the list switching the $1^{st}$ digit of the $1^{st}$ natural number and the $2^{nd}$ digit of the $2^{nd}$ natural number and so on to create a new number. Since natural numbers can have any number of digits you would like, this new number will never have an 'end' despite every natural number in your list having an 'end'. So the new number that you created will not be a natural number at all, let alone a new one! However, decimals will 'go on forever' which is why you do in fact create a new decimal number in Cantor's diagonal argument.

With regard to your question of 'Why aren't the natural numbers uncountable?', I can try and offer an intuitive answer rather than a mathematically rigorous one. Countable just means you can list them off in a systematic way (1,2,3,4,...) so that you will definitely reach every number at some point. This can be done with the rational numbers (fractions) as well. It does not mean that there have to be finitely many numbers. But try to list off the all the real numbers (decimal numbers). Where do you start? And which number comes next?

$\endgroup$
1
  • 2
    $\begingroup$ Upvoted because this is currently the only answer that actually addresses the OP's confusion about the word "countable". "Countable just means you can list them off in a systematic way (1,2,3,4,...) so that you will definitely reach every number at some point." Great definition. Imagine a queue at the grocery store: the queue is allowed to be infinite, but what is important is that every customer must be guaranteed to be served in finite time. And indeed if it takes one minute to serve each customer, then the Nth customer will be served within N minutes even if the queue is infinite. $\endgroup$
    – Stef
    Commented May 6 at 10:13
2
$\begingroup$

Roughly, countable sets can be put in a list.

Of course, any finite set works.

The naturals meet this criterion:

$$1,2,3,4,\dots.$$

None is skipped (they're all there).

Also, $\Bbb Z$ is countable:

$$0,1,-1,2,-2,3,-3,\dots .$$

Cantor's diagonal argument shows that the reals cannot be put in a list. It does this by taking an arbitrary list of real numbers, and showing that there will always be at least one missing.

The very clever trick is to produce such a missing real by changing a digit (along the diagonal) of the decimal representations of the numbers in the list.

Since the constructed number differs from each number in the list, we are done. (Of course, we need to get rid of duplicate decimal representations, like $0.2$ and $0.1\bar9,$ at the outset.)


One application is that the countable union of countable sets is countable. To prove it simply arrange them in an infinite array, and wind your way back and forth from the upper left hand corner to put them in a list.

In this connection, see "Cantor's pairing function".

$\endgroup$
1
$\begingroup$

The usual presentation of the diagonal argument takes place on the interval $(0,1)$ (we later construct a bijection from $(0,1)$ to $\mathbb{R}$, like $x\mapsto\tan(\pi x-\pi/2)$). The crucial part of the argument is that, given a number $0.a_1a_2a_3...\in(0,1)$ (and all numbers from this interval are of this form), where $a_i\in\{0,1,2,...,9\},\forall i\in\mathbb{N}$, if $f(n)=x_n$, where $f$ is our supposed bijection from $\mathbb{N}$ to $(0,1)$, then we can construct a number $y=0.b_1b_2b_3...$ by making $b_n$ different than $c_{nn}$ (and preferably different than $9$), where $c_{nn}$ is the $n$-th number in the decimal expansion of $x_n=0.c_{n1}c_{n2}c_{n3}...$ In such case, $y\in(0,1)$ and $y\not=f(n)\forall n\in\mathbb{N}$ (because they differ at least in one place), which is the contradiction we wanted. Notice, however, that we needed the assumption that the $n$-th digit always existed.

That is, it makes sense to speak of the $n$-th digit in the decimal expansion of any number in that interval, and it makes sense for such a number to have all digits different than zero (provided they aren't all nines). Natural numbers, however, do not enjoy this same property, since any natural number can be written as a finite sum of ones, even if you were to think of them as having infinite digits (to the left), only a finite amount of them would be different than zero. Therefore, for our "$y$" to be different than every $f(n)$ at least once, it will have "infinite non-zero digits", in which case it's not a natural number. To see this, note that, if $y$ where to have finite non-zero digits, that is, $y=A_kA_{k-1}...A_2A_1;$ $A_i\in\{0,1,2,...,9\}\forall i\land A_k\not=0$, then it wouldn't be different than the number $A_kA_{k-1}...A_2A_1$ which is in the image $f(\mathbb{N})$ by assumption.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .