Chapter 4 : Sizes of Sets
Total Page:16
File Type:pdf, Size:1020Kb
Dr.AbhijitDas,Dept.ofComputerScience&Engg IndianInstitute of Technology, Kharagpur, India Chapter 4 : Sizes of sets In this chapter, we deal with the concept of how large a set is. The biggest implication of this study in Computer Science is the fact that computers cannot solve all problems. This is one the most fundamental realizations underlying the theory of computation. 4.1 The notion of size The size or cardinality of a set is the number of elements in it. The size of a set A is denoted by |A|. The notation |A| < ∞ implies that A is a finite set. A finite set with n elements can be listed as {a1, a2,...,an}, where ai is the i-th element of A for i = 1, 2,...,n. The simplest example of an infinite set is the set N = {1, 2, 3,...} of natural numbers. Consider the set Nn = {1, 2,...,n}. For every n ∈ N the set Nn is finite. However, their union N = n∈N Nn is not a finite set. Nonetheless, we can count the elements of N as 1, 2, 3,...,n,... This countingS never stops, but every n ∈ N, however large, is eventually covered in the counting process. Two sets are called equinumerous, if they have the same size. For finite sets, this concept is easy to visualize. We run into trouble when we work with infinite sets. Clearly, no infinite set can be equinumerous with a finite set. What is more important is that two infinite sets need not be equinumerous. We will soon see that the set Z of all integers (positive, negative and zero) and the set Q of rational numbers are equinumerous with N. That is surprising, since N is a strict subset of Z and can be easily visualized to be embedded inside Q (identify the natural number n with the rational number n/1). Since Z is equinumerous with N, we can also count or enumerate the elements of Z, so that for every n ∈ N we can identify an integer an as the n-th integer. For example, we may order the elements of Z as 0, 1, −1, 2, −2, 3, −3,...,n, −n,... Thus 0 is the first integer in the counting process, 1 is the second integer, −1 the third integer, 2 the fourth integer, and so on. It is clear that every m ∈ Z, positive, negative, or zero, is eventually covered in the counting process. The set R of all real numbers is not equinumerous with N. In fact, R contains more elements than N (or Z or Q). This implies that if we start counting real numbers as above and allow the counting process to continue ad inifinitum, we cannot exhaust the list of all real numbers. In other words, whatever way we count real numbers, we are sure to miss out some real number(s) in the counting process. It is now time to make the concept of size mathematically concrete. We use the theory of functions to that effect. Since we will be dealing mostly with infinite sets, it is imperative that the reader is already quite comfortable with the concept of injective, surjective and bijective functions among infinite sets. 4.2 Comparing the sizes of two sets Let A, B be two sets. We say that |A| 6 |B| if there exists an injective map f : A → B. This notion is intuitively clear, since for every element a ∈ A we can associate an element b = f(a) of B in such a fashion that two different elements of A are not associated with the same element of B. The map f essentially produces an embedding of A in B. So B cannot be of size smaller than the size of A. 4.1 Example (1) Let A ⊆ B. The canonical inclusion map ι : A → B taking a 7→ a is an injection, and so |A| 6 |B|. For example, N ⊆ Z and so |N| 6 |Z|. Also let Zodd (resp. Zeven) denote the set of all odd Chapter 4: Sizes of sets Page 2 of 10 (resp. even) integers. We have |Zodd| 6 |Z| and |Zeven| 6 |Z|. Similarly, |Nodd| 6 |N| and |Neven| 6 |N| for natural numbers. (2) The canonical inclusion map Z → Q that takes a 7→ a/1 is an injection, and so |Z| 6 |Q|. Also Z is canonically embedded in R and so |Z| 6 |R|. Likewise, |Q| 6 |R|. (3) What is initially confusing about infinite sets is that even when A ⊆ B, there may exist an injective map B → A implying that |B| 6 |A|. As an example, consider the injection f : Z → N defined as f(0) = 1,f(1) = 2,f(−1) = 3,f(2) = 4,f(−2) = 5,...,f(n) = 2n,f(−n) = 2n + 1,... This implies |Z| 6 |N|. Two sets A, B are called equinumerous, denoted |A| = |B|, if |A| 6 |B| and |B| 6 |A|, or equivalently if there exist an injective map f : A → B and an injective map g : B → A. For example, we have proved that |N| 6 |Z| and |Z| 6 |N|. It follows that: |Z| = |N| , i.e., Z is of the same size as N. The inclusion function ι : N → Z is injective but not surjective, whereas the function of Part (3) of Example 4.1 is a bijection. We may indeed propose an injective but non-surjective function g : Z → N as g(0) = 1, g(1) = 2, g(−1) = 4, g(2) = 5, g(−2) = 7,...,g(n) = 3n − 1, g(−n)= 3n + 1,... , the image of which does not include the positive multiples of 3. It is natural to expect two sets A, B to be equinumerous if there exists a bijection h : A → B between them. Clearly, the existence of such a function implies |A| 6 |B| (h is injective) and |B| 6 |A| (h−1 is injective). The converse of this is not immediately clear, i.e., the existence of injective functions f : A → B and g : B → A does not immediately imply the existence of a bijection h : A → B. This is, however, true, as is proved now. 4.2 Theorem [Cantor-Schroder-Bernstein¨ theorem] Two sets A, B are equinumerous if and only if there exists a bijection h : A → B between them. Proof [If] Obvious. [Only if] Let f : A → B and g : B → A be injections. We need to construct a bijection h : A → B. To that effect we construct a subset S of A and define h as f(x) if x ∈ S, h(x)= g−1(x) if x∈ / S. The construction of the subset S is quite tricky. If g is surjective, g−1 is already a bijection A → B, and we take S = ∅. So we assume that g is not surjective. The function g, surjective or not, yields a bijection g−1 : g(B) → B. The elements of A \ g(B) lie outside the domain of g−1. So h needs to use f in order to map elements of A \ g(B) and we start with S0 = A \ g(B). −1 Now suppose that there is an element x ∈ S0 for which f(x) = g (y) for some element y ∈ g(B) (i.e., y∈ / S0). We have already defined h(x) = f(x) since x ∈ S0. Since h is going to be injective, we cannot define h(y)= g−1(y), i.e., we must define h(y)= f(y). Notice that y = g(g−1(y)) = g(f(x)) = (g◦f)(x) with x ∈ S0. It follows that h needs to use f for mapping elements of S1 = (g ◦ f)(S0). Dept.ofComputerScience&Engg IndianInstituteofTechnology, Kharagpur, India Chapter 4: Sizes of sets Page 3 of 10 −1 Now take x ∈ S1. There exists y ∈ A, y∈ / S0 ∪ S1, such that f(x) = g (y). Since we have already taken h(x) = f(x), we must define h(y) = f(y), i.e., we must use f in order to define h on elements of S2 = (g ◦ f)(S1). Proceeding in this way we define Sk inductively as: 0 S0 = A \ g(B) = (g ◦ f) (A \ g(B)), k Sk = (g ◦ f)(Sk−1) = (g ◦ f) (A \ g(B)) for k > 1. Finally, we take: k S = Sk = (g ◦ f) (A \ g(B)). k[>0 k[>0 I now formally establish that this construction works, i.e., h defined as above with respect to this S is indeed a bijection. First notice that S ⊇ S0 = A \ g(B), so that A \ S ⊆ g(B), that is, h(x) is defined for every x∈ / S. It is also defined for every x ∈ S, i.e., h is well-defined. Claim: h is injective. Suppose that h(x) = h(y) for some x,y ∈ A. If both x,y ∈ S, then x = y by the injectivity of f. If both x,y ∈ A\S, then the injectivity of g−1 implies x = y. So assume that one of x,y is in S, the other in A\S. Suppose x ∈ S and y∈ / S. By definition of S we have x ∈ Sk for some k > 0. Also since y∈ / S, we have −1 y ∈ g(B). Therefore, y = g(g (y)) = g(h(y)) = g(h(x)) = g(f(x)) = (g ◦ f)(x), i.e., y ∈ Sk+1, i.e., y ∈ S, a contradiction. So it is not possible to have x ∈ S and y∈ / S. Claim: h is surjective. Take an arbitrary b ∈ B. We need to produce an a ∈ A for which h(a) = b.