Download presentation
Presentation is loading. Please wait.
1
Functions Lecture 12 A B f( ) =
2
Functions function, f, from set A to set B associates an element, with an element The domain of f is A. The codomain of f is B. For every input there is exactly one output.
3
Functions
4
f(S) = |S| f(string) = length(string) f(student) = student-ID f(x) = is-prime(x)
5
≤ 1 arrow in A B f( ) = Injections (one-to-one) is an injection iff every element of B is f of at most 1 thing |A| ≤ |B|
6
Surjections (Onto) A B 1 arrow in is a surjection iff every element of B is f of something f( ) = |A| ≥ |B|
7
Bijections A B is a bijection iff it is surjection and injection. f( ) = exactly one arrow in |A| = |B|
8
Functions a. One-to-one,b. Onto,c. One-to-one,d. neitherd. Not a Not ontonot one-to-one and ontofunction a1aa1a1 1 b2b1b2b2a2b2b1b2b2a2 c3c2c3c3b3c3c2c3c3b3 4d3d4d4c44d3d4d4c4 8
9
FunctionDomainCodomainInjective?Subjective?Bijective? f(x)=sin(x)Real f(x)=2 x RealPositive real f(x)=x 2 RealPositive real Reverse string Bit strings of length n In-Class Exercises
10
Inverse Sets A B Given an element y in B, the inverse set of y := f -1 (y) = {x in A | f(x) = y}.
11
Inverse Function A B f( ) = exactly one arrow in Informally, an inverse function f -1 is to “undo” the operation of function f. There is an inverse function f -1 for f if and only if f is a bijection.
12
Composition of Functions Two functions f:X->Y’, g:Y->Z so that Y’ is a subset of Y, then the composition of f and g is the function g 。 f: X->Z, where g 。 f(x) = g(f(x)). X Y Z Y’
13
Function fFunction gInjective?Surjective?Bijective? f:X->Y f surjective g:Y->Z g injective f:X->Y f surjective g:Y->Z g surjective f:X->Y f injective g:Y->Z g surjective f:X->Y f bijective g:Y->Z g bijective f:X->YF -1 :Y->X In-Class Exercises
14
Function fFunction gInjective?Surjective?Bijective? f:X->Y f surjective g:Y->Z g injective No f:X->Y f surjective g:Y->Z g surjective NoYesNo f:X->Y f injective g:Y->Z g surjective No f:X->Y f bijective g:Y->Z g bijective Yes f:X->YF -1 :Y->XYes In-Class Exercises
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.