Homework 10 solutions. Which of the following are countable ...

306 downloads 6367 Views 34KB Size Report
A \ B, where A is uncountable and B ⊂ A is countable. 5. The set of all finite subsets of N. The set S1 of all functions from {0,1} → N is countable. Proof. To show ...
Homework 10 solutions. Which of the following are countable? Justify your answers. 1. The set of all functions from {0, 1} → N. 2. The set of all functions f : N → {0, 1}. 3. The set of all functions f : N → {0, 1} such {n ∈ N : f (n) = 1} is finite (that is, the set of functions that are “eventually 0”). 4. A \ B, where A is uncountable and B ⊂ A is countable. 5. The set of all finite subsets of N. The set S1 of all functions from {0, 1} → N is countable. Proof. To show this, we define a mapping g from S1 to N × N and show the mapping is a bijection. Let f ∈ §1 , that is f is a function from {0, 1} → N. Define g(f ) = (f (0), f (1)). To show g is surjective: let (a, b) ∈ N × N. Then fa,b : {0, 1} → N defined by fa,b (0) = a and fa,b (1) = b satisfies g(f ) = (a, b). To show g is injective: if g(f1 ) = g(f2 ), then f1 (0) = f2 (0), and f1 (1) = f2 (1), so f1 = f2 . Since |N × N| = |N|, and we have now checked |S1 | = |N × N|, |S1 | = |N|. The set S2 of all functions from N → {0, 1} is uncountable. Proof. We use Cantor’s diagonal argument. Suppose S2 were countable. Enumerate S2 = {f1 , f2 , ...}; by assumption, every element in S2 is in this list. Define f : N → {0, 1} by  0 if fn (n) = 1 f (n) = 1 if fn (n) = 0. Then f 6= fn for any n, because f differs from fn in the nth position; thus the enumeration of the functions could not have been a complete list. The set S3 of all functions {f : N → {0, 1} such that {n ∈ N : f (n) = 1} is finite} is countable. 1

Proof. We write S3 as the union of a countable number of finite sets. Let Ai = {f : N → {0, 1} s.t. f (n) = 0 ∀ n > i}. Then S3 =

∞ [

Ai .

i=1

To see this, first we show that if f ∈ S3 , ∃i such that f ∈ Ai . If f ∈ S3 , then by definition, there are only a finite number of m such that f (m) = 1; pick i to be the largest such m. Then f (j) 6= 1 if j > i, which means f ∈ Ai ; this means ∞ [ Ai . S3 ⊆ i=1

On the other hand, Ai by definition is a subset of S3 , and so ∞ [

Ai ⊆ S3 .

i=1 ∞ This means S3 = ∪∞ i=1 Ai (we did not actually need equality, S3 ⊆ ∪i=1 Ai would have sufficed for the proof of the countability of S3 ). Each Ai is finite with cardinality 2i , so S3 is countable union of finite sets, so is countable.

If A is uncountable, and B is countable, then A − B is uncountable. Proof. A = (A − B) ∪ B, so if A − B were countable, then A would be the countable union of countable sets, and so would also be countable. The set S5 of finite subsets of N is countable. Proof. Again we use the fact that a countable union of countable sets is countable. Define Ai to be the set of subsets of N with at most i elements. We need to prove that Ai is countable for all i ∈ N, and that S5 =

∞ [

Ai .

i=1

To show Ai is countable, we can define a mapping i

}| { z g : Ai → N × N × ... × N 2

by setting, for any a ⊂ N such that |a| = i g(a) = (a1 , a2 , ..., ai ); here, a1 is the smallest element of a, a2 is the next smallest element of a, and ai is the largest element of a. This is an injection, because if g(x) = g(y), then the smallest element of x is the same as the smallest element of y, the second smallest element of x is the same as the second smallest element of y, and so on, for each of the i elements of x and y. Thus x = y, as they consist of the same elements. Thus Ai has the same cardinality as a subset i }| { z of N × N × ... × N, which is countable because a finite Cartesian product of countable sets is countable, so Ai is countable. Now to show that ∞ [ Ai . S5 = i=1

If s ∈ S5 , there is some number m such that |s| = m. Then s ∈ Am , and so S5 ⊆

∞ [

Ai .

i=1

On the other hand, each Ai consists of finite subsets of N, so ∞ [

Ai ⊆ S5 ,

i=1

so the two sets are equal. As before, we did not actually need equality, S5 ⊆ ∪ ∞ i=1 Ai would have sufficed for the proof of the countability of S5 .

3