Presentation is loading. Please wait.

Presentation is loading. Please wait.

Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]

Similar presentations


Presentation on theme: "Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]"— Presentation transcript:

1 Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
[O2 Proof Techniques]

2 What you will learn… Z+ = {1,2,3…..} E+ = {2,4,6,8,…} Real numbers
Z+ and E+ are countable sets Rational numbers are countable Real numbers are uncountable To prove that they have different kinds of infinity, we need the concept of function

3 What is a Function? Let us consider some mathematical functions
f(x) = 3x-2 square-area(x) = x2 Function represented by table Function represented by graph Price (HK$) 5 5.5 6 6.5 7 7.5 Demand (no.) 5000 4700 4500 4350 4250 4200

4 Functions and Sets [O1] f(i)=j means put ball i into bin j.
Let A, B be sets. A function f from A to B is an assignment of exactly one element of B to each element of A. We write f : A  B We can also write f(a) = b where aA and bB A function is also called a mapping. Example: (Labeled balls into labeled bins) A function f represented by labeled balls into labeled bins from A (the set of balls) to B (the set of bins) is defined as follows: f(i)=j means put ball i into bin j. Hence the function is putting balls into bins and each ball is put into exactly one bin.

5 Basic Terminology Given a function f : A  B ( f maps A to B ),
A is the domain of f (‘balls’) B is the codomain of f (‘bins’) If f(a) = b, b is the image of a. The range of f is the set of all images of elements of A. { b | b  B and (  a (f (a) = b) ) } (‘non-empty bins’) A B Example: Let f : Z  Z and f(x) = x2, where Z = set of integers Domain = Z, codomain = Z, range = Z ?

6 Injective Functions (One-to-one)
A function f is injective, iff for every distinct x, y in the domain, f(x)  f(y). “Different inputs imply different outputs” Examples of injective function: f: Z  Z: f(x)=2x, f(x)=x3, balls into bins function such that each bin has at most one ball. Examples of not injective function: f: Z  Z: f(x)=x4 A B

7 Surjective Functions (Onto)
A function f from A to B is called surjective, iff for all b  B, there exists an element a  A such that f(a) = b. “Every element in the codomain is the output of some input” Examples of surjective function: f: Z  Z: f(x)=x+2 balls into bins function such that each bin has at least one ball. Examples of not surjective function f: Z  Z: f(x)=2x A B

8 Bijective Functions A function f that is both injective and surjective is called a bijection. Examples: f: Z  Z: f(x)=x, f(x)=x+2 balls into bins function such that each bin has exactly one ball. which means the number of balls = the number of bins if there are finite number of balls and bins. A B

9 Examples Determine whether the following functions are injection, surjection, or bijection? f1 : Z  Z, f1(x) = x2 Not injection, since f(-1) = f(1) = 1. Not surjection, since there is no integer x such that x2 = -1. f2 : Z  Z, f2(x) = x + 1 Injection, since x+1  y+1 implies x  y. Surjection, since f(x) = y  x + 1 = y  x = y – 1. Bijection, since it is both one-to-one and onto.

10 Different Kinds of Infinity
Two sets A and B have the same cardinality iff there exists a bijection f:A→B Example: Z+ = {1,2,3,4,…..} E+ = {2,4,6,8,…} Does E+ Z+ imply |E+| < |Z+|? Bijection f : Z+→E+ such that f(x)=2x NO!

11 Different Kinds of Infinity
f : Z+→E+ such that f(x)=2x is Injective since if x1, x2  Z+ are different, f(x1) ≠ f(x2) Surjective since for any y  E+, there exists x=y/2 such that x  Z+ and f(x)=y f(x) is a bijection Z+ and E+ have the same cardinality: …. ↓ ↓ ↓ ↓ ↓ … ….

12 Countable Sets Definition. A set S is countable if either:
(i) the set S is finite, or (ii) there is a bijection from the set S to Z+. Examples of Countable Sets Z+ (positive integers) is countable. Set of all integers Even numbers

13 Some Results Countable and uncountable:
All subsets of a countable set are countable. Proof? If there is a injection from a set A to another set B If A is uncountable, then B is uncountable. If B is countable, then A is countable, too.

14 Q (rational numbers) is countable [O2]
Simple case: Q+ is countable. Each element of Q+ can be represented by a/b, where a and b are relatively-prime integers and a,b>0. b a 1 2 3 4 1/1 1/2 1/3 1/4 2/1 2/2 2/3 3/1 3/2 4/1 Q+

15 Q (rational numbers) is countable
Simple case: Q+ is countable. Each element of Q+ can be represented by a/b, where a and b are relatively-prime integers and a,b>0. b a 1 2 3 4 1/1 1/2 1/3 1/4 2/1 2/3 3/1 3/2 4/1 Removing duplicates 1 2 4 6 Q+ Z+ 3 7 5 8 Mapping to integers 9

16 Question: All infinite sets are countable?
Examples: Z+ = {1,2,3,4,…..} E+ = {2,4,6,8,…} Q = rational numbers R = real numbers

17 Question: Do Z+ and P(Z+) have the same cardinality?
They are all infinite sets. But they have different kinds of infinities. P(Z+) contains “more” elements and is uncountable. Theorem: There is NO bijection mapping from any non-empty set S to P(S) P(S) has a larger cardinality than S

18 There is NO bijection mapping any non-empty set S to P(S)
Theorem: There is NO bijection mapping any non-empty set S to P(S) Proof: (proof by cases and contradiction) Case 1: If S is a finite set. Then |P(S)| = 2|S| > |S|. Case 2: If S is a infinite set. Assume there is a bijection f: S → P(S). Then for each xS, f(x)P(S). Define , then A  P(S). Since f is also a surjection, for each element X in P(S), there exists x in S such that f(x)=X. Hence there exists an element a in S such that f(a)=A. If , then condition* of A is not satisfied, Contradiction. If , then condition* of A is satisfied, Contradiction. Hence, such a bijection does not exist. condition*

19 R (real numbers) is uncountable
Intuition: P(Z+) is uncountable and is a “subset” of R. There is a injection from P(Z+) to R: Input: a subset of Z+, S={s1, s2, s3,…} Output: a real number X in [0,1] such that X=0.x1x2x3x4… where xi=1 if iS and 0 if iS Examples: f({1,3,4,7,10}) = f({2,5,6,8,9}) = f(Ø)=0, f(Z+)= … R has at least the cardinality as P(Z+) R is uncountable!

20 Axiom of Choice (Something sounds trivial but has profound implication later)


Download ppt "Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]"

Similar presentations


Ads by Google