57

In my understanding of Cantor's diagonal argument, we start by representing each of a set of real numbers as an infinite bit string.

My question is: why can't we begin by representing each natural number as an infinite bit string? So that 0 = 00000000000..., 9 = 1001000000..., 255 = 111111110000000...., and so on.

If we could, then the diagonal argument would imply that there is a natural number not in the natural numbers, which is a contradiction.

Gaurang Tandon
  • 6,141
  • 3
  • 31
  • 66
usul
  • 3,464
  • 2
  • 22
  • 25
  • If you try the diagonal argument on any ordering of the natural numbers, after every step of the process, your diagonal number (that's supposed to be not a natural number) is in fact a natural number. Also, the binary representation of the natural numbers terminates, whereas binary representations of real numbers do no. That's the basics for why the proof doesn't work. – Michael Chen Apr 26 '11 at 00:36
  • 2
    I don't think these arguments are sufficient though. For a) your diagonal number is a natural number, but is not in your set of rationals. For b), binary reps of the natural numbers do not terminate leftward, and diagonalization arguments work for real numbers between zero and one, which do terminate to the left. – usul Apr 26 '11 at 01:11
  • 1
    I upvote this question because I had it too, despite I do not understand why do we need to stack at binary strings, since the method is normally demonstrated with decimal expansion. It is extra unnecessary requirement, IMO. – Val Aug 15 '13 at 17:17
  • @Gaurang: Capitalizing every (or most) word in a title is a matter of style and taste. – Asaf Karagila Sep 02 '18 at 12:09
  • 1
    @AsafKaragila I agree. I was mainly focused on removing the thanks. I have an automated capitalization corrector setup, so I just used it. I agree with you it's a matter of taste but the general tradition - if you looked at the [highest voted questions](https://math.stackexchange.com/questions?sort=votes) - seems to be to use Sentence casing instead of Capital Case. It's fine though - I won't make such an edit again :/ – Gaurang Tandon Sep 02 '18 at 12:32

2 Answers2

42

If you represent a natural number as an infinite string, the string will become identically $0$ after a certain point. If you think it through, the "diagonal argument" in this case doesn't produce a natural number; it will produce a string with infinitely many $1$s.

On the other hand, you can consider possibly infinite binary strings --- i.e. strings in which there can be infinitely many $1$; this is one way to think of the set of $2$-adic numbers, which is indeed an uncountable extension of the set of natural numbers (as one sees using the precise diagonal argument that you suggest).

Matt E
  • 118,032
  • 11
  • 286
  • 447
  • 1
    I was thinking about your first paragraph... what if you reordered the natural numbers such that the diagonal wasn't straight zeroes? – Michael Chen Apr 26 '11 at 00:45
  • 2
    You'd actually need the diagonal part to be identically 1 for digits large enough. If you have infinitely many zeros on the diagonal, then you still don't get a natural number. You'd need all but finitely many of the diagonals to be 1. But you can see that isn't possible, because if the $n$th binary digit of a number is 1, then that number is at least $2^n$. – Thomas Andrews Apr 26 '11 at 00:57
  • 2
    @Michael: I don't mean that all entries will necessarily be $1$, but there will necessarily be infinitely many $1$s. – Matt E Apr 26 '11 at 00:58
  • Hmmm. I think that can work. But what if I list the natural numbers in this order: all powers of two first, increasing, then the rest of them? You get the strings 1, 01, 001, 0001, etc and the diagonal number constructed is zero, but of course zero is in the list of numbers -- it's the first number after all the powers of 2. – usul Apr 26 '11 at 01:19
  • 2
    @b01024: but then since you have an enumerated list, you have to state where the numbers in between fall. The crux is that you can't have 1's everywhere on the diagonal, for then you have no place to put 1, 3, 5, 6, 7, etc. – Michael Chen Apr 26 '11 at 01:23
  • Why does my list fail this criteria? I list the natural numbers in this order: 1, 2, 4, 8, 16, ... , 0, 3, 5, 6, 7, 9, ... – usul Apr 26 '11 at 02:24
  • @b01024: You can use @Michael to reply to me in a comment, so it shows up in my inbox (at the top-left corner of the stackexchange page). At what place in your list will you have $0$? I say that at precisely this place you will have 1 in your diagonal number constructed. The same must go for $3, 5, 6, 7, 9 \dots$ – Michael Chen Apr 26 '11 at 04:30
  • 4
    @b01024: You should take a look at the theory of ordinals numbers (http://en.wikipedia.org/wiki/Ordinal_number). When you say "all powers of two first, increasing, then the rest of them", this can be made precise using ordinals, but the ordinal you get is not that of the natural numbers. To have a "list" in the sense of an enumeration to prove countability, the list has to be in bijection to the natural numbers; you can't have an infinite list of all powers of $2$ and then start over with other numbers; that doesn't assign the other numbers any well-defined index in the list. – joriki Apr 26 '11 at 04:49
  • @Michael, @joriki: Cool, thanks for the advice and info! – usul Apr 26 '11 at 06:08
  • @ThomasAndrews. This Q from 2011 was edited today, which is why it appeared on my feed. Your comment exposes a fatal flaw in the posted answers (excluding the deleted ones). They do not explain (as you have) why it is impossible for the $n$th digit of the $n$th number to be $1$ for all sufficiently large $n$. – DanielWainfleet Sep 02 '18 at 09:02
  • What does this mean? "the string will become identically 0 after a certain point" I don't understand this argument – JobHunter69 Mar 17 '22 at 04:54
23

The reason is simply that natural numbers have a finite representation. (In set theory, Each one is a finite number of successions from 1, where the successor of n is n+1.) Your representation scheme essentially respects this, since for any natural number (which will be on the list), after some finite number of digits it becomes all zeros. Your diagonal element will either be one of these, and so on the list, or a sequence of ones and zeros which never 'zeros out'. This string is NOT a natural number; it corresponds to nothing in your representation scheme. The reason the diagonal argument works for real numbers is that they do not have a finite representation. In set theory they are represented as the limit of an infinite series.

Matt Phillips
  • 231
  • 1
  • 2
  • 4
    This here is the easiest way to understand the difference. Natural numbers are countable and reals are not because each natural number has, by definition, finitely many digits, but real numbers do not have this restriction. Thanks! – Ken Bellows Aug 01 '16 at 16:53
  • 2
    A number with infinite leading 1s is not a nature number. That explains it very nicely! – Xi Wei Dec 28 '19 at 00:32