17 - centre (0 , , 0) . 3.2 Constructing relations Just as...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
{ 1 , 2 , 3 } . This relation only has 3 of the possible 9 ordered pairs. We create an array of three pointers, one for each element of { 1 , 2 , 3 } , and list for each element which other elements it is related to: 3 1 1 3 2 1 Just as for products, we can extend the deFnition of a binary relation to an arbitrary n -ary relation. D EFINITION 3.2 A n-ary relation between sets A 1 , . . . , A n is a subset of a n -ary product A 1 × . . . × A n . The deFnition of a 2-ary relation is the same as that of a binary relation given in deFnition 2.11. A unary relation , or predicate , over set A is a 1-ary relation: that is, a subset of A . E XAMPLE 3.3 1. The set { x N : x is prime } is a unary relation on N . 2. The set { ( x, y, z ) R 3 : ± x 2 + y 2 + z 2 = 1 } is a 3 -ary relation on the real numbers, which describes the surface of the unary sphere with
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: centre (0 , , 0) . 3.2 Constructing relations Just as for sets, we may construct new relations from old. We just give the deFnitions for binary relations. it is easy to extend the deFnitions to the n-ary case. D EFINITION 3.4 (B ASIC R ELATION O PERATORS ) Let R, S A 1 A 2 . DeFne the relations R S , R S and R , all with type A 1 A 2 , by 1. (Relation Union) ( a 1 , a 2 ) R S iff ( a 1 , a 2 ) R or ( a 1 , a 2 ) S ; 2. (Relation Intersection) ( a 1 , a 2 ) R S if and only if ( a 1 , a 2 ) R and ( a 1 , a 2 ) S ; 18...
View Full Document

Ask a homework question - tutors are online