CS 207m: Discrete Structures (Minor)
Instructor : S. Akshay
Jan 17, 2018
Lecture 04 – Countable and uncountable sets
Chapter 2: Basic mathematical structures
Sets and Functions
I Finite and infinite sets, Russell’s paradox, axioms of ZFC.
I Functions, their properties, associativity, inverse.
I Types of functions: surjective, injective and bijective.
I Two sets have the same “size” or cardinality if there is a bijection between them.
Today’s class
I Countable and countably infinite sets.
I A new proof technique.
Chapter 2: Basic mathematical structures
Sets and Functions
I Finite and infinite sets, Russell’s paradox, axioms of ZFC.
I Functions, their properties, associativity, inverse.
I Types of functions: surjective, injective and bijective.
I Two sets have the same “size” or cardinality if there is a bijection between them.
Today’s class
I Countable and countably infinite sets.
I A new proof technique.
Recap: properties of functions on finite and infinite sets
Some important properties (H.W.: Prove them!)
I ∃ bij fromA toB and B toC, implies ∃bij from A toC.
I ∃ bij fromA toB, implies ∃bij from B toA.
I ∃ inj fromA toB, implies ∃surj from B toA(&
vice-versa)
I Schr¨oder-Bernstein Theorem: ∃ surjfrom A toB and∃ surj B toA, implies ∃bij from AtoB.
Theorem
LetA be a set andb6∈A. Then Ais infinite iff there is a bijection fromA toA∪ {b}.
Corollary
For any infinite setA, there is a surjection from A toN. Is there also a injection? Are all (infinite) sets bijective toN?
Recap: properties of functions on finite and infinite sets
Some important properties (H.W.: Prove them!)
I ∃ bij fromA toB and B toC, implies ∃bij from A toC.
I ∃ bij fromA toB, implies ∃bij from B toA.
I ∃ inj fromA toB, implies ∃surj from B toA(&
vice-versa)
I Schr¨oder-Bernstein Theorem: ∃ surjfrom A toB and∃ surj B toA, implies ∃bij from AtoB.
Theorem
LetA be a set andb6∈A. Then Ais infinite iff there is a bijection fromA toA∪ {b}.
Corollary
For any infinite setA, there is a surjection from A toN. Is there also a injection? Are all (infinite) sets bijective toN?
Recap: properties of functions on finite and infinite sets
Some important properties (H.W.: Prove them!)
I ∃ bij fromA toB and B toC, implies ∃bij from A toC.
I ∃ bij fromA toB, implies ∃bij from B toA.
I ∃ inj fromA toB, implies ∃surj from B toA(&
vice-versa)
I Schr¨oder-Bernstein Theorem: ∃ surjfrom A toB and∃ surj B toA, implies ∃bij from AtoB.
Theorem
LetA be a set andb6∈A. Then Ais infinite iff there is a bijection fromA toA∪ {b}.
Is there also a injection? Are all (infinite) sets bijective toN?
Recap: properties of functions on finite and infinite sets
Some important properties (H.W.: Prove them!)
I ∃ bij fromA toB and B toC, implies ∃bij from A toC.
I ∃ bij fromA toB, implies ∃bij from B toA.
I ∃ inj fromA toB, implies ∃surj from B toA(&
vice-versa)
I Schr¨oder-Bernstein Theorem: ∃ surjfrom A toB and∃ surj B toA, implies ∃bij from AtoB.
Theorem
LetA be a set andb6∈A. Then Ais infinite iff there is a bijection fromA toA∪ {b}.
Corollary
For any infinite setA, there is a surjection from A toN.
Comparing infinite sets using functions
Theorem
There is a bijection fromZ toN.
Proof: Hilbert’s hotel argument. But how do you formalize it?
f(x) =
−2x ifx≤0 2x−1 else
Some questions...
I Is there a bijection between N×N toN?
I Is there a bijection between N×N×N toN?
I Is there a bijection from QtoN?
I Is there a bijection from the set of all subsets ofN toN?
I Is there a bijection from RtoN?
Comparing infinite sets using functions
Theorem
There is a bijection fromZ toN.
Proof: Hilbert’s hotel argument. But how do you formalize it?
f(x) =
−2x ifx≤0 2x−1 else
Some questions...
I Is there a bijection between N×N toN?
I Is there a bijection between N×N×N toN?
I Is there a bijection from QtoN?
I Is there a bijection from the set of all subsets ofN toN?
I Is there a bijection from RtoN?
Comparing infinite sets using functions
Theorem
There is a bijection fromZ toN.
Proof: Hilbert’s hotel argument. But how do you formalize it?
f(x) =
−2x ifx≤0 2x−1 else
Some questions...
I Is there a bijection between N×N toN?
I Is there a bijection between N×N×NtoN?
I Is there a bijection from QtoN?
I Is there a bijection from the set of all subsets ofN toN?
Countable and countably infinite sets
Definition
I For a given set C, if there is a bijection from C toN, then C is calledcountably infinite.
I A set is countableif it is finite or countably infinite.
Examples: even numbers, number of horses,...
By previous corollary (∃ surj from any infinite set to N) Countably infinite sets are the “smallest” infinite sets.
What are the other properties of countable sets?
Countable and countably infinite sets
Definition
I For a given set C, if there is a bijection from C toN, then C is calledcountably infinite.
I A set is countableif it is finite or countably infinite.
Examples: even numbers, number of horses,...
By previous corollary (∃ surj from any infinite set to N) Countably infinite sets are the “smallest” infinite sets.
What are the other properties of countable sets?
Some questions...
Are the following sets countable?
That is, is there a bijection from these sets toN?
I the set of all integers Z
I N×N
I N×N×N
I the set of rationals Q
I the set of all (finite and infinite) subsets ofN
I the set of all real numbersR
To show these it suffices to show that
I there is aninjection from these sets to N
I or there is asurjectionfrom N(or any countable set) to these sets.
Some questions...
Are the following sets countable?
That is, is there a bijection from these sets toN?
I the set of all integers Z
I N×N
I N×N×N
I the set of rationals Q
I the set of all (finite and infinite) subsets ofN
I the set of all real numbersR To show these it suffices to show that
I there is aninjection from these sets to N
I or there is asurjectionfrom N(or any countable set) to these sets.
Some questions...
Are the following sets countable?
That is, is there a bijection from these sets toN?
I the set of all integers Z
I N×N
I N×N×N
I the set of rationals Q
I the set of all (finite and infinite) subsets ofN
I the set of all real numbersR To show these it suffices to show that
I there is aninjection from these sets to N
I or there is asurjectionfrom N(or any countable set) to these sets.
Union of countable sets is countable
LetA={a0, . . . ,} be a countably infinite set andB be a set.
Then,isA∪B countable, under the following conditions?
1. B ={b0}is a singleton 2. B ={b0, . . . , bn} is a finite set
3. B ={b0, . . .} is a countably infinite set
Can we say {a0, . . . , b0, . . .} is a countably infinite set?
I But then what is the positionof bi (i.e., natural number corresponding to it)?
I Rather, choose {a0, b0, a1, b1, . . .}, thenbi is at (2i+ 1)th position.
I Formally, define a bijection f : (A∪B)→N byf(ai) = 2i and f(bi) = 2i+ 1
I Are we done? What is missing?
Union of countable sets is countable
LetA={a0, . . . ,} be a countably infinite set andB be a set.
Then,isA∪B countable, under the following conditions?
1. B ={b0}is a singleton 2. B ={b0, . . . , bn} is a finite set
3. B ={b0, . . .} is a countably infinite set
Can we say {a0, . . . , b0, . . .} is a countably infinite set?
I But then what is the positionof bi (i.e., natural number corresponding to it)?
I Rather, choose {a0, b0, a1, b1, . . .}, thenbi is at (2i+ 1)th position.
I Formally, define a bijection f : (A∪B)→N byf(ai) = 2i and f(bi) = 2i+ 1
I Are we done? What is missing?
Union of countable sets is countable
LetA={a0, . . . ,} be a countably infinite set andB be a set.
Then,isA∪B countable, under the following conditions?
1. B ={b0}is a singleton 2. B ={b0, . . . , bn} is a finite set
3. B ={b0, . . .} is a countably infinite set
Can we say {a0, . . . , b0, . . .} is a countably infinite set?
I But then what is the positionof bi (i.e., natural number corresponding to it)?
I Rather, choose {a0, b0, a1, b1, . . .}, thenbi is at (2i+ 1)th position.
I Formally, define a bijection f : (A∪B)→N byf(ai) = 2i and f(bi) = 2i+ 1
I Are we done? What is missing?
Union of countable sets is countable
LetA={a0, . . . ,} be a countably infinite set andB be a set.
Then,isA∪B countable, under the following conditions?
1. B ={b0}is a singleton 2. B ={b0, . . . , bn} is a finite set
3. B ={b0, . . .} is a countably infinite set
Can we say {a0, . . . , b0, . . .} is a countably infinite set?
I But then what is the positionof bi (i.e., natural number corresponding to it)?
I Rather, choose {a0, b0, a1, b1, . . .}, thenbi is at (2i+ 1)th position.
I Formally, define a bijection f : (A∪B)→N byf(ai) = 2i and f(bi) = 2i+ 1
I Are we done? What is missing?
Union of countable sets is countable
LetA={a0, . . . ,} be a countably infinite set andB be a set.
Then,isA∪B countable, under the following conditions?
1. B ={b0}is a singleton 2. B ={b0, . . . , bn} is a finite set
3. B ={b0, . . .} is a countably infinite set
Can we say {a0, . . . , b0, . . .} is a countably infinite set?
I But then what is the positionof bi (i.e., natural number corresponding to it)?
I Rather, choose {a0, b0, a1, b1, . . .}, thenbi is at (2i+ 1)th position.
I Formally, define a bijection f : (A∪B)→N byf(ai) = 2i
I Are we done? What is missing?
Union of countable sets is countable
LetA={a0, . . . ,} be a countably infinite set andB be a set.
Then,isA∪B countable, under the following conditions?
1. B ={b0}is a singleton 2. B ={b0, . . . , bn} is a finite set
3. B ={b0, . . .} is a countably infinite set
Can we say {a0, . . . , b0, . . .} is a countably infinite set?
I But then what is the positionof bi (i.e., natural number corresponding to it)?
I Rather, choose {a0, b0, a1, b1, . . .}, thenbi is at (2i+ 1)th position.
I Formally, define a bijection f : (A∪B)→N byf(ai) = 2i and f(bi) = 2i+ 1
I Are we done? What is missing?
Products of countable sets are countable
Theorem: The cartesian product of two countably infinite sets is countably infinite
Proof: LetA, B be countably infinite. Find a way to “number”
the elements inA×B ={(a, b)|a∈A, b∈B}.
I That is, define a bijection from A×B toN.
f(ai, bj) =
i+j
X
k=1
k
+j+ 1
Corollaries
I N×N,N×N×N,N×Z×Nare countable.
I The set of (positive) rationals is countable.
Hint: Show thatf(a, b) =a/bis a surjection. How does the result follow?
Products of countable sets are countable
Theorem: The cartesian product of two countably infinite sets is countably infinite
Proof: LetA, B be countably infinite. Find a way to “number”
the elements inA×B ={(a, b)|a∈A, b∈B}.
I That is, define a bijection from A×B toN.
f(ai, bj) =
i+j
X
k=1
k
+j+ 1
Corollaries
I N×N,N×N×N,N×Z×Nare countable.
I The set of (positive) rationals is countable.
Hint: Show thatf(a, b) =a/bis a surjection. How does the result follow?
Products of countable sets are countable
Theorem: The cartesian product of two countably infinite sets is countably infinite
Proof: LetA, B be countably infinite. Find a way to “number”
the elements inA×B ={(a, b)|a∈A, b∈B}.
I That is, define a bijection from A×B toN.
f(ai, bj) =
i+j
X
k=1
k
+j+ 1
Corollaries
I N×N,N×N×N,N×Z×Nare countable.
I The set of (positive) rationals is countable.
Hint: Show thatf(a, b) =a/bis a surjection. How does the result follow?
Products of countable sets are countable
Theorem: The cartesian product of two countably infinite sets is countably infinite
Proof: LetA, B be countably infinite. Find a way to “number”
the elements inA×B ={(a, b)|a∈A, b∈B}.
I That is, define a bijection from A×B toN.
f(ai, bj) =
i+j
X
k=1
k
+j+ 1
Corollaries
I N×N,N×N×N,N×Z×Nare countable.
I The set of (positive) rationals is countable.
Hint: Show thatf(a, b) =a/bis a surjection. How does the result follow?
Products of countable sets are countable
Theorem: The cartesian product of two countably infinite sets is countably infinite
Proof: LetA, B be countably infinite. Find a way to “number”
the elements inA×B ={(a, b)|a∈A, b∈B}.
I That is, define a bijection from A×B toN.
f(ai, bj) =
i+j
X
k=1
k
+j+ 1
Corollaries
I N×N,N×N×N,N×Z×Nare countable.
I The set of (positive) rationals is countable.
Countable sets and functions
Are the following sets countable?
I the set of all integers Z
I N×N
I N×N×N
I the set of rationals Q
I the set of all (finite and infinite) subsets ofN
I the set of all real numbersR
Comparing N and set of all subsets of N
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN.
Comparing N and set of all subsets of N
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN.
I Proving existence just needs one to exhibit a function
I But how do we prove non-existence?
Comparing N and set of all subsets of N
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN.
I Proving existence just needs one to exhibit a function
I But how do we prove non-existence? Try contradiction.
Comparing N and set of all subsets of N
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN. Proof by contradiction: Suppose there is such a bijection, sayf. This would imply that eachi∈N maps to some setf(i)⊆N.
0 1 2 3 . . .
f(0) X × × × . . .
f(1) X × X X . . .
f(2) × × × × . . .
f(3) × X × X . . .
Comparing N and set of all subsets of N
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN. Proof by contradiction: Suppose there is such a bijection, sayf. This would imply that eachi∈N maps to some setf(i)⊆N.
0 1 2 3 . . .
f(0) X/× × × × . . . f(1) X ×/X X X . . . f(2) × × ×/X × . . . f(3) × X × X/× . . .
I Consider the setS ⊆Nobtained by switching the diagonal
Comparing N and set of all subsets of N
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN. Proof by contradiction: Suppose there is such a bijection, sayf. This would imply that eachi∈N maps to some setf(i)⊆N.
0 1 2 3 . . .
f(0) X/× × × × . . . f(1) X ×/X X X . . . f(2) × × ×/X × . . . f(3) × X × X/× . . .
I Consider the setS ⊆Nobtained by switching the diagonal elements, i.e., S={i∈N|i6∈f(i)}.
I Asf is bij,∃j∈N, f(j) =S.
Comparing N and set of all subsets of N
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN. Proof by contradiction: Suppose there is such a bijection, sayf. This would imply that eachi∈N maps to some setf(i)⊆N.
0 1 2 3 . . .
f(0) X/× × × × . . . f(1) X ×/X X X . . . f(2) × × ×/X × . . . f(3) × X × X/× . . .
I Consider the setS ⊆Nobtained by switching the diagonal
Comparing N and set of all subsets of N
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN.
Proof by contradiction: Suppose there is such a bijection, sayf. This would imply that eachi∈N maps to some setf(i)⊆N.
0 1 2 3 . . .
f(0) X/× × × × . . . f(1) X ×/X X X . . . f(2) × × ×/X × . . . f(3) × X × X/× . . .
I Consider the setS ⊆Nobtained by switching the diagonal elements, i.e., S={i∈N|i6∈f(i)}.
I Asf is bij,∃j∈N, f(j) =S.
I S andf(j) differ at position j, for anyj.
Cantor’s diagonalization
Does this proof look familiar??
Cantor’s diagonalization
Does this proof look familiar??
Figure:Cantor and Russell
Cantor’s diagonalization
Does this proof look familiar??
Figure:Cantor and Russell
I S ={i∈N|i6∈f(i)} is like the one from Russell’s paradox.
Cantor’s diagonalization
Does this proof look familiar??
Figure:Cantor and Russell
I S ={i∈N|i6∈f(i)} is like the one from Russell’s paradox.
I If ∃j∈Nsuch that f(j) =S, then we have a contradiction.
I Ifj∈S, thenj 6∈f(j) =S.
Cantor’s diagonalization
Does this proof look familiar??
Figure:Cantor and Russell
In fact, using diagonalization Cantor showed that...
I There cannot be a bijection between any set and its power set (i.e., its set of subsets).(H.W)
Cantor’s diagonalization
Does this proof look familiar??
Figure:Cantor and Russell
In fact, using diagonalization Cantor showed that...
I There cannot be a bijection between any set and its power set (i.e., its set of subsets).(H.W)
I So there is an infinite hierarchy of “larger” infinities...
I There is no bijection fromR toN(H.W). Moreover, there
Cantor’s diagonalization
Does this proof look familiar??
Figure:Cantor and Russell
In fact, using diagonalization Cantor showed that...
I There cannot be a bijection between any set and its power set (i.e., its set of subsets).(H.W)
I So there is an infinite hierarchy of “larger” infinities...
One infinity is “strictly” bigger than another!
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN.
I But, there is a surjection from set of all subsets ofN toN.
I Thus, the “size” ofP(N) is strictly greater that N! Can there be some set whose “size” is in between the two? Cantor’s Continuum hypothesis
There is no set whose “cardinality” is strictly betweenNand P(N) (i.e., between naturals and reals).
Figure:1st of Hilbert’s 23 problems for the 20th century in 1900.
One infinity is “strictly” bigger than another!
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN.
I But, there is a surjection from set of all subsets ofN toN.
I Thus, the “size” ofP(N) is strictly greater that N!
Can there be some set whose “size” is in between the two? Cantor’s Continuum hypothesis
There is no set whose “cardinality” is strictly betweenNand P(N) (i.e., between naturals and reals).
Figure:1st of Hilbert’s 23 problems for the 20th century in 1900.
One infinity is “strictly” bigger than another!
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN.
I But, there is a surjection from set of all subsets ofN toN.
I Thus, the “size” ofP(N) is strictly greater that N!
Can there be some set whose “size” is in between the two?
Cantor’s Continuum hypothesis
There is no set whose “cardinality” is strictly betweenNand P(N) (i.e., between naturals and reals).
Figure:1st of Hilbert’s 23 problems for the 20th century in 1900.
One infinity is “strictly” bigger than another!
Theorem (Cantor, 1891)
There is no bijection betweenNand the set of all subsets ofN.
I But, there is a surjection from set of all subsets ofN toN.
I Thus, the “size” ofP(N) is strictly greater that N!
Can there be some set whose “size” is in between the two?
Cantor’s Continuum hypothesis
There is no set whose “cardinality” is strictly betweenNand P(N) (i.e., between naturals and reals).
What did the world think about these proofs
(in 1890s?)(a)Kronecker (b)Poincare (c)Theologians
I Kronecker: Only constructive proofs are proofs! “Scientific Charlatan”, “Corruptor of youth”!
I Poincare: Set theory is a “disease” from which mathematics will be cured.
I Christian Theologians: God=Uniqueness of an absolute infinity. So, what is all this different infinities...?!
I Hilbert: No one can expel us from the paradise that Cantor has created for us.
What did the world think about these proofs
(in 1890s?)(a)Kronecker (b)Poincare (c)Theologians
I Kronecker: Only constructive proofs are proofs! “Scientific Charlatan”, “Corruptor of youth”!
I Poincare: Set theory is a “disease” from which mathematics will be cured.
I Christian Theologians: God=Uniqueness of an absolute