162 CHAPTER 3 Relations
Similar relations are defined on N and R. When the set X is clear from the context, the
subscript X will frequently be dropped. When it causes no confusion, it is convenient
to use mathematical symbols for these relations and drop the subscript. Hence, we will
sometimes refer to ld as =, to Le as <, to Lt as <, to Gt as >, and to Ge as >. Of course,
to say that (x, y) e Idx, it is customary to write x = y, and to say that (x, y) E LtN, it is
customary to write x < y. In a non-numeric setting, we can define a relation for any set X
of words in a dictionary by saying that word] < word2 means that word] precedes word2
in the dictionary.
Example 3. Table 3.6 shows two subsets of the relations =N and </q. Since both relations
are infinite, the entire relation obviously cannot be displayed.
Table 3.6 Two Relations on N
IdN LtN
0 0 0 1
(^1 1 0 2)
2 2 1 2
3 3 0 3
4 4 1 3
If R is a binary relation on a set X, then (x, y) e R may also be written as x R y.
3.1.1 n-ary Relations
There is no reason to restrict attention to relations between pairs of objects. Those are
simply the most familiar examples.
Definition 2. Let X 1 , X2,.... X,, be sets for some n e N. An n-ary relation is a set of
n-tuples contained in X 1 x X 2 x ... Xn. If X 1 = X2. X, we say the n-ary rela-
tion is defined on X.
We have been careful to indicate how many sets are involved in a relation or how many
elements are related. Often the qualifier n-ary is left off and we see references to relations
for which the context makes clear how many sets are involved.
Example 4. Let the set X consist of the nine positions on a tic-tac-toe board, named pl,
P2 ... , p9, as shown:
P1 P2 P3
P4 P5 P6
P7 P8 P9