I will use as shorthand for the set , the first non-negative integers.
A binary relation (or simply relation) is a set of ordered pairs.
If the set is a subset of then we may say the relation is "on ".
If the set is a subset of then we may say the relation is "from to ".
Ex: is a relation on because .
Ex: is a relation from to because .
!!! Review subset and cartesian-product if these examples don't make sense to you.
is a statement that 1 and 2 are related in the relation . It is often written as shorthand.
Because is a statement, it is either true or false. For the above, it is true.
Some relations are familiar: The "less than" relation on , for example.
But, relations don't have to be familiar or intuitive as the relation above showed.
Exercise 2: Let . Write out the relation that expresses (divides) on .
In other words, list the set of all where . (Recall is true if is an integer multiple of .)
is in there because for some integer .
is not in there because for any integer .
Methodically, I'd do this in my head using this pseudocode.
for x = 1...6 for y = 1...6 if (y mod x == 0) // y a multiple of x means y/x has no remainder print (x,y)Because relations are sets of ordered pairs, be sure to write a set of ordered pairs
Solution 2: .
Exercise 4: Here is a diagram for a relation on a set . Write the sets and .
We can assume they want to know the smallest set for which is on, so that's just the labels on the dots.
In an arrow diagram, every arrow represents an ordered pair where is the source and the destination.
Solution 4: . (Notice this is in the notation given above.) .
Exercise 6: Congruence modulo 5 is a relation on the set . In this relation means (mod 5). Write out the set in set-builder notation.
The problem says that if the open senetence " (mod 5)" is true. Since set builder notation uses an open sentence after the ":", it is straghtforward to write.
Note: (mod 5) is a statement saying that when you apply "mod 5" to and they're equal.
Solution 6: .
Exercise 8: Let . Observe that , so is a relation on . Draw a diagram for this relation.
To draw a diagram for a realtion on : (It's a little different for digrams from to .)
xxxxxxxxxx for lbl in A Draw dot labeled with lbl's value for (x,y) in R Draw arrow from x to ySolution 8: There should be a labeled dot for each element of , and since there are no ordered pairs, there should be no arrows.