advertisement

Section 2.4 Countability We can compare the cardinality of two sets by properties of functions. • | A | = | B | means there is a bijection between A and B. • | A | ≤ | B | means there is an injection from A to B. • | A | < | B | means | A | ≤ | B | and | A | ≠ | B |. Example. Let A = {3x + 4 | x N and 0 ≤ 3x + 4 ≤ 1000}. What is | A |? Solution. Notice that 0 ≤ 3x + 4 ≤ 1000 iff –4/3 ≤ x ≤ 996/3 iff –4/3 ≤ x ≤ 332. So we can rewrite the definition of A = {3x + 4 | x N and 0 ≤ x ≤ 332}. Now we can define a function ƒ : {0, 1, …, 332} A by ƒ(x) = 3x + 4. Notice that ƒ is a bijection. So | A | = 333. A set S is countable if | S | = | Nn | for some n (i.e., S is finite) OR | S | = | N |. Otherwise S is uncountable. If | S | = | N | we sometimes say that S is countably infinite. Example. Z is countable. i.e., | Z | = | N |. To prove this we need to find a bijection between Z and N. Let ƒ : N Z be defined by ƒ(2k) = k and ƒ(2k + 1) = – (k + 1). Check that ƒ is a bijection. Some Countability Results 1. S N implies S is countable. 2. S is countable iff | S | ≤ | N |. 3. Subsets and images of countable sets are countable. 4. N N is countable. Use Cantor’s bijection to associate (x, y) with ((x + y)2 + 3x + y)/2. 5. If each of the sets S0, S1, …, Sn, … is countable, then so is S0 S1 … Sn … . 1 Example. Is N N N countable? Let Sn = {(x, y, z) N3 | x + y + z = n}. Each of sets S0, S1, …, Sn, … is countable (actually finite). So the union S0 S1 … Sn … is also countable. But the union is N3, so N3 is countable. Diagonalization Technique Given a countable listing of sequences S0, S1, …, Sn, …, where each sequence has the form Sn = (an0, an1, …, ann, …) where each ani A and | A | ≥ 2. Then there is a sequence over A that is not in the listing. A sequence S not in the listing can be defined by choosing two elements x, y A and letting S = (a0, a1, …, an, …) where an = if ann = x then y else x. Example. The set of languages over the alphabet {a} is uncountable. Proof: Assume, BWOC, that L0, L1, …, Ln, …, is a countable listing of all languages over {a}. We can represent each language Ln by a sequence Sn over {0, 1} as follows: Sn = (an0, an1, …, ann, …), where ani = if ai Ln then 1 else 0. But now the Diagonlization technique applies to tell us there is a sequence not listed. So there is a language that is not listed. So the set of languages is uncountable. QED. Cantor’s Result: | A | < | power(A) | for any set A. Example. Power(N) is uncountable because | N | < | power(N) |. Example. The closed interval [0, 1] is uncountable. Show that | [0, 1] | = | power(N) |. We can represent each x [0, 1] as a binary string 0.b0b1b2… . Then associate x with the set Sx = {i | bi = 1}. e.g., 0.10101010… is associated with the set {0, 2, 4, 6, …}. This association is a bijection between [0, 1] and power(N). 2