Discrete Mathematics for Computer Science

(Romina) #1

166 CHAPTER 3 Relations


Exercises



  1. For the people in the family tree (see Figure 3.2), build tables for the following rela-
    tions:
    (a) IsAncestorOf
    (b) IsDescendentOf
    (c) IsSiblingOf
    (d) IsCousinOf

  2. Let M = {1, 2 ... , 10}. Define a relation R on elements x, y E M such that (x, y) E


R if and only if there is a positive integer k such that x = ky. Find the elements of R.


  1. Find the elements in each of the following relations defined on R:
    (a) (x, y) E R if and only if x + 1 <y
    (b) (x, y) E R if and only if y < 0 or 2x < 3


(c) (x, y, z) E R if and only ifx^2 + y = z


  1. List the 16 elements of the relation Between as defined in Example 4.

  2. The table below gives the names of airlines and several cities that each flies to from
    Chicago. The table also gives the number of miles for each flight. List all the triples
    (X, Y, Z) of the ternary relation defined by those triples for which airline X flies Y
    miles to city Z.


TWA Pan Am Piedmont
Topeka 603 Bombay 7809 Peoria 170
Kansas City 510 Seattle 2052 Albany 816
Phoenix 1742 Anaheim 2025 Atlanta 717


  1. Let U = (0, 11.
    (a) Let SubsetOf = {(X, Y) : X, Y C U and X C Y}. List all ordered pairs in Sub-
    setOf.
    (b) Let StrictSubsetOf= {(X, Y) : X, Y C U and X C Y 1. List all its ordered pairs in
    StrictSubsetOf.


(c) {(X, Y, Z) : X, Y, Z C U and X n Y = ZJ is a ternary relation. List all ordered

triples in this relation.
The relations SubsetOf and StrictSubsetOf can be defined on any set of sets. We will
use these relations for other universal sets later in the text.


  1. Using the family tree shown in Figure 3.2, list the elements in each of the following
    relations, and give these relations meaningful names.
    (a) IsMarriedTo -1
    (b) IsMarriedTo o IsMarriedTo
    (c) IsParentOf o IsParentOf-1
    (d) =Family where Family denotes the set of people appearing in the family tree


(e) IsMarriedTo n IsMarriedTo^1

(f) IsParentOf n IsParentOf-1


  1. Describe the relations resulting from the inverse or composition operations. Describe
    the resulting relations in words.

Free download pdf