15-251 great theoretical ideas in computer sciencearielpro/15251f15/slides/lec05.pdf · september...
TRANSCRIPT
![Page 1: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/1.jpg)
September 15th, 2015
15-251 Great Theoretical Ideas in Computer Science
Lecture 5:Cantor’s Legacy
![Page 2: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/2.jpg)
Poll
Select the ones that apply to you:
- I know what an uncountable set means.
- I know Cantor’s diagonalization argument.
- I used to know what uncountable meant, I forgot.
- I used to know the diagonalization argument, I forgot.
- I’ve never learned about uncountable sets.
- I’ve never learned about the diagonalization argument.
![Page 3: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/3.jpg)
Regular languages
Decidable languages
EvenLength...
Primality
0n1n
Factoring
...
?All languages
This Week
![Page 4: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/4.jpg)
Our heroes for this week
Uncountability Uncomputability
father of set theory father of computer science
1845-1918 1912-1954
![Page 5: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/5.jpg)
Infinity in mathematics
Pre-Cantor:
Post-Cantor:
“Infinity is nothing more than a figure of speech which helps us talk about limits. The notion of a completed infinity doesn't belong in mathematics”
- Carl Friedrich Gauss
Infinite sets are mathematical objects just like finite sets.
![Page 6: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/6.jpg)
Some of Cantor’s contributions
> The study of infinite sets
> Explicit definition and use of 1-to-1 correspondence
- This is the right way to compare the cardinality of sets
> There are different levels of infinity.
- There are infinitely many infinities.
> even though they are both infinite.|N| < |R|
> The diagonal argument.
> even though .|N| = |Z| N ( Z
![Page 7: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/7.jpg)
Reaction to Cantor’s ideas at the time
Most of the ideas of Cantorian set theoryshould be banished from mathematics
once and for all!
- Henri Poincaré
![Page 8: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/8.jpg)
Reaction to Cantor’s ideas at the time
I don’t know what predominates in Cantor’s theory -
philosophy or theology.
- Leopold Kronecker
![Page 9: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/9.jpg)
Reaction to Cantor’s ideas at the time
Scientific charlatan.
- Leopold Kronecker
![Page 10: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/10.jpg)
Reaction to Cantor’s ideas at the time
Corrupter of youth.
- Leopold Kronecker
![Page 11: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/11.jpg)
Reaction to Cantor’s ideas at the time
Wrong.
- Ludwig Wittgenstein
![Page 12: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/12.jpg)
Reaction to Cantor’s ideas at the time
Utter non-sense.
- Ludwig Wittgenstein
![Page 13: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/13.jpg)
Reaction to Cantor’s ideas at the time
Laughable.
- Ludwig Wittgenstein
![Page 14: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/14.jpg)
Reaction to Cantor’s ideas at the time
No one should expel us from the Paradisethat Cantor has created.
- David Hilbert
![Page 15: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/15.jpg)
Reaction to Cantor’s ideas at the time
If one person can see it as a paradise,why should not another see it as a joke?
- Ludwig Wittgenstein
![Page 16: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/16.jpg)
First we start with finite sets
![Page 17: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/17.jpg)
How do we count a finite set?
What does mean?
A = {apple, orange, banana, melon}
|A| = 4
There is a 1-to-1 correspondence (bijection) between
A {1, 2, 3, 4}and
apple
orange
banana
melon
1
2
3
4
![Page 18: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/18.jpg)
How do we compare the sizes of finite sets?
What does mean?
A = {apple, orange, banana, melon}B = {200, 300, 400, 500}
|A| = |B|
apple
orange
banana
melon
1
2
3
4
200
300
400
500
![Page 19: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/19.jpg)
What does mean?
How do we compare the sizes of finite sets?
A = {apple, orange, banana, melon}
apple
orange
banana
melon
B = {200, 300, 400, 500}
|A| = |B|
200
300
400
500
|A| = |B| iff there is a 1-to-1 correspondence (bijection) between and .A B
![Page 20: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/20.jpg)
What does mean?
How do we compare the sizes of finite sets?
B = {200, 300, 400, 500}
|A| |B|
A = {apple, orange, banana}
apple
orange
banana
1
2
3
4
200
300
400
500
![Page 21: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/21.jpg)
What does mean?
How do we compare the sizes of finite sets?
B = {200, 300, 400, 500}
|A| |B|
A = {apple, orange, banana}
apple
orange
banana
200
300
400
500
iff there is an injection from to .A B
|A| |B|
![Page 22: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/22.jpg)
What does mean?
How do we compare the sizes of finite sets?
B = {200, 300, 400, 500}
|A| |B|
A = {apple, orange, banana}
apple
orange
banana
200
300
400
500
iff there is a surjection from to .AB
|A| |B|
![Page 23: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/23.jpg)
3 important types of functionsA B
A B
A B
injective, 1-to-1
surjective, onto
bijective, 1-to-1 correspondence
a 6= a0 =) f(a) 6= f(a0)
f : A ! B is injective if A ,! B
A ⇣ B
A $ B
f : A ! B is surjective if
8b 2 B, 9a 2 A s.t. f(a) = b
f : A ! B is bijective if
f is injective and surjective
![Page 24: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/24.jpg)
Comparing the cardinality of finite setsA
A
A
B
B
B
A $ B
A ,! B
A ⇣ B
|A| |B|
|A| = |B|
|A| � |B|
![Page 25: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/25.jpg)
Sanity checks
If |A| |B| and |B| |C| then |A| |C|
A $ B i↵ A ,! B and A ⇣ B
A ,! B i↵ B ⇣ A
A $ B i↵ A ,! B and B ,! A
If A ,! B and B ,! C then A ,! C
|A| |B| i↵ |B| � |A|
|A| = |B| i↵ |A| |B| and |A| � |B|
![Page 26: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/26.jpg)
One more definition
|A| < |B|
There is an injection from A to B, but there is no bijection between A and B.
There is no injection from B to A.
There is no surjection from A to B.
|A| � |B|not
![Page 27: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/27.jpg)
These are the right definitionsfor infinite sets as well!
This way of comparing the size of setsgeneralizes to infinite sets!
So what is the big deal?
![Page 28: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/28.jpg)
Comparing the cardinality of infinite sets
A $ B
A ,! B
A ⇣ B
|A| |B|
|A| = |B|
|A| � |B|
![Page 29: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/29.jpg)
Sanity checks for infinite sets
|A| = |B| i↵ |A| |B| and |B| |A|
If |A| |B| and |B| |C| then |A| |C|
A $ B i↵ A ,! B and A ⇣ B
A ,! B i↵ B ⇣ A
A $ B i↵ A ,! B and B ,! A
If A ,! B and B ,! C then A ,! C
CantorSchröderBernstein
|A| |B| i↵ |B| � |A|
![Page 30: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/30.jpg)
Let me show you someinteresting consequences.
So what is the big deal?
![Page 31: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/31.jpg)
Examples of equal size sets
|N| = |Z|
N = {0, 1, 2, 3, 4, . . .}
Z = {. . . ,�4,�3,�2,�1, 0, 1, 2, 3, 4, . . .}
List the integers so that eventually every number is
0, 1,�1, 2,�2, 3,�3, 4,�4, . . .
0 1 2 3 4 5 6 7 8 . . .
f(n) = (�1)n+1ln2
m
![Page 32: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/32.jpg)
Examples of equal size sets
|N| = |Z|
Does this make any sense? N ( Z
A ( B =) |A| < |B|?
Does renaming the elements of a set change its size?
ZLet’s rename the elements of :
{. . . , banana, apple, melon, orange, mango, . . .}
Let’s call this set . F How can you justify saying ?|N| < |F |
Bijection is nothing more than renaming.
Shouldn’t |N| < |Z|?
No.
![Page 33: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/33.jpg)
Examples of equal size sets
f(n) = n2
N = {0, 1, 2, 3, 4, . . .}
|N| = |S|
S = {0, 1, 4, 9, 16, . . .}
![Page 34: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/34.jpg)
Examples of equal size sets
N = {0, 1, 2, 3, 4, . . .}
P = {2, 3, 5, 7, 11, . . .}
|N| = |P |
f(n) = n’th prime number.
![Page 35: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/35.jpg)
Definition: countable and uncountable sets
A |A| |N|
Definition:
A set is called countable if .
A set is called countably infinite if it is infinite and countable.
A
A set is called uncountable if it is not countable.A(so )|A| > |N|
![Page 36: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/36.jpg)
How to think about countable sets
A set is called countable if . A |A| |N|
So why is it called “countable”?
|A| |N| means there is an injection .f : A ! N
you could “count” the elements of A(but could go on forever)
1234
...
NA
5
1
2
3
![Page 37: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/37.jpg)
How to think about countable sets
Perhaps a better name would have been listable:
(this is equivalent to being countable)
can list the elements of so thatevery element appears in the list eventually.
A
a1 a2 a3 a4 a5 · · ·
A set is called countable if . A |A| |N|
![Page 38: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/38.jpg)
How to think about countable sets
This seems to imply that if is infinite, then . A
Is it possible that is infinite, but ? A |A| < |N|
|A| = |N|
A set is called countable if . A |A| |N|
Theorem:A set is countably infinite if and only if .A |A| = |N|
So if is countable, there are two options:A
2. |A| = |N|1. is finiteA
Exercise: prove the theorem
![Page 39: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/39.jpg)
Countable?
|N| = |Z⇥ Z|?
(0, 0)……
...
...
(0, 0)
(1, 0)
(1, 1)
(0, 1)
(�1, 1)
(�1, 0)
(�1,�1)
(0,�1)
(1,�1)
(2,�1)
(2, 0)
(2, 1)
(2, 2)
(1, 2)
(0, 2)...
![Page 40: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/40.jpg)
Countable?
|N| = |Q|?
0 1 2 3 4-1-2-3-4
Between any two rational numbers, there is another one.
Can we list them in the order they appear on the line?
=) |Q| |Z⇥ Z| = |N|
Any rational number can be written as a fraction .a
bZ⇥ Z ⇣ Q ( map to ) (a, b)
a
b
![Page 41: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/41.jpg)
Countable?
|N| = |{0, 1}⇤|?
{0, 1}⇤ = the set of finite length binary strings.
"
0
1
00, 01, 10, 11
000, 001, 010, 011, 100, 101, 110, 111
· · ·
![Page 42: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/42.jpg)
Countable?
= the set of finite length words over .
|N| = |⌃⇤|?
⌃⇤ ⌃
Same idea.
![Page 43: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/43.jpg)
Countable?
= the set of polynomials with rational coefficients.
|N| = |Q[x]|?
Q[x]
⌃ = {0, 1, . . . , 9, x,+,�, ⇤, /,̂ }Take
Every polynomial can be described by a finite stringover . ⌃
xˆ3� 1/4xˆ2 + 6x� 22/7e.g.
So ⌃⇤ ⇣ Q[x] i.e. |Q[x]| |⌃⇤|
e.g. x
3 � 1
4x
2 + 6x� 22
7
![Page 44: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/44.jpg)
The CS method for showing a set is countable
CS method to show a set is countable :A (|A| |N|)
i.e.
Show for some alphabet .|A| |⌃⇤|
⌃⇤ ⇣ A
⌃
i.e. Show that you can encode the elements ofusing finite length words over an alphabet .
A⌃
![Page 45: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/45.jpg)
Seems like every set is countable…
Nope!
![Page 46: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/46.jpg)
Cantor’s Theorem
P(S) = {;, {1}, {2}, {3}, {1, 2}, {2, 3}, {1, 3}, {1, 2, 3}}
S = {1, 2, 3}
P(S) $ {0, 1}|S| S = {1, 2, 3}1 10 ! {1, 3}0 0 0 ! ;
binary strings of length |S|
Theorem:
|A| < |P(A)|.
For any non-empty set A,
|P(S)| = 2|S|
![Page 47: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/47.jpg)
Cantor’s Theorem
So:
|N| < |P(N)|.
|N| < |P(N)| < |P(P(N))| < |P(P(P(N)))| < · · ·(an infinity of infinities)
Theorem:
|A| < |P(A)|.
For any non-empty set A,
P(N)I.e. is uncountable.
![Page 48: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/48.jpg)
Example 1234 ...
{3, 7, 9}{2, 5}{1, 2, 3}N ⇣ P(N)
Cantor’s Theorem - Proof by diagonalization
Assume for some set .|P(A)| |A| A
So . Let be such a surjection. A ⇣ P(A) f
Define S = {a 2 A : a /2 f(a)} 2 P(A).
Since is a surjection, s.t. .f 9s 2 A f(s) = S
But this leads to a contradiction:if then s 2 S s 62 f(s) = S
if then s /2 S
S = {1, 4, . . .}
Why is this called adiagonalization argument?
s S
Is ?s 2 S
s 2 f(s) = S
![Page 49: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/49.jpg)
Cantor’s Theorem - Proof by diagonalization
0 0 1 0 00 1 0 0 11 1 1 0 01 1 1 0 00 0 0 1 1
…
...
1 2 3 4 5
f(1)f(2)f(3)f(4)f(5)
…
...1 0 0 1 0 …
S is defined so thatS cannot equal any f(i)
Example 1234 ...
{3, 7, 9}{2, 5}{1, 2, 3}N ⇣ P(N) S = {1, 4, . . .}
Sf(s)=
![Page 50: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/50.jpg)
0000000000 …1111111111 …1010101010 …
...
Uncountable sets
Let be the set of binary strings of infinite length.{0, 1}1
because .{0, 1}1 $ P(N)
{0,1,2,3,4,5,6,7,8,9, … }
! {even natural numbers}
! ; ! N
(Recall is countable.){0, 1}⇤
{0, 1}1 is uncountable, i.e. |{0, 1}1| > |N|
(just like ) {0, 1}|S| $ P(S)
![Page 51: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/51.jpg)
Uncountable sets
Let be the set of binary strings of infinite length.{0, 1}1
1 0 0 1 0 …
12345
0 0 1 0 00 1 0 0 11 1 1 0 01 1 1 0 00 0 0 1 1
…
......
……
……
—> cannot appear in the list
Direct diagonal proof: Suppose |{0, 1}1| |N|N ⇣ {0, 1}1
{0, 1}1 is uncountable, i.e. |{0, 1}1| > |N|
![Page 52: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/52.jpg)
Uncountable sets
R is uncountable. In fact is uncountable.(0, 1)
exercise
Be careful:
0.4999999999… = 0.500000000…
![Page 53: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/53.jpg)
Appreciating the diagonalization argument
If you want to appreciate something,try to break it…
Exercise:Why doesn’t the diagonalization argument work for
N {0, 1}⇤, , a countable subset of ?{0, 1}1
![Page 54: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/54.jpg)
Uncountable sets
Let be the set of bijections from to .B N N
B is uncountable.
CS method to show a set is uncountable :A (|A| > |N|)
i.e.
Show |A| � |{0, 1}1|
A ⇣ {0, 1}1
i.e. Show that the elements of “encode” all the elements of .
A{0, 1}1
![Page 55: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/55.jpg)
One slide guide to countability questions
You are given a set .AIs it countable or uncountable?
|A| |N| |A| > |N|or ?
- show directly that or A ,! N N ⇣ A
- show , where |A| |B|B 2 {Z, Z⇥ Z, Q, ⌃⇤
, Q[x]}
|A| |N| :
|A| > |N| :
- show directly using a diagonalization argument
- show |A| � |{0, 1}1|
![Page 56: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/56.jpg)
An Interesting Question
Is there a set such that
|N| < |S| < |P(N)|?
S
Continuum Hypothesis:No such set exists.
(Hilbert’s 1st problem)
![Page 57: 15-251 Great Theoretical Ideas in Computer Sciencearielpro/15251f15/slides/lec05.pdf · September 15th, 2015 15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor’s](https://reader035.vdocument.in/reader035/viewer/2022070911/5faa92616150b77cfc698ff1/html5/thumbnails/57.jpg)
The story continues next lecture…