## CSCI 2824 Lecture 19In this lecture we will talk about: Cantor's Diagonalization Argument: No one-to-one correspondence between a set and its powerset. Degrees of infinity: Countable and Uncountable Sets.
Countable Sets: Natural Numbers, Integers, Rationals, Java Programs (!!) Uncountable Sets: Real Numbers, Functions over naturals,… What all this means for computers.
## Comparing sizes using correspondencesAs mentioned last class, we note the following fact that holds for finite sets and we will assume to be the definition for infinite set. Comparing Cardinalities using one-to-one correspondences
Two sets have the same cardinality if and only if there is a one-to-one correspondence . ## Example-1Let us say that a chef needs to make sure she has enough dinnerware for her guests. She does not need to count plates, knives, forks and so on. All she needs to do is to arrange the plates, knives, forks and so on along side each other neatly to see if there is a one-to-one correspondence. ## Example-2We established a one-to-one correspondence between natural numbers and odd numbers. . We can do the same for the set of integers and the natural numbers. ## Example-3Let us now establish a one-to-one correspondence between natural numbers and the set . We just need to line up elements of and just like our chef does to knives and forks. ## Cantor's Diagonalization ArgumentWe will now prove that no set can have the same cardinality as its power set.
## ProofWe will prove by contradiction by assuming that such a correspondence exists between and its power set . Suppose there is a one-to-one and onto function . We note that . We can represent by the following table.
Each row represents the set and for every , a “1” entry in (i,j) says that . A “0” entry says that . We will now prove that is not onto by constructing such that for all . In other words, the set we construct will not be mapped onto. The idea is to construct so that we go down the table and “spoil” each as follows: Take a look at diagonal entries in the table for all . If entry (i,i) has a 1 in it we make sure that . If it has a zero in it, we add .
We now claim that for all . Suppose it were, we know that either (1) or (2) . If then we know that . Therefore, . If then . Again, once again .
By making sure that the set we construct disagrees with all , we establish that the function cannot be onto. Therefore, the natural numbers cannot have the same cardinality as . In fact, we have established an argument to say that by showing that any function cannot be onto.
This can be proved by extending the “diagonalization” argument to arbitrary sets . Proof
Suppose, for the sake of contradiction, is a one-to-one correspondence. We will contradict by construction a set such that no maps onto to . For every , we consider the question if . If yes, we set . Otherwise, . . Since is a one-to-one and onto function, for some . Is ? If yes, then therefore by construction, . If not, then and therefore, by our construction. Either way, we get a contradiction. ## Countable and Uncountable SetsCountable Sets
A set is countable if it can be placed in one-to-one correspondence with the natural numbers. A set is uncountable if it can be placed in one-to-one correspondence with a set such as (or in general, any set known not to be in one-to-one correspondence with ). ## Cantor-Schroeder-Bernstein TheoremWe will use the following important lemma to make the process of establishing one-to-one correspondences easier.
The proof for finite sets is easy. Since exists, we conclude that . On the other hand, from the existence of we conclude that . Combining, we conclude that . For finite sets, this is enough to show that a one-to-one correspondence function also exists. ## Real Numbers
One-to-one function between and . One-to-one function between and .
One-to-one Function
Let us first write down the function . The basic idea is that we take any number with the decimal expansion
and have a set of the form that describes the decimal expansion. A
tuple in says that the position has the number in it. However, . So we do a second
trick called Therefore the One-to-one function constructs the decimal expansion for a given input and derives the set . Next it Godel numbers the elements of to give a set . Onto Function
Let us now take care of the one-to-one function between and . Take a set . is a set of natural numbers say . We construct a number in binary of the form where the position after the fixed point has a if and a otherwise. We can verify in class that this gives a one-to-one mapping from to reals . Here is the flaw in the construction: the function is How can we fix this flaw? Simple, instead of binary, we interpret the number in decimal. We have to be a perfectly valid decimal number that is not the same as . Therefore, to fix the proof, we just interpret the number in decimal as opposed to binary. Since we have one-to-one mapping both ways, we conclude from CSB theorem that there is some one-to-one correspondences. In other words, . ## Rational NumbersWe show that the set of rational numbers is countable. By showing a one-to-one correspondence between and . Using CSB theorem, we instead show a one to one function and a function . As a clarification, we note that rational numbers are numbers of the form where . There are many representations for a rational number. Eg., all represent the same element of q. We will use the lowest terms representations where do not have prime factors in common. Let us first derive the map . Given a rational number in its lowest terms, we simply say . This map has to be one-to-one (it is not onto, but we do not need that since we are using CSB theorem).
The proof is very simple, can you try? We now define the map as .
Therefore . Therefore, , or and (since and are relatively prime numbers). |