Professional Documents
Culture Documents
1. Range of f = {1, 6}
2. Range of g = {1, 2, 6}
3. Range of h = {1, 4}
Image and pre image of Function
Two functions are equal when they have the same domain, have the same codomain,
and map each element of their common domain to the same element in their common
codomain.
Example
• What are the domain, codomain, and range of the function that assigns grades
to students described in the first paragraph of the introduction of this section?
• suppose that each student in a discrete mathematics class is assigned a letter
grade from the set {A,B,C,D, F}. And suppose that the grades are A for Adams,
C for Chou, B for Goodfriend, A for Rodriguez, and F for Stevens.
• Solution: Let G be the function that assigns a grade to a student in our discrete
mathematics class. Note that G(Adams) = A, for instance. The domain of G is
the set {Adams, Chou, Goodfriend, Rodriguez, Stevens}, and the codomain is
the set {A,B,C,D, F}. The range of G is the set {A,B,C, F}, because each grade
except D is assigned to some student.
• A function is called real-valued if its codomain is the set of real
numbers, and it is called integer-valued if its codomain is the set of
integers.
• Two real-valued functions or two integer valued functions with the
same domain can be added, as well as multiplied.
Function
A function f from set A to set B is a relation (rule of
correspondence) that assigns each element x in the set
A to exactly one element y in the set B.
1 2 No
xh
a re 2 4 tha as
x ’s ed n o
mo
3
All sign 6 ass ne re
i gn y
as 4 8 ed
5 10
1). Must use all the 2). The x value can only be
x’s in A. assigned to one y in B.
Function (Arrow diagrams)
If X and Y are finite sets, you can define a function f from X to Y
by drawing an arrow diagram. You make a list of elements in X
and a list of elements in Y, and draw an arrow from each element
in X to the corresponding element in Y.
Functions and non functions
Which of the arrow diagrams define functions from
X = {a, b, c} to Y = {1, 2, 3, 4}? Self Test Excersice
1 5
2 6
3 7
4 8
5 9
Example 2
• To see this, suppose that f is a one-to-one correspondence from the set A to the
set B. Then the inverse function exists and is a one-to-one correspondence from
B to A. The inverse function reverses the correspondence of the original
function, so (b) = a when f (a) = b, and f (a) = b when (b) = a. Hence, ( ◦ f )(a) = (f
(a)) = (b) = a, and (f ◦ )(b) = f ((b)) = f (a) = b.
• Consequently ◦ f = ιA and f ◦ = ιB, where ιA and ιB are the identity functions on
the sets A and B, respectively. That is, ( = f .
Important Functions
• Two important functions in discrete mathematics, namely, the floor
and ceiling functions.
• Let x be a real number. The floor function rounds x down to the
closest integer less than or equal to x, and the ceiling function rounds
x up to the closest integer greater than or equal to x.
• The floor function assigns to the real number x the largest integer that
is less than or equal to x. The value of the floor function at x is
denoted by ˪ x ˩.
• The ceiling function assigns to the real number x the smallest integer
that is greater than or equal to x. The value of the ceiling function at x
is denoted by ɼ x˥.
• 31. a) f (S) = {0, 1, 3} b) f (S) = {0, 1, 3, 5, 8}
• c) f (S) = {0, 8, 16, 40} d) f (S) = {1, 12, 33, 65}