Download 2.5-updated - WordPress.com

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Vincent's theorem wikipedia , lookup

Theorem wikipedia , lookup

Positional notation wikipedia , lookup

Law of large numbers wikipedia , lookup

Large numbers wikipedia , lookup

Brouwer–Hilbert controversy wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Collatz conjecture wikipedia , lookup

Multiset wikipedia , lookup

Non-standard analysis wikipedia , lookup

Infinitesimal wikipedia , lookup

List of first-order theories wikipedia , lookup

Fundamental theorem of algebra wikipedia , lookup

Elementary mathematics wikipedia , lookup

Addition wikipedia , lookup

Non-standard calculus wikipedia , lookup

Real number wikipedia , lookup

Hyperreal number wikipedia , lookup

Georg Cantor's first set theory article wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Infinity wikipedia , lookup

Transcript
Section 2.5
Section Summary
 Cardinality
 Countable Sets
 Computability
Cardinality
Definition
A set S is finite with cardinality n  N if there is a
bijection from the set {0, 1, …, n1} to S. A set is infinite
if it is not finite.
Theorem
The set N of natural numbers is an infinite set.
Proof
Consider the injection f : N  N defined as f(x) = 3x.
The range of f is a subset of the domain of f.
3
Some facts which could easily be seen are:
1. If S is infinite and is a subset of S, S is infinite.
2. Every subset of a finite set is finite.
3. If f : S  T be an injection and S is infinite, then T is
infinite.
4. If S is an infinite set P(S) is infinite.
5. If S and T are infinite sets. S  T is infinite.
6. If S is infinite and T  , then S  T is infinite.
7. If S is infinite and T  , the set of functions from T
to S is infinite.
4
Definition
The sets A and B have the same cardinality if and only if
there is a one-to-one correspondence from A to B.
When A and B have the same cardinality, we write
|A| = |B|.
For infinite sets the definition of cardinality provides a
relative measure of the sizes of two sets, rather than a
measure of the size of one particular set. We can also
define what it means for one set to have a smaller
cardinality than another set.
5
Cardinality
 If there is a one-to-one function (i.e., an injection)
from A to B, the cardinality of A is less than or the
same as the cardinality of B and we write |A| ≤ |B|.
 When |A| ≤ |B| and A and B have different cardinality,
we say that the cardinality of A is less than the
cardinality of B and write |A| < |B|, (there exists an
injection but no bijection from A to B).
Countable Sets
 Definition: A set that is either finite or has the same
cardinality as the set of positive integers (Z+) is called
countable. A set that is not countable is uncountable.
 When an infinite set is countable (countably infinite)
its cardinality is ℵ0 (where ℵ is aleph, the 1st letter of
the Hebrew alphabet). We write |S| = ℵ0 and say that S
has cardinality “aleph null.”
 The set of real numbers R is an uncountable set.
Showing that a Set is Countable
 An infinite set is countable if and only if it is possible
to list the elements of the set in a sequence (indexed
by the positive integers) – an enumeration without
repetitions.
 The reason for this is that a one-to-one
correspondence f from the set of positive integers to a
set S can be expressed in terms of a sequence
a1,a2,…, an ,… where a1 = f(1), a2 = f(2),…, an = f(n),…
Hilbert’s Grand Hotel
David Hilbert
The Grand Hotel (example due to David Hilbert) has countably infinite number of
rooms, each occupied by a guest. We can always accommodate a new guest at this
hotel. How is this possible?
Explanation: Because the rooms of Grand
Hotel are countable, we can list them as Room
1, Room 2, Room 3, and so on. When a new
guest arrives, we move the guest in Room 1 to
Room 2, the guest in Room 2 to Room 3, and
in general the guest in Room n to Room n + 1,
for all positive integers n. This frees up Room
1, which we assign to the new guest, and all
the current guests still have rooms.
The hotel can also accommodate a
countable number of new guests, all the
guests on a countable number of buses
where each bus contains a countable
number of guests (see exercises).
Showing that a Set is Countable
Example 1: Show that the set of positive even integers E is
countable set.
Solution: Let f(x) = 2x.
1 2 3 4 5 6 …..
2 4 6 8 10 12 ……
Then f is a bijection from Z+ to E since f is both one-to-one
and onto. To show that it is one-to-one, suppose that
f(n) = f(m). Then 2n = 2m, and so n = m. To see that it is
onto, suppose that t is an even positive integer. Then
t = 2k for some positive integer k and f(k) = t.
Showing that a Set is Countable
Example 2: Show that the set of integers Z is
countable.
Solution: Can list in a sequence:
0, 1, − 1, 2, − 2, 3, − 3 ,………..
Or can define a bijection from N to Z:
 When n is even:
 When n is odd:
f(n) = n/2
f(n) = −(n−1)/2
The Positive Rational Numbers are
Countable
 Definition: A rational number can be expressed as the
ratio of two integers p and q such that q ≠ 0.
 ¾ is a rational number
 √2 is not a rational number.
Example 3: Show that the positive rational numbers
are countable.
Solution:The positive rational numbers are countable
since they can be arranged in a sequence:
r1 , r2 , r3 ,…
The next slide shows how this is done.
→
The Positive Rational Numbers are
Countable
First row q = 1.
Second row q = 2.
etc.
Constructing the List
First list p/q with p + q = 2.
Next list p/q with p + q = 3
And so on.
1, ½, 2, 3, 1/3,1/4, 2/3, ….
Strings are countable
Example 4: Show that the set of strings * over a finite
alphabet  is countably infinite.
Assume an alphabetical ordering of symbols in 
Solution: Show that the strings can be listed in a
sequence. First list
All the strings of length 0 in alphabetical order.
2. Then all the strings of length 1 in lexicographic (as in a
dictionary) order.
3. Then all the strings of length 2 in lexicographic order.
4. And so on.
1.
This implies a bijection from Z+ to S and hence it is a
countably infinite set.
Example
Let  = {a, b}. The set of strings * over  is a countably infinite set. An
enumeration  of * is possible. (1) = , the empty string. Assuming a comes
before b in , (2) = a and (3) = b. (4) to (7) are strings of length 2 and so on.
What is the 50th string in the sequence?
(1) – string of length 0
(2)  (3) – string of length 1
(4)  (7)  string of length 2
(8)  (15) – string of length 3
(16)  (31)  string of length 4
(32)  (63)  string of length 5
Hence the 50th string is of length 5. Among these (32) to (47) begin with a and
(48) to (63) begin with b.
(48) = b a a a a
(49) = b a a a b
(50) = b a a b a
Hence the 50th string in the sequence is b a a b a.
15
The set of all Java programs is
countable.
Example 5: Show that the set of all Java programs is countable.
Solution: Let S be the set of strings constructed from the
characters which can appear in a Java program. Use the ordering
from the previous example. Take each string in turn:
 Feed the string into a Java compiler. (A Java compiler will determine
if the input program is a syntactically correct Java program.)
 If the compiler says YES, this is a syntactically correct Java program,
we add the program to the list.
 We move on to the next string.
In this way we construct an implied bijection from Z+ to the set
of Java programs. Hence, the set of Java programs is countable.
Georg Cantor
(1845-1918)
The Real Numbers are Uncountable
Example: Show that the set of real numbers is uncountable.
Solution: The method is called the Cantor diagnalization argument, and is a proof by
contradiction.
1.
Suppose R is countable. Then the real numbers between 0 and 1 are also countable
(any subset of a countable set is countable - an exercise in the text).
2.
The real numbers between 0 and 1 can be listed in order r1 , r2 , r3 ,… .
3.
Let the decimal representation of this listing be
4.
5.
6.
Form a new real number with the decimal expansion
where
r is not equal to any of the r1 , r2 , r3 ,... Because it differs from ri in its ith position after
the decimal point. Therefore there is a real number between 0 and 1 that is not on the
list since every real number has a unique decimal expansion. Hence, all the real
numbers between 0 and 1 cannot be listed, so the set of real numbers between 0 and 1
is uncountable.
Since a set with an uncountable subset is uncountable (an exercise), the set of real
numbers is uncountable.
Results about Cardinality
Schröder-Bernstein Theorem
If A and B are sets with |A| ≤ |B| and |B| ≤ |A|, then
|A|=|B| . In other words, if there are one-to-one
functions f from A to B, and g from B to A, then there is a
one-to-one correspondence between A and B.
18
Theorem
Every infinite set contains a countably infinite subset.
Proof
Let S be an infinite set. Select a sequence of elements
<a0, a1, …> from S as follows:
Select a0 from S
Select a1 from S  {a0}
Select a2 from S  {a0, a1}
and so on. ai will be selected from S – {a0, a1, …, ai−1}.
Each S – {a0, …, ai} is infinite.
Otherwise (S – {a0, …, ai})  {a0, …, ai} = S will be finite.
This set {a0, …, ai,…} is countably infinite subset of S.
19
Theorem
The union of a countable collection of countable sets is countable.
Proof
Let S0, S1, S2, … be a countable collection of countable sets and
each Si = <ai0, ai1, ai2, …>
Enumerate the elements as shown in
S0 :
(a00 a01 a02 a03 …)
the diagram.
Let b0, b1, … be the sequence of
S1 :
(a10 a11 a12 a13 …)
elements.
b0 = a00, b1 = a01, b2 = a10
b3 = a02, b4 = a11, b5 = a20 and so on.
S2 :
(a20 a21 a22 a23 …)
This is an  enumeration of the
Si and hence
elements of 
i 0

S3 :
(a30 a31 a32 a33 …)
 Si is countable.
i 0
20

Theorem
Let  be a finite alphabet and * the set of all strings over
. Then P(*) is uncountable.
Proof
Let <x0, x1, x2, …> be an enumeration of strings in * and
if possible let <A0, A1, …> be an enumeration of the sets
in P(*). Construct a binary matrix M as follows.
x0
x1
x2
…
A0
a00
a01
a02
…
A1
a10
a11
a12
…
A2
a20
a21
a22
…




21
Cont Proof
aij = 1 if xj  Ai and aij = 0 if xj  Ai. Now we construct a set A
as follows xi  A if aii = 0. i.e., xi  Ai, A = {xi  A | xi  Ai,
i  N}
Now we can see that A cannot be any Aj and hence cannot
appear in the enumeration <A0, A1, …> even though
A  P(*). This is seen by the following contradiction.
Suppose if possible let A = Aj.
A consists of strings xj such that ajj = 0. So if xj  A, then
ajj = 0 and by the way we constructed the matrix M, if ajj = 0,
xj  Aj. Hence A  Aj. Hence we cannot have an enumeration
of the sets in P(*) and so P(*) is an uncountable set.
22
Theorem
If S is an infinite set, then ℵ0  |S|.
Proof
Case 1: S is countable: Trivial, since we know |S|= ℵ0 from definition
Case 2: S is uncountable We have already seen that if S is infinite, then S
contains a countably infinite subset S. Since the mapping f defined as
f : S  S where f(x) = x for all x  S
is an injection from S to S, we conclude that |S|  |S|. |S| = ℵ0.
Hence ℵ 0  |S|.
This leads us to the famous continuum hypothesis, which asserts that
there is no cardinal number between ℵ0 and c. In other words, the
continuum hypothesis states that there is no set A such that ℵ0, the
cardinality of the set of positive integers, is less than |A| and |A| is less
than c, the cardinality of real numbers.
23
Theorem
Let S be a set. Then |S| < |P(S)|.
Proof
Consider the injection f : S P(S) defined as f(a) = {a} for all
a  S. Since we have such an injection
|S|  |P(S)|.
Next we show |S|  |P(S)|. Let g be an arbitrary function
from S to P(S). We can show that g is not surjective and
hence not bijective.
The function g maps each element of S to a subset of S. An
element x may or may not be in the subset defined by g(x).
Now let us define a subset A of S as follows:
24
A = {x | x  g(x)}
A is a subset of S and hence A  P(S).
We show that for no a in S, g(a) = A.
Suppose for some a, g(a) = A, then
a  A  a  {x | x  g(x)}
 a  g(a)
aA
and we arrive at a contradiction and the assumption that g(a) = A
for some a in S is not correct. It follows that g is not surjective and
hence not bijective. We have chosen g arbitrarily and hence we can
conclude that no bijection exists from S to P(S) and therefore
|S|  |P(S)|.
25
Hence |S| < |P (S)|.
Using the above result, we see that we have an infinite
hierarchy of uncountable set S. i.e., infinite sequence of
cardinal numbers, each of which is smaller than the next
in the sequence.
ℵ0 = |N| < |P(N)| < |P (P(N))| < 
26
Computability (Optional)
 Definition: We say that a function is computable if
there is a computer program in some programming
language that finds the values of this function. If a
function is not computable we say it is
uncomputable.
 There are uncomputable functions. We have shown
that the set of Java programs is countable. Exercise 38
in the text shows that there are uncountably many
different functions from a particular countably infinite
set (i.e., the positive integers) to itself. Therefore
(Exercise 39) there must be uncomputable functions.