* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Counting Infinite sets
Positional notation wikipedia , lookup
Mathematics of radio engineering wikipedia , lookup
Large numbers wikipedia , lookup
Principia Mathematica wikipedia , lookup
List of first-order theories wikipedia , lookup
History of the function concept wikipedia , lookup
Function (mathematics) wikipedia , lookup
Real number wikipedia , lookup
Non-standard analysis wikipedia , lookup
Halting problem wikipedia , lookup
Georg Cantor's first set theory article wikipedia , lookup
Proofs of Fermat's little theorem wikipedia , lookup
Turing's proof wikipedia , lookup
Register machine wikipedia , lookup
Elementary mathematics wikipedia , lookup
Naive set theory wikipedia , lookup
Counting Sets
Functions
• A function is called one-to-one if every
element of B is mapped to at most one
element of A.
a1
A
b1
a2
b2
a3
b3
b4
B
Functions
• A function is called onto if every element of B
is mapped to at least one element of A.
a1
A
b1
a2
b2
a3
b3
a4
B
Functions
• If a function is both one-to-one and onto then
every element of B is mapped to exactly one
element of A.
a1
A
b1
a2
b2
a3
b3
B
Counting sets
• Two sets A, B are of the same size if they have
an equal number of elements. We denote this
as |A| = |B|. There is an 1-1 and onto
function mapping each element of A to an
element of B iff |A| = |B|.
Counting infinite sets
• We say that two infinite sets A, B are of the
same size if there is an one to one and onto
function from A to B (or from B to A)
|A| = |B|
A
a1
b1
a2
b2
a3
…
b3
…
B
Countable Sets
• A set is countable if you can find an one to one and
onto correspondence with the natural numbers
(intuitively this means that it has the same size as the
natural numbers)
A
a
1
b
2
c
3
d
4
e
…
5
…
N
The set of the even numbers is
countable
• There is an one to one an onto function from
E (the even numbers) to N: f(n) = n/2
f
E
0
0
2
1
4
2
6
3
8
…
4
…
N
N x N is countable
(0,0)
(0,1)
(0,2)
(0,3)
(0,4) .
(1,0)
(1,1)
(1,2)
(1,3)
(1,4)
(2,0)
(2,1)
(2,2)
(2,3)
(2,4)
(3,0)
(3,1)
(3,2)
(3,3)
(3,4)
(4,0)
(4,1)
(4,2)
(4,3)
(4,4)
.
.
.
.
.
.
.
.
N x N is countable
0
1
8
9
24
3
2
7
10
23
4
5
6
11
22
15
14
13
12
21
16
17
18
19
20
.
.
.
.
.
.
.
.
.
Q is countable
0/0
0/1
0/2
0/3
0/4
1/0
1/1
1/2
1/3
1/4
2/0
2/1
2/2
2/3
2/4
3/0
3/1
3/2
3/3
3/4
4/0
4/1
4/2
4/3
4/4
.
.
.
.
.
.
.
.
.
Q is countable
0/0
0/1
0/2
0/3
0/4
1/0
1/1
1/2
1/3
1/4
2/0
2/1
2/2
2/3
2/4
3/0
3/1
3/2
3/3
3/4
4/0
4/1
4/2
4/3
4/4
.
.
.
.
.
.
.
.
.
Q is countable
.
0/1
1/1
1/2
2/1
3/1
4/1
.
.
.
1/3
.
.
1/4
2/3
3/2
3/4
4/3
.
.
.
Q is countable
.
0/1
0
1/1
1
1/2
3
2/1
2
7
3/1
4/1
8
.
.
.
1/3
4
.
.
1/4
11
2/3
5
6
3/2
10
3/4
4/3
9
.
.
.
Try it yourself
• The set Z of integers is countable
Try it yourself
• The set Z of integers is countable
The following function f: Z ⟶ N is 1-1 and onto
x0
2 x,
f ( x)
2 x 1, x 0
…
-4
-3
-2
-1
0
1
2
3
4
…
Try it yourself
• The set Z of integers is countable
The following function f: Z ⟶ N is 1-1 and onto
x0
2 x,
f ( x)
2 x 1, x 0
…
-4
7
-3
5
-2
3
-1
1
0
1
2
2
4
3
6
4
8
…
The set of Turing Machines is
countable
• Every Turing Machine can be given a unique
number in binary as follows:
– Give to the states a number: q0 is 1, q1 is 11 etc…
– Give to the symbols of the tape a unique number:
a is 1, b is 11, c is 111 etc…
– Assign 1 to L, 11 to R and 111 to S
– For each δ(q, a) = (q’, b, H) give the binary number
11…1011...1011…1011…1011…1
q
a
q’
b
H
where H is L, R or S.
The set of Turing Machines is
countable
• Every Turing Machine can be given a unique
number in binary as follows:
– To obtain the number of the machine combine
the number of the transitions together (separated
with 00).
– The number starts with q0 00 qf 00
• The number associated with the Turing
Machine M is denoted as <M>
Example
• The Turing Machine MP that computes the
Predicate
n =? 0
has the following number
<MP> = 100110010101101011
q0
□→□,R
qf
Uncountable Sets
• Countable sets are infinite.
• However there are some sets that are
considered “even larger”.
• There is no way to enumerate them.
Diagonalization
• Suppose that there is an enumeration of all
the elements of the uncountable set.
• Obtain a new element by changing the ith
place of the ith element.
• The new element is different than any other in
the list.
• The new element is not in the enumeration.
Contradiction!!!
The set of numbers in [0,1) is
uncountable
• Suppose that it was countable. An
enumeration would be the following:
n0 = 0.534103…
n1 = 0.920531…
n2 = 0.423327…
n3 = 0.832739…
n4 = 0.392098…
…
The set of numbers in [0,1) is
uncountable
• Create a new number n by adding 1 mod 10 to
the ith decimal digit of the (i-1)th number:
n0 = 0.534103…
n1 = 0.920531…
n2 = 0.423327…
n3 = 0.832739…
n4 = 0.392098…
…
n = 0.63480…
The set of numbers in [0,1) is
uncountable
• The number n is different than any other
number in the list.
n0 = 0.534103…
≠
0.63480…
n1 = 0.920531…
≠
0.63480…
n2 = 0.423327…
≠
0.63480…
n3 = 0.832739…
≠
0.63480…
n4 = 0.392098…
≠
0.63480…
…
n = 0.63480…
The set of numbers in [0,1) is
uncountable
• Since n is a number in [0,1) it should be in the
enumeration.
• Suppose that n = ni.
• This can’t be true because n and ni differ in
the (i+1)th decimal digit.
Contradiction!
There is no possible enumeration for the
numbers in [0,1), which means that:
The set of numbers in [0,1) is uncountable.
R is uncountable
The set of real numbers contains the set [0,1).
Thus it is uncountable.
The set of predicates is not countable
Suppose that it was. An enumeration of all the
predicate would be the following:
p0
p1
p2
p3
…
The set of predicates is not countable
Suppose that it was. An enumeration of all the
predicate would be the following:
p0
p1
p2
p3
…
pi(0) pi(1) pi(2) pi(3) …
0
0
1
0
0
1
0
0
1
0
1
0
0
1
1
1
…
…
…
…
The set of predicates is not countable
Construct a predicate p as follows: Change the 0 with 1
and vice versa in pi(i) [ p(i) = 1-pi(i) ]
p0
p1
p2
p3
…
p
pi(0) pi(1) pi(2) pi(3) …
0
0
1
0 …
0
1
0
0 …
1
0
1
0 …
0
1
1
1 …
…
…
…
…
1
0
0
0 …
The set of predicates is not countable
Predicate p is not in the list since p(i) is different than
pi(i) for every i.
p0
p1
p2
p3
…
p
pi(0) pi(1) pi(2) pi(3) …
0
0
1
0 …
0
1
0
0 …
1
0
1
0 …
0
1
1
1 …
…
…
…
…
1
0
0
0 …
Try it yourself
• Is the set of functions from N to {0,1,2}
countable? Why?
Try it yourself
• Is the set of functions from N to {0,1,2}
countable? Why?
No. The set of functions from N to {0,1,2}
contains the set of predicates.
Can you prove this by using diagonalization?
Not all predicates are computable
1. Turing Machines are countable
2. Predicates are uncountable
Thus there is a predicate for which there is no
Turing Machine that decides it.