Page 242 - HOW TO PROVE IT: A Structured Approach, Second Edition
P. 242

P1: Oyk/
                   0521861241c05  CB996/Velleman  October 19, 2005  0:16  0 521 86124 1  Char Count= 0






                                   228                        Functions
                                   For example, for the function F ={(1, 5), (2, 4), (3, 5)} in part 1 of the last
                                   example, we could say that F(1) = 5, since (1, 5) ∈ F. Similarly, F(2) = 4
                                   and F(3) = 5. If L is the function in part 3 and c is any city, then L(c) would be
                                   the unique country n such that (c, n) ∈ L. In other words, L(c) = the country
                                   in which c is located. For example, L(Paris) = France. For the function D in
                                   part 5, we could say that for any person p, D(p) = the set of all children of p.
                                   If A is any set and a ∈ A, then (a, a) ∈ i A ,so i A (a) = a. And if f is the function
                                                                          2
                                   in part 7, then for every real number x, f (x) = x .
                                     A function f from a set A to another set B is often specified by giving a rule
                                   that can be used to determine f (a) for any a ∈ A. For example, if A is the set
                                   of all people and B = R , then we could define a function f from A to B by the
                                                      +
                                   rule that for every a ∈ A, f (a) = a’s height in inches. Although this definition
                                   doesn’t say explicitly which ordered pairs are elements of f, we can determine
                                   this by using our rule that for all a ∈ A and b ∈ B, (a, b) ∈ f iff b = f (a).
                                   Thus,


                                               f ={(a, b) ∈ A × B | b = f (a)}
                                                ={(a, b) ∈ A × B | b = a’s height in inches}.


                                   For example, if Joe Smith is 68 inches tall, then (Joe Smith, 68) ∈ f and
                                   f(Joe Smith) = 68.
                                     It is often useful to think of a function f from A to B as representing a rule
                                   that associates, with each a ∈ A, some corresponding object b = f (a) ∈ B.
                                   However, it is important to remember that although a function can be defined
                                   by giving such a rule, it need not be defined in this way. Any subset of A × B
                                   that satisfies the requirements given in Definition 5.1.1 is a function from
                                   A to B.


                                   Example 5.1.3. Here are some more examples of functions defined by rules.

                                   1. Suppose every student is assigned an academic advisor who is a professor.
                                     Let S be the set of students and P the set of professors. Then we can define
                                     a function f from S to P by the rule that for every student s, f (s) = the
                                     advisor of s. In other words,

                                           f ={(s, p) ∈ S × P | p = f (s)}
                                            ={(s, p) ∈ S × P | the professor p is the academic advisor
                                                of the student s}.
   237   238   239   240   241   242   243   244   245   246   247