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

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







                                                                 5


                                                           Functions














                                                           5.1. Functions

                                   Suppose P is the set of all people, and let H ={(p, n) ∈ P × N | the person
                                   p has n children}. Then H is a relation from P to N, and it has the following
                                   important property. For every p ∈ P, there is exactly one n ∈ N such that
                                   (p, n) ∈ H. Mathematicians express this by saying that H is a function from
                                   P to N.

                                   Definition 5.1.1. Suppose F is a relation from A to B. Then F is called a
                                   function from A to B if for every a ∈ A there is exactly one b ∈ B such that
                                   (a, b) ∈ F. In other words, to say that F is a function from A to B means:

                                                      ∀a ∈ A∃!b ∈ B((a, b) ∈ F).

                                   To indicate that F is a function from A to B, we will write F : A → B.

                                   Example 5.1.2.

                                   1. Let A ={1, 2, 3}, B ={4, 5, 6}, and F ={(1, 5), (2, 4), (3, 5)}.Is F a
                                     function from A to B?
                                   2. Let A ={1, 2, 3}, B ={4, 5, 6}, and G ={(1, 5), (2, 4), (1, 6)}.Is G a
                                     function from A to B?
                                   3. Let C be the set of all cities, N the set of all countries, and let L ={(c, n) ∈
                                     C × N | the city c is in the country n}.Is L a function from C to N?
                                   4. Let P be the set of all people, and let C ={(p, q) ∈ P × P | the person p
                                     is a parent of the person q}.Is C a function from P to P?
                                   5. Let P be the set of all people, and let D ={(p, x) ∈ P × P (P) | x = the
                                     set of all children of p}.Is D a function from P to P (P)?


                                                                226
   235   236   237   238   239   240   241   242   243   244   245