223
2.3 Functions
22
62.
The
union
of two fuzzy sets
S
and
T
is the fuzzy set
S
∪
T
, where the degree of membership of an element in
S
∪
T
is the maximum of the degrees of membership of
this element in
S
and in
T
. Find the fuzzy set
F
∪
R
of
rich or famous people.
63.
The
intersection
of two fuzzy sets
S
and
T
is the fuzzy
set
S
∩
T
, where the degree of membership of an element
in
S
∩
T
is the minimum of the degrees of membership
of this element in
S
and in
T
. Find the fuzzy set
F
∩
R
of rich and famous people.
2.3 Functions
Introduction
In many instances we assign to each element of a set a particular element of a second set (which
may be the same as the ﬁrst). For example, 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. This assignment
of grades is illustrated in Figure 1.
This assignment is an example of a function. The concept of a function is extremely impor
tant in mathematics and computer science. For example, in discrete mathematics functions are
used in the deﬁnition of such discrete structures as sequences and strings. Functions are also
used to represent how long it takes a computer to solve problems of a given size. Many computer
programs and subroutines are designed to calculate values of functions. Recursive functions,
which are functions deﬁned in terms of themselves, are used throughout computer science; they
will be studied in Chapter 4. This section reviews the basic concepts involving functions needed
in discrete mathematics.
DEFINITION 1
Let
A
and
B
be nonempty sets. A
function f
from
A
to
B
is an assignment of exactly one
element of
B
to each element of
A
. We write
f
(
a
)
=
b
if
b
is the unique element of
B
assigned by the function
f
to the element
a
of
A
.If
f
is a function from
A
to
B
, we write
f
:
A
→
B
.
Remark:
Functions are sometimes also called
mappings
or
transformations.
Functions are speciﬁed in many different ways. Sometimes we explicitly state the assign
ments, as in Figure 1. Often we give a formula, such as
f
(
x
)
=
x
+
1, to deﬁne a function.
Other times we use a computer program to specify a function.
Adams
Chou
Goodfriend
Rodriguez
Stevens
A
B
C
D
F
FIGURE 1
Assignment of Grades in a Discrete Mathematics Class.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document23
2 / Basic Structures: Sets, Functions, Sequences, and Sums
224
AB
ab
=
f
(
a
)
f
f
FIGURE 2
The Function
f
Maps
A
to
B
.
A function
f
:
A
→
B
can also be deﬁned in terms of a relation from
A
to
B
. Recall from
Section 2.1 that a relation from
A
to
B
is just a subset of
A
×
B
. A relation from
A
to
B
that
contains one, and only one, ordered pair (
a
,
b
) for every element
a
∈
A
, deﬁnes a function
f
from
A
to
B
. This function is deﬁned by the assignment
f
(
a
)
=
b
, where (
a
,
b
) is the unique
ordered pair in the relation that has
a
as its ﬁrst element.
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '09
 ganong
 Sets

Click to edit the document details