1 lecture 3 (part 3) functions – cardinality reading: epp chp 7.6

37
1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

Upload: joleen-margaret-shepherd

Post on 13-Jan-2016

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

1

Lecture 3 (part 3)

Functions – CardinalityReading: Epp Chp 7.6

Page 2: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

2

Outline

1. Cardinal Numbers

2. Equality of Cardinal Numbers

3. Definition: Finite sets, Countably Infinite sets, Uncountable sets.

4. Countable/Uncountable sets – theorems

5. Summary

Page 3: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

3

1. Cardinal Numbers

Definition (Cardinal Number): Let S be any set. – Informally speaking, |S| denotes the

number of elements in the set S. – Formally speaking, |S| is the cardinal

number of the set.

Page 4: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

4

1. Cardinal Numbers

Examples:– Cardinal Numbers of finite sets:

• |{}| = 0• |{a}| = 1• |{{{a}}}}| = 1• |{a,b,c}| = 3

– We will deal with cardinal numbers of infinite sets…

Page 5: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

5

1. Cardinal Numbers

Note:– When you think of the number of elements in the

set, you tend to think of ‘1,2,3,…’, and if you can’t give a number, you just say ‘infinite’.

– DO NOT BRING this restricted idea of ‘number’ in here.

– A Cardinal Number is a descriptive numerical object, generalized to include ALL SORTS OF SETS – FINITE OR INFINITE. In particular, cardinals describe ‘how many elements’ in INFINITE sets as well. As such it describes how infinite the set is.

– So a ‘cardinal number’ is a more generalized definition of a ‘number’ as you have been taught in your previous math education.

Page 6: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

6

2. Equality of Cardinal Numbers

Since cardinal numbers refer also particularly to infinite sets, we must define what it means for two sets (finite or infinite) to have the same cardinal number (hence same number of elements).

Page 7: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

7

2. Equality of Cardinal Numbers

Definition (Equality of Cardinal numbers):– Set A has-the-same-cardinality-as and B iff

there is a bijective function (1-1 correspondence) from A to B.

– We write |A| |B|.

NOTE: it makes no difference whether A and B are finite or infinite,… our definition requires you to find a bijective function!

Page 8: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

8

2. Equality of Cardinal Numbers

Theorem:– ( is reflexive): For all sets A, |A| |A|– ( is symmetric): For all sets A, B,

if |A| |B|, then |B| |A|– ( is transitive): For all sets A, B, C,

if |A| |B| and |B| |C|, then |A| |C|

Page 9: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

9

2. Equality of Cardinal Numbers

Proof:– ( is reflexive): For all sets A, |A| |A|

• Is there a bijective function from A to A?

• Yes, idA, the identity function on A is a bijection from A to A.

– ( is symmetric): For all sets A, B, if |A| |B|, then |B| |A|

• Assume that there is a bijection f from A to B.• Then f-1 is a function from B to A, and is also a

bijection (proven in last lecture 9.4.2, 9.4.3).• So there is a bijection from B to A, and so |B|

|A|

Page 10: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

10

2. Equality of Cardinal Numbers

Proof:– ( is transitive): For all sets A, B, C,

if |A| |B| and |B| |C|, then |A| |C|

• Assume that |A| |B| and |B| |C|.• Therefore there is a bijection f from A to B and

there is a bijection g from B to C.• Therefore g o f is a bijection from A to C.

(Theorem 9.4.1 last lecture).• Therefore |A| |C|

Page 11: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

11

2. Equality of Cardinal Numbers

Definition:– Since is an equivalence relation, we can

make the following definition:– Sets A and B have the same cardinality iff

either A has-the-same-cardinality-as B or B has-the-same-cardinality-as A.

– We can now write |A| = |B|

– There’s a slight subtle difference. The earlier definition ‘A has-the-same-cardinality-as B’ is a relation of the form A R B., of which we, at that point in time, have not proven that R is an equivalence relation.

Page 12: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

12

3. Definition: Countability

Definition:– A sets S is finite iff it is empty, or if there is

a natural number n such that S and {1,2,…,n} have the same cardinality.

– A set is infinite iff it is not finite.– A set S is countably infinite iff |S||Z+|.– A set S is countable iff it is finite, or

countably infinite.– A set is uncountable iff it is not countable.

Page 13: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

13

3. Countability

finite infinite

countable Countably infinite

uncountable

Page 14: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

14

4 Countable/Uncountable sets

Theorem 4.1: Z is countable

Proof: (By definition of ‘countable’), we need to show: |Z||Z+| Which means (by definition of ‘’), we need to show that there

exists a bijection from Z to Z+ (or vice versa, since we know that if f is a bijection, then the inverse is also a bijection).

Define f : Z+Z such thatn/2 if n is an even integer

f(n) =

-(n-1)/2 if n is an odd integer1

2

4

6

7

5

3

0

1

2

3

-3

-2

-1

Page 15: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

15

4 Countable/Uncountable sets

Theorem 4.1: Z is countable

Is f injective? (Prove using the definition)– Assume f(a)=f(b) = kZ

• Case 1: k1– Then f(a)=a/2 and f(b)=b/2.– Since f(a)=f(b), so a/2=b/2. Meaning that a=b.

• Case 2: k1– Then f(a)=-(a-1)/2 and f(b)=-(b-1)/2.– Since f(a)=f(b), so -(a-1)/2=-(b-1)/2. Meaning that a=b.

– In either case, a=b

Define f : Z+Z such thatn/2 if n is an even integer

f(n) =

-(n-1)/2 if n is an odd integer

Page 16: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

16

4 Countable/Uncountable sets

Theorem 4.1: Z is countable

Is f surjective? (Prove using the definition)– Pick any kZ. Is there a f(?)=k

• Case 1: k1– Then f(2k)=k

• Case 2: k1– Then f(-2k+1)=k

– In either case, we can find an element in the domain that maps to the codomain.

Define f : Z+Z such thatn/2 if n is an even integer

f(n) =

-(n-1)/2 if n is an odd integer

Page 17: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

17

4 Countable/Uncountable sets

Theorem 4.1: Z is countable

We have proven that f is a bijection. Let’s pause for a moment to consider this propositoin

that we have just proven. Z is infinite. Z+ is infinite. Which is more infinite? Most would answer intuitively that Z contains more

elements than Z+. But your intuition must be in subjection to logic. And logic tells you that they both contain the same

amount of elements: |Z||Z+| (We can also write: |Z| = |Z+| )

Page 18: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

18

4 Countable/Uncountable sets

Theorem 4.2: The set of all even integers (denoted as 2Z) is countable.

Proof: (By definition of ‘countable’), we need to show: |2Z||Z+| Which means (by definition of ‘’), we need to show that

there exists a bijection from 2Z to Z+ (or vice versa).

Define f : Z2Z such that f(n) = 2n

0

2

4

6

-6

-4

-2

0

1

2

3

-3

-2

-1

Now, f is a bijection from Z to 2Z. Which means that |2Z||Z| But we have also shown that |Z||Z+|. So |2Z||Z+| (Since is transitive)

Page 19: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

19

4 Countable/Uncountable sets

Theorem 4.3: Q+ is countable!

“Wait a minute!!!” (some of you might say…) “You mean that Q+ contains the same amount of

elements as Z+ ???” “The set of rationals and the set of integers contain the

same number of elements?” “It seems obvious that rationals out-number the integers

right?” WRONG!!!

Page 20: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

20

4 Countable/Uncountable sets

Theorem 4.3: Q+ is countable!

Proof: (By definition of ‘countable’), we need to show: |Q+||Z+| We will give a bijection from Z+ to Q+.

f(1) = 1/1

f(2) = 1/2

f(3) = 2/1

f(4) = 3/1

1/1

2/1

3/1

4/1

5/1

6/1

1/2

2/2

3/2

4/2

5/2

6/2

1/3

2/3

3/3

4/3

5/3

6/3

1/4

2/4

3/4

4/4

5/4

6/4

1/5

2/5

3/5

4/5

5/5

6/5

1/6

2/6

3/6

4/6

5/6

6/6

Page 21: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

21

4 Countable/Uncountable sets

Theorem 4.3: Q+ is countable!

Proof: (By definition of ‘countable’), we need to show: |Q+||Z+| We will give a bijection from Z+ to Q+.

1/1

2/1

3/1

4/1

5/1

6/1

1/2

2/2

3/2

4/2

5/2

6/2

1/3

2/3

3/3

4/3

5/3

6/3

1/4

2/4

3/4

4/4

5/4

6/4

1/5

2/5

3/5

4/5

5/5

6/5

1/6

2/6

3/6

4/6

5/6

6/6

f(1) = 1/1

f(2) = 1/2

f(3) = 2/1

f(4) = 3/1

f(5) = 1/3

f(6) = 1/4

f(7) = 2/3

f(8) = 3/2

f(9) = 4/1

f(10) = 5/1

Page 22: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

22

4 Countable/Uncountable sets

Theorem 4.3: Q+ is countable!

Proof: (By definition of ‘countable’), we need to show: |Q+||Z+| We will give a bijection from Z+ to Q+.

1/1

2/1

3/1

4/1

5/1

6/1

1/2

2/2

3/2

4/2

5/2

6/2

1/3

2/3

3/3

4/3

5/3

6/3

1/4

2/4

3/4

4/4

5/4

6/4

1/5

2/5

3/5

4/5

5/5

6/5

1/6

2/6

3/6

4/6

5/6

6/6

f(1) = 1/1

f(2) = 1/2

f(3) = 2/1

f(4) = 3/1

f(5) = 1/3

f(6) = 1/4

f(7) = 2/3

f(8) = 3/2

f(9) = 4/1

f(10) = 5/1

f(11) = 1/5

Page 23: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

23

4 Countable/Uncountable sets

Theorem 4.3: Q+ is countable!

Now, if we carry on, then– Every element in Z+ will map to some rational– An element in Z+ will be mapped to only one rational.

Therefore, f is a function.

1/1

2/1

3/1

4/1

5/1

6/1

1/2

2/2

3/2

4/2

5/2

6/2

1/3

2/3

3/3

4/3

5/3

6/3

1/4

2/4

3/4

4/4

5/4

6/4

1/5

2/5

3/5

4/5

5/5

6/5

1/6

2/6

3/6

4/6

5/6

6/6

f(1) = 1/1

f(2) = 1/2

f(3) = 2/1

f(4) = 3/1

f(5) = 1/3

f(6) = 1/4

f(7) = 2/3

f(8) = 3/2

f(9) = 4/1

f(10) = 5/1

f(11) = 1/5

Page 24: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

24

4 Countable/Uncountable sets

Theorem 4.3: Q+ is countable!

Also note that– Every element in Q+ appears in this 2D grid and will be associated with some Z+

as we go down the grid in a zig-zag manner (f is surjective).– An element in Q+ will only be associated with only one element in Z+ (f injective).

Therefore, f is a bijection from Z+ to Q+.

1/1

2/1

3/1

4/1

5/1

6/1

1/2

2/2

3/2

4/2

5/2

6/2

1/3

2/3

3/3

4/3

5/3

6/3

1/4

2/4

3/4

4/4

5/4

6/4

1/5

2/5

3/5

4/5

5/5

6/5

1/6

2/6

3/6

4/6

5/6

6/6

f(1) = 1/1

f(2) = 1/2

f(3) = 2/1

f(4) = 3/1

f(5) = 1/3

f(6) = 1/4

f(7) = 2/3

f(8) = 3/2

f(9) = 4/1

f(10) = 5/1

f(11) = 1/5

Page 25: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

25

4 Countable/Uncountable sets

Q: What do we know so far? A: |2Z||Z||Z+||Q+| So far, all the infinite sets seem to be

countable ( ‘equally infinite’ with each other).

Q: Is there some infinite set which is ‘more infinite’ (contains more elements) than another infinite set???

A: Yes!

Page 26: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

26

4 Countable/Uncountable sets

Theorem 4.4: The set {xR | 0x1} is uncountable.

‘Countable’ means ‘THERE EXISTS a bijection to Z+.’ ‘Not countable’ will then mean:

‘NOT (THERE EXISTS a bijection to Z+).’ Proof is essentially by contradiction, and it uses a

technique called diagonalization. By contradiction:

– Assume there exists a bijection from Z+ to {xR | 0x1}.– …– Something contradictory arises.

Page 27: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

27

4 Countable/Uncountable sets

Theorem 4.4: The set {xR | 0x1} is uncountable. A: “Since you are insistent that there is a bijection… ok…, give me an

example of a bijection… I’ll show you that it is contradictory.” B: “Ok… here is my bijection from Z+ to {xR | 0x1}.”

0 . a41 a42 a43 a44 a45 … a4n …4

0 . a31 a32 a33 a34 a35 … a3n …3

0 . a21 a22 a23 a24 a25 … a2n …2

0 . a11 a12 a13 a14 a15 … a1n …1

0 . a51 a52 a53 a54 a55 … a5n …5

0 . a61 a62 a63 a64 a65 … a6n …6

0 . a71 a72 a73 a74 a75 … a7n …7

f

Page 28: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

28

4 Countable/Uncountable sets

Theorem 4.4: The set {xR | 0x1} is uncountable.

A: “Now I’ll show you what’s so contradictory…” We construct a new number d = 0.d1d2d3 …dn… such that

0 . a41 a42 a43 a44 a45 … a4n …

0 . a31 a32 a33 a34 a35 … a3n …

0 . a21 a22 a23 a24 a25 … a2n …

0 . a11 a12 a13 a14 a15 … a1n …

0 . a71 a72 a73 a74 a75 … a7n …

0 . a61 a62 a63 a64 a65 … a6n …

0 . a51 a52 a53 a54 a55 … a5n …

4

3

2

1

7

6

5

f

dn = 1 if ann 1

2 if ann = 1

Observe that for each integer n, d differs in the nth decimal position from the nth real number in the list.

So d is NOT in the list!

But d is supposed to be in the list! ()

Page 29: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

29

4 Countable/Uncountable sets

Theorem 4.4: The set {xR | 0x1} is uncountable.

A: “However you order the reals between 0 and 1, I can always construct a real, which is not in your list. i.e. you will always miss out some real number in your function”

0 . a41 a42 a43 a44 a45 … a4n …

0 . a31 a32 a33 a34 a35 … a3n …

0 . a21 a22 a23 a24 a25 … a2n …

0 . a11 a12 a13 a14 a15 … a1n …

0 . a71 a72 a73 a74 a75 … a7n …

0 . a61 a62 a63 a64 a65 … a6n …

0 . a51 a52 a53 a54 a55 … a5n …

4

3

2

1

7

6

5

f So any function from you propose from Z+ to {xR | 0x1} can never be a bijection!

So {xR | 0x1} is uncountable.

Page 30: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

30

4 Countable/Uncountable sets

Theorem 4.5: The set {xR | 0x1} has the same cardinality as R.

Informal proof:

1/4 3/4

1/2

domain: {xR | 0x1}

0 1 2 3 4 5-5 -4 -3 -2 -1R

codomainf f

Page 31: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

31

4 Countable/Uncountable sets

Theorem 4.6: Any subset of any countable set is countable. Translate the statement: If B A and A is countable, then B is also countable. NOTE: DO NOT think of finite sets. A and B can be infinite sets. Proof:

– Assume: B A and A is countable– Either B is finite or B is infinite

• Case 1: If is B finite, then B is countable (by definition of ‘countable’).• Case 2: If is B infinite, …

B is countable

– In either case, B is countable.

There is a bijection from Z+ to B.

Page 32: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

32

4 Countable/Uncountable sets

Theorem 4.6: Any subset of any countable set is countable.

Z+

123456

B

a2 = b1

a5 = b2

1

Z+ A

23456

a1

a2

a3

a4

a5

a6

f

g

Page 33: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

33

4 Countable/Uncountable sets

Theorem 4.6: Any subset of any countable set is countable.

Proof (Continued):– Since A is countable, we have a bijection f : Z+A (Let’s say that f(1) = a1; f(2) = a2 ;

f(3) = a3 …)

– Define a function g : Z+B inductively as follows:• Search through each element of A sequentially (Since A is countable) until an element of B is found.

This must happen since (1) B A and (2) B is infinite, so B)

Call This element g(1).• For each integer k 2, suppose g(k-1) has been defined, meaning that we have

g(1) = b1; g(2) = b2 ; g(3) = b3 … g(k-1) = bk-1 = ai .

Starting with ai+1 search sequentially from ai+1, ai+2, ai+3,… until another element of is found B. Call this element g(k).

This must happen since B is infinite and {g(1),g(2),g(3) ,…,g(k-1)} is finite.

Page 34: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

34

4 Countable/Uncountable sets

Theorem 4.6: Any subset of any countable set is countable.

Z+

Z+

A

B

123456

123456

a1

a2

a3

a4

a5

a6

a2

a5

= b1

= b2

f

g

g is 1-1 since we only took out distinct elements.

g is onto, since (1) Each search for g(k) continues from where the previous one left off, so every element of A is reached, and since (2) all elements in B are somewhere in A, so all elements of B will be eventually found.

So is g a bijection.

Page 35: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

35

4 Countable/Uncountable sets

Theorem 4.7: R is uncountable. (Weaker version of theorem 4.5)

Proof: Thm 4.6: If B A and A is countable, then B is also countable. Contrapositive: if B is uncountable then … if B A then A is

uncountable.

Choose B = {xR | 0x1} and A = R. We know that B is uncountable (thm 4.4). We also know that B A. Therefore A (which is R) is uncountable.

Page 36: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

36

5. Summary

What do we know so far?1. |2Z| |Z| |Z+| |Q+|2. |{xR | 0x1}| |R|

Definition (Cantor):– |Z+| = 0

– |R| = c

The symbol ‘’is pronounced ‘aleph’ (the first letter of the Hebrew alphabet). We have shown that 0 c.

(FACT) It can be proven that 0 is the first (i.e. the ‘least’/‘smallest’) infinite cardinal.

(Definition) We let 1 be the least cardinal which is greater than 0 (the next biggest one after 0)

(Unknown): Is 1 = c ??? (Cantor’s Continuum Hypothesis).

Page 37: 1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6

37

End of Lecture