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

Slides:



Advertisements
Similar presentations
1.6 Functions. Chapter 1, section 6 Functions notation: f: A B x in A, y in B, f(x) = y. concepts: –domain of f, –codomain of f, –range of f, –f maps.
Advertisements

Countability. The cardinality of the set A is equal to the cardinality of a set B if there exists a bijection from A to B cardinality? bijection? injection.
1 Diagonalization Fact: Many books exist. Fact: Some books contain the titles of other books within them. Fact: Some books contain their own titles within.
Great Theoretical Ideas in Computer Science.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Terminology Domain: set which holds the values to which we apply the function Co-domain: set which holds the possible values (results) of the function.
Lecture 3 Set Operations & Set Functions. Recap Set: unordered collection of objects Equal sets have the same elements Subset: elements in A are also.
CSE115/ENGR160 Discrete Mathematics 02/16/12 Ming-Hsuan Yang UC Merced 1.
Terminology Domain: set which holds the values to which we apply the function Co-domain: set which holds the possible values (results) of the function.
Functions f( ) = A B Lecture 15: Nov 4.
1 Section 1.8 Functions. 2 Loose Definition Mapping of each element of one set onto some element of another set –each element of 1st set must map to something,
CS 2210 (22C:019) Discrete Structures Sets and Functions Spring 2015 Sukumar Ghosh.
Chapter 7 Functions Dr. Curry Guinn. Outline of Today Section 7.1: Functions Defined on General Sets Section 7.2: One-to-One and Onto Section 7.3: The.
1 CMSC 250 Chapter 7, Functions. 2 CMSC 250 Function terminology l A relationship between elements of two sets such that no element of the first set is.
Functions A B f( ) =. This Lecture We will define a function formally, and then in the next lecture we will use this concept in counting. We will also.
Relation, function 1 Mathematical logic Lesson 5 Relations, mappings, countable and uncountable sets.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
ICS 253: Discrete Structures I
1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6.
Week 7 - Friday.  What did we talk about last time?  Set disproofs  Russell’s paradox  Function basics.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Discrete Mathematics CS 2610 September 12, Agenda Last class Functions  Vertical line rule  Ordered pairs  Graphical representation  Predicates.
1 Discrete Structures – CNS 2300 Text Discrete Mathematics and Its Applications (5 th Edition) Kenneth H. Rosen Chapter 1 The Foundations: Logic, Sets,
Chapter 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs BY: MISS FARAH ADIBAH ADNAN IMK.
1.4 Sets Definition 1. A set is a group of objects . The objects in a set are called the elements, or members, of the set. Example 2 The set of positive.
Chapter 9 Functions Let A and B be nonempty sets. A function f from A to B, written f: A  B is a relation from A to B with the property that every element.
CSE 2353 – October 1 st 2003 Functions. For Real Numbers F: R->R –f(x) = 7x + 5 –f(x) = sin(x)
Mathematical Induction
What is a set? A set is a collection of objects.
MATH 224 – Discrete Mathematics
COMPSCI 102 Introduction to Discrete Mathematics.
Fall 2015 COMP 2300 Discrete Structures for Computation Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1.
Basic Structures: Sets, Functions, Sequences, and Sums.
Sets Definition: A set is an unordered collection of objects, called elements or members of the set. A set is said to contain its elements. We write a.
Great Theoretical Ideas in Computer Science.
Lecture 4 Infinite Cardinals. Some Philosophy: What is “2”? Definition 1: 2 = 1+1. This actually needs the definition of “1” and the definition of the.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.3, 7.4 and 7.5.
CS 285- Discrete Mathematics
FUNCTIONS COSC-1321 Discrete Structures 1. Function. Definition Let X and Y be sets. A function f from X to Y is a relation from X to Y with the property.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
1 Lecture 5 Functions. 2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit.
FUNCTIONS.
ICS 253: Discrete Structures I
Existence of Non-measurable Set
Discrete Mathematics CS 2610
CS 2210:0001 Discrete Structures Sets and Functions
Applied Discrete Mathematics Week 2: Functions and Sequences
CSE 20 – Discrete Mathematics
MATH 224 – Discrete Mathematics
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
2.4 Sequences and Summations
Existence of Non-measurable Set
Cardinality of Sets Section 2.5.
Lecture 7 Functions.
Discrete Structures for Computer Science
CSE15 Discrete Mathematics 02/27/17
Lesson 5 Relations, mappings, countable and uncountable sets
Lesson 5 Relations, mappings, countable and uncountable sets
Ch 5 Functions Chapter 5: Functions
ICS 253: Discrete Structures I
… and the following mathematical appetizer is about…
Functions Rosen 6th ed., §2.3.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Discrete Mathematics CS 2610
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Lecture # 18 Types of Functions
CPSC 121: Models of Computation
Presentation transcript:

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

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

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

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.

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 ?

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

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

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

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.

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!

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: 1 2 3 4 5 …. ↓ ↓ ↓ ↓ ↓ … 2 4 6 8 10 ….

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

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.

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+

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

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

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

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*

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}) = 0.1011001001 f({2,5,6,8,9}) = 0.0100110110 f(Ø)=0, f(Z+)=0.111111… R has at least the cardinality as P(Z+) R is uncountable!

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