1 / 22

CS 173: Discrete Mathematical Structures

CS 173: Discrete Mathematical Structures Cinda Heeren heeren@cs.uiuc.edu Rm 2213 Siebel Center Office Hours: M 11a-12p CS 173 Announcements Homework 3 returned in section this week. Homework 4 available. Due 09/24, 8a. f(x) = -(1/2)x - 25 domain co-domain CS 173 Functions

adamdaniel
Télécharger la présentation

CS 173: 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 173:Discrete Mathematical Structures Cinda Heeren heeren@cs.uiuc.edu Rm 2213 Siebel Center Office Hours: M 11a-12p

  2. CS 173 Announcements • Homework 3 returned in section this week. • Homework 4 available. Due 09/24, 8a. Cs173 - Spring 2004

  3. f(x) = -(1/2)x - 25 domain co-domain CS 173 Functions Suppose we have: And I ask you to describe the yellow function. What’s a function? Notation: f: RR, f(x) = -(1/2)x - 25 Cs173 - Spring 2004

  4. CS 173 Functions Definition: a function f : A  B is a subset of AxB where  a  A, ! b  B and <a,b>  f. Cs173 - Spring 2004

  5. B A A point! A collection of points! CS 173 Functions Definition: a function f : A  B is a subset of AxB where  a  A, ! b  B and <a,b>  f. B A Cs173 - Spring 2004

  6. Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa CS 173 Functions A = {Michael, Tito, Janet, Cindy, Bobby} B = {Katherine Scruse, Carol Brady, Mother Teresa} Let f: A  B be defined as f(a) = mother(a). Cs173 - Spring 2004

  7. Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa What about the range? Some say it means codomain, others say, image. Since it’s ambiguous, we don’t use it at all. f(S) = image(S) CS 173 Functions - image & preimage For any set S  A, image(S) = {b : a  S, f(a) = b} So, image({Michael, Tito}) = {Katherine Scruse} image(A) = B - {Mother Teresa} Cs173 - Spring 2004

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

  9. Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa  S CS 173 Functions - image & preimage What is image(preimage(S))? • S • { } • subset of S • superset of S • who knows? Cs173 - Spring 2004

  10. Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa Suppose S is {Janet, Cindy} preimage(image(S)) = A CS 173 Functions - image & preimage What is preimage(image(S))? Cs173 - Spring 2004

  11. Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa CS 173 Functions - misc. properties • f() =  • f({a}) = {f(a)} (this is a definition, actually) • f(A U B) = f(A) U f(B) • f(A  B)  f(A)  f(B) Cs173 - Spring 2004

  12. CS 173 Functions - misc. properties f(A  B)  f(A)  f(B)? Choose an arbitrary c  f(A  B), and show that it must also be an element of f(A)  f(B). f(A  B) = {x : a  (A  B), f(a) = x} So, a (A  B) such that f(a) = c. Since a  A, f(a) = c  f(A). Since a  B, f(a) = c  f(B). c  f(A), and c  f(B), so c  f(A)  f(B). Cs173 - Spring 2004

  13. Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa CS 173 Functions - misc. properties • f-1() =  • f-1(A U B) = f-1(A) U f-1(B) • f-1(A  B) = f-1(A)  f-1(B) Cs173 - Spring 2004

  14. Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa Not one-to-one Every b  B has at most 1 preimage. CS 173 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 Cs173 - Spring 2004

  15. Michael Tito Janet Cindy Bobby Katherine Scruse Carol Brady Mother Teresa Not onto Every b  B has at least 1 preimage. CS 173 Functions - surjection A function f: A  B is onto (surjective, a surjection) if b  B, a  A f(a) = b Cs173 - Spring 2004

  16. Isaak Bri Lynette Aidan Evan Isaak Bri Lynette Aidan Evan Cinda Dee Deb Katrina Dawn Cinda Dee Deb Katrina Dawn Every b  B has exactly 1 preimage. An important implication of this characteristic: The preimage (f-1) is a function! CS 173 Functions - bijection A function f: A  B is bijective if it is one-to-one and onto. Cs173 - Spring 2004

  17. yes yes yes CS 173 Functions - examples Suppose f: R+  R+, f(x) = x2. Is f one-to-one? Is f onto? Is f bijective? Cs173 - Spring 2004

  18. no yes no CS 173 Functions - examples Suppose f: R  R+, f(x) = x2. Is f one-to-one? Is f onto? Is f bijective? Cs173 - Spring 2004

  19. no no no CS 173 Functions - examples Suppose f: R  R, f(x) = x2. Is f one-to-one? Is f onto? Is f bijective? Cs173 - Spring 2004

  20. CS 173 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)) Cs173 - Spring 2004

  21. CS 173 Functions - a little problem Let f:AB, and g:BC be functions. Prove that if f and g are one to one, then g o f :AC is one to one. Recall defn of one to one: f:A->B is 1to1 if f(a)=b and f(c)=b --> a=c. Suppose g(f(x)) = y and g(f(w)) = y. Show that x=w. f(x) = f(w) since g is 1 to 1. Then x = w since f is 1 to 1. Cs173 - Spring 2004

  22. CS 173 Functions - another Let f:AB, and g:BC be functions. Prove that if f and g are onto, then g o f :AC is onto. Cs173 - Spring 2004

More Related