1 / 27

CS 23022 Discrete Mathematical Structures

CS 23022 Discrete Mathematical Structures. Mehdi Ghayoumi MSB rm 132 mghayoum@kent.edu Ofc hr : Thur , 9:30-11:30a. Announcements. Homework 3 available. Due 06/19, 8a . Solutions are Available at 8.01 a Midterm 1: Monday,June-30, location 121 rm. Functions. Functions.

avent
Download Presentation

CS 23022 Discrete Mathematical Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 23022Discrete Mathematical Structures Mehdi Ghayoumi MSB rm 132 mghayoum@kent.edu Ofchr: Thur, 9:30-11:30a

  2. Announcements Homework 3 available. Due 06/19, 8a. Solutions are Available at 8.01 a Midterm 1: Monday,June-30, location 121 rm.

  3. Functions

  4. Functions Suppose we have: And I ask you to describe the yellow function. What’s a function? f(x) = x Notation: f: RR, f(x) = x co-domain domain

  5. Functions Suppose we have: And I ask you to describe the yellow function. What’s a function? f(x) = x +20

  6. Functions Suppose we have: And I ask you to describe the yellow function. What’s a function? f(x) = x -20

  7. Functions Suppose we have: And I ask you to describe the yellow function. What’s a function? f(x) = -x Notation: f: RR, f(x) = -x co-domain domain

  8. Functions Suppose we have: And I ask you to describe the yellow function. What’s a function? f(x) = -x+20

  9. Functions Suppose we have: And I ask you to describe the yellow function. What’s a function? f(x) = -x-20

  10. Michael Tito Janet Cindy Bobby Katherine Carol Brady Mother Teresa Functions A = {Michael, Tito, Janet, Cindy, Bobby} B = {Katherine, Carol Brady, Mother Teresa} Let f: A  B be defined as f(a) = mother(a).

  11. Michael Tito Janet Cindy Bobby Katherine Carol Brady Mother Teresa Some say it means codomain, others say, image. Functions - image & preimage For any set S  A, image(S) = {b : a  S, f(a) = b} So, image({Michael, Tito}) = {Katherine } image(A) = B - {Mother Teresa} image(S) = f(S)

  12. Michael Tito Janet Cindy Bobby Katherine Carol Brady Mother Teresa Functions - image & pre image For any S  B, preimage(S) = {a: b  S, f(a) = b} So, preimage({Carol Brady}) = {Cindy, Bobby} preimage(B) = A preimage(S) = f-1(S)

  13. Michael Tito Janet Cindy Bobby Katherine Carol Brady Mother Teresa Suppose S is {Janet, Cindy} preimage(image(S)) = A Functions - image & pre image What is preimage(image(S))?

  14. Functions - injection A function f: A  B is one-to-one (injective, an injection) if a,b,c, (f(a) = b  f(c) = b)  a = c one-to-one Every b  B has at most 1 preimage.

  15. Functions - injection A function f: A  B is one-to-one (injective, an injection) if a,b,c, (f(a) = b  f(c) = b)  a = c one-to-one Every b  B has at most 1 preimage.

  16. Functions – Not-injection Not one-to-one

  17. Functions - surjective • A function f : A → B is said to surjective or onto if the range of f is equal to B(co-domain), i.e. every element of B has its pre-image in A under the given function f. • So ∀ b ∈ B ∃ a ∈ A, such that f(a) =b onto

  18. Functions - injection not onto

  19. Functions - bijection A function f: A  B is bijective if it is one-to-one and onto. Every b  B has exactly 1 preimage.

  20. yes yes yes Functions - examples Suppose f: R+  R+, f(x) = x2. Is f one-to-one? Is f onto? Is f bijective?

  21. no yes no Functions - examples Suppose f: R  R+, f(x) = x2. Is f one-to-one? Is f onto? Is f bijective?

  22. no no no Functions - examples Suppose f: R  R, f(x) = x2. Is f one-to-one? Is f onto? Is f bijective?

  23. Functions - composition Let f:AB, and g:BC be functions. Then the composition of f and g is: (g o f)(x) = g(f(x))

  24. Functions - composition

  25. Functions - composition

  26. Functions - composition Let f = {(1,3), (2,1), (3,4), (4,6)} and let g = {(1,5), (2,3), (3,4), (4,1), (5,3), (6,2)}. Then g o f = {(1,4), (2,5), (3,1), (4,2)}. Given f(x) = 2x + 3 and g(x) = –x2 + 5…. find ( f o g)(x). (f o g)(x) = f (g(x))     = f (–x2 + 5)     = 2(             ) + 3     ... setting up to insert the input formula     = 2(–x2 + 5) + 3     = –2x2 + 10 + 3     = –2x2 + 13

More Related