functions
play

Functions One-to-one, Onto, Bijections f(x)=x 2 0 0 x Types of - PowerPoint PPT Presentation

Functions One-to-one, Onto, Bijections f(x)=x 2 0 0 x Types of Functions Function viewed as a matrix: every column has exactly one cell on Onto Function (surjection): Every row has at least one cell on One-to-One function


  1. Functions One-to-one, Onto, Bijections f(x)=x 2 0 0 x

  2. Types of Functions Function viewed as a matrix: every column has exactly one cell “on” Onto Function (surjection): Every row has at least one cell “on” One-to-One function (injection): Every row has at most one cell “on” Bijection: Every row has exactly one cell “on” f(x)= ⌊ x/5 ⌋ 0 0 x f(x)=x f(x)=5x f(x)=x 2 0 0 0 x x 0 x 0 0

  3. Surjective Functions ∀ y ∈ B ∃ x ∈ A f(x)=y Onto Function (surjection): Every row has at least one cell “on” Given f:A → B, one can always define an “equivalent” onto function f’:A → Im(f) such that ∀ x ∈ A f(x)=f’(x) f(x)= ⌊ x/5 ⌋ 0 0 x f(x)=x f(x)=5x f(x)=x 2 0 0 0 x x 0 x 0 0

  4. Injective Functions ∀ x,x’ ∈ A f(x)=f(x’) → x=x’ ∀ y ∈ Im(f) ∃ ! x ∈ A f(x)=y One-to-One function (injection): Every row has at most one cell “on” Domain matters : Z → Z defined as f(x)=x 2 is not one-to-one, but f : Z + → Z + defined as f(x)=x 2 is one-to-one E.g., strictly increasing or decreasing functions f(x)= ⌊ x/5 ⌋ 0 0 x f(x)=x f(x)=5x f(x)=x 2 0 0 0 x x 0 x 0 0

  5. Injective ⟷ Invertible Can recover x from f(x): f is said to be invertible if ∃ g s.t. g ○ f ≡ Id f doesn’ t lose information One-to-one functions are invertible Suppose f : A → B is one-to-one ∀ y ∈ Im(f) ∃ ! x ∈ A f(x) = y Let g : B → A be defined as follows: for y ∈ Im(f), g(y)=x s.t. f(x)=y (well-defined) for y ∉ Im(f), g(y) = some arbitrary element in A f(x) Then g ○ f ≡ Id A , where Id A : A → A is the identity function over A 0 x 01 1 0 1 g need not be invertible 11 2 2 00 g(y) 3 3 10 0 0 y

  6. Injective ⟷ Invertible f is said to be invertible if ∃ g s.t. g ○ f ≡ Id One-to-one functions are invertible And invertible functions are one-to-one Suppose f : A → B is invertible Let g : B → A be s.t. g ○ f ≡ Id Now, for any x 1 ,x 2 ∈ A, if f(x 1 ) = f(x 2 ), then g(f(x 1 ))=g(f(x 2 )) But g(f(x)) = Id(x) = x Hence, ∀ x 1 ,x 2 ∈ A, if f(x 1 )=f(x 2 ), then x 1 =x 2

  7. Bijections 01 1 2 11 3 10 Bijection: both onto and one-to-one Every row and every column has exactly one cell “on” Every element in the co-domain has exactly one pre-image If f : A → B, f -1 : B → A such that 01 1 f -1 ○ f : A → A and f ○ f -1 : B → B are both identity functions 2 11 3 10 Both f and f -1 are invertible, and the inverses are unique (f -1 ) -1 = f

  8. Domain & Co-Domain Sizes Suppose f : A → B where A, B are finite |Im(f)| ≤ |A|, with equality holding iff f is one-to-one |Im(f)| ≤ |B|, with equality holding iff f is onto If f is onto, then |A| ≥ |B| f onto ⇒ Im(f) = B ⇒ |B| ≤ |A| If f is one-to-one, then |A| ≤ |B| f one-to-one ⇔ |Im(f)| = |A|. But |Im(f)| ≤ |B| ⇒ |A| ≤ |B| Contrapositive: If |A| > |B|, then f not one-to-one Pigeonhole principle If f is a bijection, then |A| = |B| If |A| = |B|, then f is onto ≡ f in one-to-one ≡ f is a bijection

  9. Composition Composition of functions f and g: g ○ f : Domain(f) → Co-domain(g) g ○ f(x) ≜ g(f(x)) g ○ f f g (Alice, Alice) (Alice, Alice) 5 High High (Alice, Jabberwock) (Alice, Jabberwock) 4 (Alice, Flamingo) (Alice, Flamingo) (Jabberwock, Alice) (Jabberwock, Alice) 3 Medium Medium (Jabberwock, Jabberwock) (Jabberwock, Jabberwock) 2 (Jabberwock, Flamingo) (Jabberwock, Flamingo) (Flamingo, Alice) (Flamingo, Alice) 1 Low Low (Flamingo, Jabberwock) (Flamingo, Jabberwock) 0 (Flamingo, Flamingo) (Flamingo, Flamingo) Defined only if Im(f) ⊆ Domain(g) Typically, Domain(g) = Co-domain(f) g ○ f : Domain(f) → Co-domain(g) Im(g ○ f) ⊆ Im(g)

  10. Composition & Onto/One-to-One Suppose Domain(g) = Co-Domain(f) (then g ○ f well-defined). Composition “respects onto-ness” If f and g are onto, g ○ f is onto as well If g ○ f is onto, then g is onto f g α 1 1 2 β 2 3 γ 4 δ 3 5 ε

  11. Composition & Onto/One-to-One Suppose Domain(g) = Co-Domain(f) (then g ○ f well-defined). Composition “respects onto-ness” If f and g are onto, g ○ f is onto as well If g ○ f is onto, then g is onto Composition “respects one-to-one-ness” If f and g are one-to-one, g ○ f is one-to-one as well If g ○ f is one-to-one, then f is one-to-one f g ζ α 1 1 4 2 β 2 3 γ 5 4 δ 3 5 ε 6

  12. Composition & Onto/One-to-One Suppose Domain(g) = Co-Domain(f) (then g ○ f well-defined). Composition “respects onto-ness” Exercise: What if If f and g are onto, g ○ f is onto as well Domain(g) ⊋ Co-Domain(f)? What if Domain(g) = Im(f) If g ○ f is onto, then g is onto and/or Co-Domain(f) = Im(f) ? Composition “respects one-to-one-ness” If f and g are one-to-one, g ○ f is one-to-one as well If g ○ f is one-to-one, then f is one-to-one Hence, composition “respects bijections” If f and g are bijections then g ○ f is a bijection as well If g ○ f is a bijection, then f is one-to-one and g is onto

  13. Permutation of a string To permute = to rearrange e.g., π 53214 (hello) = lleoh e.g., π 35142 (lleoh) = ehlol Permutations are essentially bijections from the set of positions (here {1,2,3,4,5}) to itself A bijection from any finite set to itself is called a permutation Permutations compose to yield permutations (since bijections do so) e.g., π 35142 ○ π 53214 = π 21534 a b 1 1 l e c h 1 1 1 2 2 l h d e 2 2 2 3 3 e l e l 3 3 3 4 4 o o l 4 4 4 5 5 h l o 5 5 5

  14. Isomorphism Bijection with additional “structure preserving properties” “Structure”: some relation(s) Consider sets S and S’ and relations R ⊆ S × S and R’ ⊆ S’ × S’ An isomorphism between R and R’ is a bijection from S to S’ such that ∀ x,y ∈ S, R(x,y) ↔ R’(f(x),f(y)) d S’ S’ S S 2 3 0 d 0 a 1 a 1 b b 1 c 2 b 2 c 3 c 3 d 0 a Not an An isomorphism R R’ isomorphism

Recommend


More recommend