Cantor's diagonal argument: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Jitse Niesen
(you need either S \subset N or S \in 2^N, but not S \subset 2^N; the domain of phi is N)
imported>Aleksander Stos
(added informal idea; in the formal section phi_i was not defined. Changed \Phi to F (as it was easily confused with \phi))
Line 1: Line 1:
Cantor's diagonal method provides a convenient proof that the set <math>2^{\mathbb{N}}</math> of subsets of the [[natural number]]s (also known as its [[power set]] is not countable. More generally, it is a recurring theme in [[computability]] theory, where perhaps its most well known application is the negative solution to the [[halting problem]].
'''Cantor's diagonal argument''' provides a convenient proof that the set <math>2^{\mathbb{N}}</math> of subsets of the [[natural number]]s (also known as its [[power set]] is not [[countable set|countable]]. More generally, it is a recurring theme in [[computability]] theory, where perhaps its most well known application is the negative solution to the [[halting problem]].


==The Argument==
==Informal description==
The original Cantor's idea was to show that the family of 0-1 infinite [[sequence]]s is not countable. This is done by contradiction. If this family is countable then its members can be enumerated or enlisted. Such a list gives a table of digits, like in the following arbitrarily chosen example:
:'''0''', 1, 0, 1, 0, ...
:1, '''1''', 1, 1, 0, ...
:1, 0, '''1''', 0, 0, ...
Now, we construct a sequence <math>s=(s_1,s_2,s_3,....)</math>, which is ''not'' on the list while still, <math>s_i\in\{0,1\}</math> for all ''i''. This is done as follows. Take <math>s_1</math> to be ''different'' from the first digit of the first member on the list. In our example the digit is 0 (in boldface) and so <math>s_1</math> is defined to be 1. Take <math>s_2</math> to be ''different'' from the second digit of the second member on the list (in our example <math>s_2=0</math>). Generally, define <math>s_n</math> as different from the n-th digit of the n-th entry on the list. In other words, the sequence ''s=(s_1,s_2,s_3,....)'' contains "the complement in <math>\{0,1\}</math>" of the diagonal of our table. It follows that that the sequence ''s'' itself is not on the list, since it is different from every member by the definition. The list was supposed to contain ''all'' the 0-1 sequences. The contradiction shows that such sequences can not be enumerated (or they are not countable).


To any set <math>S \subset \mathbb{N}</math> we may associate a function <math>\phi : \mathbb{N} \rightarrow \{0, 1\}</math> by setting <math>\phi(n) = 1</math> if <math>n \in S</math> and <math>\phi(n) = 0</math>, otherwise. Conversely, every such function defines a subset.  
The role of the diagonal clearly explains the name of the argument.  


If power set is countable, there is a bijective map <math>\Psi : \mathbb{N} \rightarrow 2^{\mathbb{N}}</math>, that allows us to assign an index <math>i = \Psi^{-1} (S)</math> to every subset S. Assuming this has been done, we proceed to construct a function <math>\psi : \mathbb{N} \rightarrow \{ 0, 1\}</math> such that the corresponding set, <math>T</math> cannot be in the range of <math>\Psi</math>.  
==Formal argument==
To prove that the family of all subsets of <math>\mathbb{N}</math> is not countable, we associate to any set <math>S \subset \mathbb{N}</math> a function <math>\phi : \mathbb{N} \rightarrow \{0, 1\}</math> by setting <math>\phi(n) = 1</math> if <math>n \in S</math> and <math>\phi(n) = 0</math>, otherwise. Conversely, every such function defines a subset. Observe also that every such function corresponds to a 0-1 sequence and vice-versa.  


For each <math>i</math>, either <math>\phi_i(i) = 0</math> or <math>\phi_i(i) = 1</math>, and so we may simply <math>\psi(i)</math> such that <math>\psi(i) \not= \phi_i(i)</math>.  
If power set is countable, there is a bijective map <math>F : \mathbb{N} \rightarrow 2^{\mathbb{N}}</math>, that allows us to assign an index <math>i = F^{-1} (S)</math> to every subset S. In other words, all the functions <math> \phi: \mathbb{N} \rightarrow \{0, 1\}</math> can be enumerated as <math>\{\phi_1, \phi_2, \phi_3, \ldots \}</math>. Assuming this has been done, we proceed to construct a function <math>\psi : \mathbb{N} \rightarrow \{ 0, 1\}</math> that is not in this list. Consequently, the corresponding set, <math>T</math> cannot be in the range of <math>F</math>.
 
For each <math>i</math>, either <math>\phi_i(i) = 0</math> or <math>\phi_i(i) = 1</math>, and so we define <math>\psi(i)=1-\phi_i(i)</math>. Clearly, <math>\psi(i)\in \{0,1\}</math> and <math>\psi(i) \not= \phi_i(i)</math>.


It follows that <math>\psi \not= \phi_i </math> for any <math>i</math>, and it must therefore correspond to a set not in the range of <math>\Psi</math>. This contradiction shows that <math>2^{\mathbb{N}}</math> cannot be countable.
It follows that <math>\psi \not= \phi_i </math> for any <math>i</math>, and it must therefore correspond to a set not in the range of <math>\Psi</math>. This contradiction shows that <math>2^{\mathbb{N}}</math> cannot be countable.

Revision as of 13:43, 31 March 2007

Cantor's diagonal argument provides a convenient proof that the set of subsets of the natural numbers (also known as its power set is not countable. More generally, it is a recurring theme in computability theory, where perhaps its most well known application is the negative solution to the halting problem.

Informal description

The original Cantor's idea was to show that the family of 0-1 infinite sequences is not countable. This is done by contradiction. If this family is countable then its members can be enumerated or enlisted. Such a list gives a table of digits, like in the following arbitrarily chosen example:

0, 1, 0, 1, 0, ...
1, 1, 1, 1, 0, ...
1, 0, 1, 0, 0, ...

Now, we construct a sequence , which is not on the list while still, for all i. This is done as follows. Take to be different from the first digit of the first member on the list. In our example the digit is 0 (in boldface) and so is defined to be 1. Take to be different from the second digit of the second member on the list (in our example ). Generally, define as different from the n-th digit of the n-th entry on the list. In other words, the sequence s=(s_1,s_2,s_3,....) contains "the complement in " of the diagonal of our table. It follows that that the sequence s itself is not on the list, since it is different from every member by the definition. The list was supposed to contain all the 0-1 sequences. The contradiction shows that such sequences can not be enumerated (or they are not countable).

The role of the diagonal clearly explains the name of the argument.

Formal argument

To prove that the family of all subsets of is not countable, we associate to any set a function by setting if and , otherwise. Conversely, every such function defines a subset. Observe also that every such function corresponds to a 0-1 sequence and vice-versa.

If power set is countable, there is a bijective map , that allows us to assign an index to every subset S. In other words, all the functions can be enumerated as . Assuming this has been done, we proceed to construct a function that is not in this list. Consequently, the corresponding set, cannot be in the range of .

For each , either or , and so we define . Clearly, and .

It follows that for any , and it must therefore correspond to a set not in the range of . This contradiction shows that cannot be countable.