Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Diagonalization Fact: Many books exist. Fact: Some books contain the titles of other books within them. Fact: Some books contain their own titles within.

Similar presentations


Presentation on theme: "1 Diagonalization Fact: Many books exist. Fact: Some books contain the titles of other books within them. Fact: Some books contain their own titles within."— Presentation transcript:

1 1 Diagonalization Fact: Many books exist. Fact: Some books contain the titles of other books within them. Fact: Some books contain their own titles within them. Consider the following book with title The Special Book. The Special Book is defined to be a book that contains the titles of all books that do not contain their own titles. Question: Does the special book exist? Could one write the special book? A similar contradiction is known as The Barber of Seville Paradox.

2 2 Diagonalization Definition: P(N) is the set of all subsets of N. P(N) = { {}, {0}, {0, 1}, {1, 2, 3}, {2, 5, 9, 13},…} Theorem: P(N) is uncountable. Proof: (by contradiction) Suppose that P(N) is countable. Then by definition it is either finite or countably infinite. Clearly, it is not finite, therefore it must be countably infinite. By definition, since it is countably infinite it has the same cardinality as N (the natural numbers) and, by definition, there is a bijection from N to P(N).

3 3 f: N => P(N) 0 => N 0, 1 => N 1, 2 => N 2, …*f is “onto” so every set in P(N) is in this list. Consider the following table: 0123 … N 0 d 0 0 d 0 1 d 0 2 d 0 3 N 1 d 1 0 d 1 1 d 1 2 d 1 3 N 2 d 2 0 d 2 1 d 2 2 d 2 3 : d i j = *The table is a 2 dimensional bit vector.

4 4 Consider/define the set D such that for each j >= 0: if and only if (*) Note that D is represented by the complement of the diagonal. Observations: –D is a subset of N –Since N 0, N 1, N 2, … is a list of all the subsets of N, it follows that D = N i (**), for some i >= 0. Question: Is ? –By definition of D given in *, if and only if –But D = N i by **, and substitution gives if and only if A contradiction. Hence, P(N) is uncountable.

5 5 Diagonalization Theorem: The real numbers are uncountable. Proof: (by contradiction) Let R denote the set of all real numbers, and suppose that R is countable. Then by definition it is either finite or countably infinite. Clearly, it is not finite, therefore it must be countably infinite. By definition, since it is countably infinite it has the same cardinality as N (the natural numbers) and, by definition, there is a bijection from N to R.

6 6 f: N => R 0 => r 0, 1 => r 1, 2 => r 2, …*f is “onto” so every real number is in this list. Consider the following table: 0123 … r 0 d 0 0 d 0 1 d 0 2 d 0 3 r 1 d 1 0 d 1 1 d 1 2 d 1 3 r 2 d 2 0 d 2 1 d 2 2 d 2 3 : where r i = x i.d i 0 d i 1 d i 2 … d i m … (padded with zeros to the right) *The table is a 2 dimensional vector of digits.

7 7 Consider/define the real number: y = 0.y 0 y 1 y 2 …(infinite) where: y i = (d i i +1) mod 10for all i>=0(*) Observations: –y is a real number –Since r 0, r 1, r 2, … is a list of all real numbers, it follows that y must be in this list, i.e., y = r j, for some j>=0. –This means that y = r j = 0.d j 0 d j 1 d j 2 … d j j-1 d j j d j j+1 … (from the table) –This also means that y i = d j i, for all i>=0, and, in particular, that: y j = d j j But by *: y j = (d j j +1) mod 10 a contradiction. Therefore, no such one-to-one and onto function exists, and therefore the real numbers are uncountable. So, real numbers with 0 as the integer part is uncountably infinite. Similarly, reals with 1 as the integer part in uncounatbly infinite, and so on.


Download ppt "1 Diagonalization Fact: Many books exist. Fact: Some books contain the titles of other books within them. Fact: Some books contain their own titles within."

Similar presentations


Ads by Google