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.

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

Functions CSLU Fall 2007 Cameron McInally Fordham University.
Week 7 - Wednesday.  What did we talk about last time?  Set proofs and disproofs  Russell’s paradox.
Functions, Pigeonhole Principle Lecture 14: Nov 4 A B f( ) =
Discrete Structures Chapter 5 Pigeonhole Principle Nurul Amelina Nasharuddin Multimedia Department.
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.
Discrete Mathematics Lecture 7 Alexander Bukharovich New York University.
Lecture 3 Set Operations & Set Functions. Recap Set: unordered collection of objects Equal sets have the same elements Subset: elements in A are also.
Functions f( ) = A B Lecture 15: Nov 4.
Pigeonhole.
Functions Goals Introduce the concept of function Introduce injective, surjective, & bijective functions.
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,
Discrete Mathematics Lecture 7 Harper Langston New York University.
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.
Section 1.8: Functions A function is a mapping from one set to another that satisfies certain properties. We will first introduce the notion of a mapping.
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.
Functions.
2.1 Sets 2.2 Set Operations 2.3 Functions ‒Functions ‒ Injections, Surjections and Bijections ‒ Inverse Functions ‒Composition 2.4 Sequences and Summations.
Foundations of Discrete Mathematics Chapter 3 By Dr. Dalia M. Gil, Ph.D.
Functions. Copyright © Peter Cappello2 Definition Let D and C be nonempty sets. A function f from D to C, for each element d  D, assigns exactly 1 element.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
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.
Relations, Functions, and Matrices Mathematical Structures for Computer Science Chapter 4 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesFunctions.
Discrete Mathematics and Its Applications Sixth Edition By Kenneth Rosen Copyright  The McGraw-Hill Companies, Inc. Permission required for reproduction.
Fall 2002CMSC Discrete Structures1 … and the following mathematical appetizer is about… Functions.
10/26/20151 … and the following mathematical appetizer is about… Functions.
1 Annoucement n Skills you need: (1) (In Thinking) You think and move by Logic Definitions Mathematical properties (Basic algebra etc.) (2) (In Exploration)
FUNCTIONS.
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,
Functions1 Elementary Discrete Mathematics Jim Skon.
Chapter 1 SETS, FUNCTIONs, ELEMENTARY LOGIC & BOOLEAN ALGEBRAs BY: MISS FARAH ADIBAH ADNAN IMK.
Example Prove that: “IF 3n + 2 is odd, then n is odd” Proof by Contradiction: -p = 3n + 2 is odd, q = n is odd. -Assume that ~(p  q) is true OR -(p 
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.
Basic Structures: Functions Muhammad Arief download dari
CSE 2353 – October 1 st 2003 Functions. For Real Numbers F: R->R –f(x) = 7x + 5 –f(x) = sin(x)
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.1 and 7.2.
Agenda Week 10 Lecture coverage: –Functions –Types of Function –Composite function –Inverse of a function.
Sets. Definitions (I) Collection of elements such that: There are no duplicates There is no order Special sets Universe (U or E): all elements under consideration.
Basic Structures: Sets, Functions, Sequences, and Sums.
CSC102 - Discrete Structures Functions
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.
1 Functions CS 202 Epp section ??? Aaron Bloomfield.
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.
Functions CSRU1400 Spring 2008Ellen Zhang 1 CISC1400, Fall 2010 Ellen Zhang.
Discrete Mathematics Lecture # 19 Inverse of Functions.
Week 7 - Wednesday.  What did we talk about last time?  Proving the subset relationship  Proving set equality  Set counterexamples  Laws of set algebra.
Week 15 - Wednesday.  What did we talk about last time?  Review first third of course.
1 Lecture 5 Functions. 2 Functions in real applications Curve of a bridge can be described by a function Converting Celsius to Fahrenheit.
Section 2.3. Section Summary  Definition of a Function. o Domain, Cdomain o Image, Preimage  One-to-one (Injection), onto (Surjection), Bijection 
Functions 7/7/2016COCS - Discrete Structures1. Functions A function f from a set A to a set B is an assignment of exactly one element of B to each element.
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Discrete Mathematics Lecture 6
Discrete Mathematics CS 2610
Relations, Functions, and Matrices
Functions 1.
CS 2210:0001 Discrete Structures Sets and Functions
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Functions Section 2.3.
CSE15 Discrete Mathematics 02/27/17
Functions.
Functions Rosen 6th ed., §2.3.
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Lecture # 18 Types of Functions
Functions Section 2.3.
Presentation transcript:

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 Range: set of actual values received when applying the function to the values of the domain

Function A “total” function is a relationship between elements of the domain and elements of the co-domain where each and every element of the domain relates to one and only one value in the co-domain A “partial” function does not need to map every element of the domain. f: X  Y –f is the function name –X is the domain –Y is the co-domain –x  X y  Y f sends x to y –f(x) = y f of x ; value of f at x ; image of x under f

Formal Definitions Range of f = {y  Y |  x  X, f(x) = y} –where X is the domain and Y is the co-domain Inverse image of y = {x  X| f(x) = y} –the set of things that map to y Arrow Diagrams –Determining if they are functions using the Arrow Diagram

Teminology of Functions Equality of Functions  f,g  {functions}, f=g   x  X, f(x)=g(x) F is a One-to-One (or Injective) Function iff  x 1,x 2  X F(x 1 ) = F(x 2 )  x 1 =x 2  x 1,x 2  X x 1  x 2  F(x 1 )  F(x 2 ) F is NOT a One-to-One Function iff  x 1,x 2  X, (F(x 1 ) = F(x 2 )) ^ (x 1  x 2 ) F is an Onto (or Surjective) Function iff  y  Y  x  X, F(x) = y F is NOT an Onto Function iff  y  Y  x  X, F(x)  y

Proving functions one-to-one and onto f:R  R f(x)=3x-4 Prove or give a counter example that f is one-to-one use def: Prove or give a counter example that f is onto use def:

One-to-One Correspondence or Bijection F:X  Y is bijective  F:X  Y is one-to-one & onto F:X  Y is bijective  It has an inverse function

Proving something is a bijection F:Z  Z F(x)=x+1 Prove it is one-to-one Prove it is onto Then it is a bijection So it has an inverse function –find F -1

Pigeonhole Principle       Basic Form A function from one finite set to a smaller finite set cannot be one-to-one; there must be at least two elements in the domain that have the same image in the co-domain.

Examples Using this class as the domain, Must two people share a birthmonth? Must two people share a birthday? A = {1,2,3,4,5,6,7,8} If I select 5 integers at random from this set, must two of the numbers sum to 9? If I select 4 integers?

Other (more useful) Forms of the Pigeonhole Principle Generalized Pigeonhole Principle –For any function f from a finite set X to a finite set Y and for any positive integer k, if n(X) > k*n(Y), then there is some y  Y such that y is the image of at least k+1 distinct elements of X. Contrapositive Form of Generalized Pigeonhole Principle –For any function f from a finite set X to a finite set Y and for any positive integer k, if for each y  Y, f -1 (y) has at most k elements, then X has at most k*n(Y) elements.

Examples Using Generalized Form: –Assume 50 people in the room, how many must share the same birthmonth? –n(A)=5 n(B)=3 F:P(A)  P(B) How many elements of P(A) must map to a single element of P(B)? Using Contrapositive of the Generalized Form: –G:X  Y where Y is the set of 2 digit integers that do not have distinct digits. Assuming no more than 5 elements of X can map to a single element of Y, how big can X be? –You have 5 busses and 100 students. No bus can carry over 25 students. Show that at least 3 busses must have over 15 students each.

Composition of Functions f:X  Y 1 and g:Y  Z where Y 1  Y –g  f:X  Z where  x  X, g(f(x)) = g  f(x) g(f(x)) x f(x) y g(y) z Y 1 X Y Z

Composition on finite sets Example –X = {1,2,3} Y1 = {a,b,c,d} Y={a,b,c,d,e} Z = {x,y,z} f(1)=cg(a)=y g  f(1)=g(f(1))=z f(2)=bg(b)=y g  f(2)=g(f(2))=y f(3)=ag(c)=z g  f(3)=g(f(3))=y g(d)=x g(e)=x

Composition for infinite sets f:Z  Z f(n)=n+1 g:Z  Z g(n)=n 2 g  f(n)=g(f(n))=g(n+1)=(n+1) 2 f  g(n)=f(g(n))=f(n 2 )=n 2 +1 note: g  f  f  g

Identity function i X the identity function for the domain X i X : X  X  x  X,i X (x) = x i Y the identity function for the domain Y i Y : Y  Y  y  Y,i Y (y) = y composition with the identity functions

Composition of a function with its inverse function f  f -1 = i Y f -1  f = i X Composing a function with its inverse returns you to the starting place. (note: f:X  Y and f -1 : Y  X)

One-to-One in Composition If f:X  Y and g:Y  Z are both one-to-one, then g  f:X  Z is one-to-one If f:X  Y and g:Y  Z are both onto, then g  f:X  Z is onto when Y = Y 1

Cardinality Comparing the “sizes” of sets –finite sets (  or has a bijective function from it to {1,2,…,n}) –infinite sets (can’t have a bijective function from it to {1,2,…,n})  A,B  {sets}, A and B have the same cardinality  there is a one-to-one correspondence from A to B In other words, Card(A) = Card(B)  f  {functions}, f:A  B  f is a bijection

Countability of sets of integers Z + is a countably infinite set Z  0 is a countably infinite set Z is a countably infinite set Z even is also a countably infinite set Card.(Z + )=Card.(Z  0 )=Card.(Z)=Card.(Z even )

Real Numbers We’ll take just a part of this infinite set Reals between 0 and 1 (non-inclusive) –X = {x  R| 0<x<1} All elements of X can be written as –0.a 1 a 2 a 3 … a n …

Cantor’s Proof Assume the set X = {x  R|0<x<1} is countable Then the elements in the set can be listed 0.a 11 a 12 a 13 a 14 …a 1n … 0.a 21 a 22 a 23 a 24 …a 2n … 0.a 31 a 32 a 33 a 34 …a 3n … … … … … Select the digits on the diagonal build a number d differs in the n th position from the n th in the list

All Reals Card.({x  R|0<x<1} ) = Card.(R)

Positive Rationals Q + Card.(Q + ) =?= Card.(Z)

log function properties (from back cover of textbook) definition of log: