1 / 41

Discrete Maths

Discrete Maths. 242-213 , Semester 2, 2013 - 2014. Objective to introduce functions. 6. Functions. Overview. What is a Function ? Common Mappings Composition of Functions More Information. 1. What is a Function?.

aimon
Download Presentation

Discrete Maths

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. Discrete Maths 242-213, Semester 2,2013-2014 • Objective • to introduce functions 6. Functions

  2. Overview • What is a Function? • Common Mappings • Composition of Functions • More Information

  3. 1. What is a Function? • Let A and B be sets. A functionffrom Ato B is a relation from A to B with the property that, for each element , there is exactly one element such that afb: • Since any relation from A to B is a subset of AxB, a function is a subset S of AxB such that for each there is a unique with

  4. Functions are also called mappings or transformations. We say that fmapsA to B f B A

  5. Example • The function f: PC with P = {Linda, Max, Kathy, Peter} C = {Boston, New York, Hong Kong, Moscow} f(Linda) = Moscow f(Max) = Boston f(Kathy) = Hong Kong f(Peter) = New York

  6. Linda Boston Max New York Kathy Hong Kong Peter Moscow Other Ways to Represent f

  7. 1.1. Domain and Codomain • If f is a function from A to B then the sets A and B are called the domain and codomain of the function.

  8. 1.2. Range • If f is a function from X to Y and is a subset of the codomain such that contains all the elements from Y that are paired with elements of the domain X is the range of the function.

  9. f : A→B, A is the domain, B is the codomain, C is the range f C is the range B A

  10. 1.3. Not a Function • This relation is not a function because there is an element in A which is not mapped to some element in B B A

  11. 2. Common Mappings • Function Image • One-to-one Function (injective) • Onto Function (surjective) • One-to-one Correspondence (bijective) • Examples • Identity Function • Inverse Function

  12. 2.1. Function Image • Let f be a function from the set A to the set Band • The image of S under the function f is the subset of B that consists of the mappings of the S elements

  13. Function Image F(S) is the image of S f B A

  14. 2.2. One-to-one Function • If f is a function from A to B and no two distinct elements of the domain are assigned the same element in the codomain, then the function is called one-to-one (or injective). • To show that a function f is one-to-one, it is necessary to show that a1a2f(a1) = f(a2) a1= a2

  15. One-to-one Function f B A

  16. Examples g(Linda) = Moscow g(Max) = Boston g(Kathy) = Hong Kong g(Peter) = New York Is g one-to-one? Yes, each element is assigned a unique element of the image f(Linda) = Moscow f(Max) = Boston f(Kathy) = Hong Kong f(Peter) = Boston • Is f one-to-one? • No, Max and Peter are mapped onto the same element of the image

  17. Proving one-to-one • How can we prove that a function f is one-to-one? • Take a look at its definition: x, yA (f(x) = f(y)  x = y) • Example: f:RR f(x) = x2 • Disproof by counter-example: f(3) = f(-3), but 3  -3, so f is not one-to-one.

  18. Another Example f:RR f(x) = 3x • One-to-one: x, yA (f(x) = f(y)  x = y) • To show: f(x)  f(y) whenever x  y x  y • 3x  3y • f(x)  f(y), so if x  y, then f(x)  f(y), that is, f is one-to-one.

  19. Strictly Increasing/Decreasing • A function f:AB with A,B  R is called strictlyincreasing, if x,yA (x < y  f(x) < f(y)) and strictly decreasing, if x,yA (x < y  f(x) > f(y)) • A function that is either strictly increasing or strictly decreasing is one-to-one.

  20. 2.3. Onto Function • If the range and codomain of a function are equal, the function is called onto (or surjective) • To show that a function f is onto, it is necessary to show that

  21. Onto Function f X Y

  22. 2.4. One-to-one Correspondence • A function, which is both one-to-one and onto is called a one-to-one correspondence (or bijective). • To show that a function f is a one-to-one correspondence, it is necessary to show that thus, for each there is exactly one such that means “there exists exactly one”

  23. One-to-one Correspondence f X Y

  24. 2.5. Examples • In the following examples, we use the arrow representation to illustrate functions f: AB • In each example, the complete sets A and B are shown.

  25. Linda Boston Max New York Kathy Hong Kong Peter Moscow f • Is f injective? No • Is f surjective? No • Is f bijective? No.

  26. Linda Boston Max New York Kathy Hong Kong Peter Moscow f • Is f injective? No • Is f surjective? Yes • Is f bijective? No Paul

  27. Linda Boston Max New York Kathy Hong Kong Peter Moscow Lübeck f • Is f injective? Yes • Is f surjective? No • Is f bijective? No

  28. Boston Linda Max New York Kathy Hong Kong Peter Moscow Lübeck f • Is f injective? No! f is not evena function!

  29. Linda Boston f • Is f injective? Yes • Is f surjective? Yes • Is f bijective? Yes Max New York Kathy Hong Kong Peter Moscow Helena Lübeck

  30. 2.6. Identity Function • For any set X, the function is a one-to-one correspondence. It is called the identity function on X.

  31. 2.7. Inverse Function • If be a one-to-one correspondence, then for each there is exactly one such that • Hence we may define a function with domain Y and codomainX by associating to each the unique such that . • This function is denoted by and is called the inverse of function f.

  32. Inverse Function f -1 f X Y

  33. f f-1 Example Linda Boston Max New York Kathy Hong Kong Peter Moscow Helena Lübeck

  34. Example The inverse function f-1 is given by: f-1(Moscow) = Linda f-1(Boston) = Max f-1(Hong Kong) = Kathy f-1(Lübeck) = Peter f-1(New York) = Helena Inversion is only possible for bijections (= invertible funcs) f(Linda) = Moscow f(Max) = Boston f(Kathy) = Hong Kong f(Peter) = Lübeck f(Helena) = New York Clearly, f is bijective.

  35. f f-1 Example 2 Linda Boston Max New York • f-1: CP is not a function, because it is not defined for all elements of C and assigns two images to New York. Kathy Hong Kong Peter Moscow Helena Lübeck

  36. Inverse Function Theorem • Theorem. Let be a one-to-one correspondence. Then: is one-to-one correspondence • The inverse function of is f. that is

  37. 3. Composition of Functions • Let g be a function from X to Y and f be a function from Y to Z. Then it is possible to combine these two functions in a function f○g from X to Z. • The function f○g is called the composition of f and g and is defined by taking the image of x under f○g to be f(g(x)):

  38. Composition of Functions • Composition f○gcannot be defined unlessthe range of g is a subset of the domain of f Z X Y

  39. Example f(x) = 7x – 4, g(x) = 3x f:RR, g:RR • (f ○ g)(5) = f(g(5)) = f(15) = 105 – 4 = 101 • (f ○ g)(x) = f(g(x)) = f(3x) = 21x - 4

  40. Composition and Inverse (f-1○ f)(x) = f-1(f(x)) = x • The composition of a function and its inverse is the identity function i(x) = x.

  41. 4. More Information • Discrete Mathematics and its ApplicationsKenneth H. RosenMcGraw Hill, 2007, 7th edition • chapter 2, section 2.3

More Related