140 likes | 153 Views
This lecture covers functions and their properties, including injections, surjections, bijections, inverse functions, and composition of functions.
E N D
f( ) = A B Functions Lecture 12
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.
Functions f(S) = |S| f(string) = length(string) f(student) = student-ID f(x) = is-prime(x)
f( ) = A B Injections (one-to-one) is an injection iff every element of B is f of at most 1 thing ≤ 1 arrow in |A| ≤|B|
f( ) = Surjections (Onto) is asurjectioniff every element of B is f of something 1 arrow in A B |A| ≥|B|
f( ) = A B Bijections is a bijection iff it is surjection and injection. exactly one arrow in |A| =|B|
Functions a. One-to-one, b. Onto, c. One-to-one, d. neither d. Not a Not onto not one-to-one and onto function a 1 a a 1 a 1 1 b 2 b 1 b 2 b 2 a 2 c 3 c 2 c 3 c 3 b 3 4 d 3 d 4 d 4 c 4 8
Inverse Sets A B Given an element y in B, the inverse set of y := f-1(y) = {x in A | f(x) = y}.
f( ) = A B Inverse Function Informally, an inverse function f-1 is to “undo” the operation of function f. exactly one arrow in There is an inverse function f-1 for f if and only if f is a bijection.
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)). Y’ Z X Y