0% found this document useful (0 votes)
173 views6 pages

Relations and Their Properties: ( (A, B) - A B or A B), ( (A, B) - A b+1), R ( (A, B) - A+b 3)

This document provides an overview of relations and their properties. It defines binary relations as subsets of ordered pairs between two sets, and relations on a set as subsets of ordered pairs within the same set. Properties of relations like reflexivity, symmetry, antisymmetry, and transitivity are explained. Relations can be combined using set operations. The composition of relations is analogous to function composition. Higher powers of a relation are defined inductively. N-ary relations generalize binary relations to multiple sets. Relations can be represented using zero-one matrices.

Uploaded by

mor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
173 views6 pages

Relations and Their Properties: ( (A, B) - A B or A B), ( (A, B) - A b+1), R ( (A, B) - A+b 3)

This document provides an overview of relations and their properties. It defines binary relations as subsets of ordered pairs between two sets, and relations on a set as subsets of ordered pairs within the same set. Properties of relations like reflexivity, symmetry, antisymmetry, and transitivity are explained. Relations can be combined using set operations. The composition of relations is analogous to function composition. Higher powers of a relation are defined inductively. N-ary relations generalize binary relations to multiple sets. Relations can be represented using zero-one matrices.

Uploaded by

mor
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Lecture 7

Relations and their properties


Let A and B be sets. A binary relation from A to B is a subset of A×B . In other words, a binary
relation from A to B is a set R of ordered pairs where the first element of each ordered pair comes
from A and the second element comes from B. We use the notation aRb to denote that (a, b) ∈ R and
a R b to denote that (a, b) ∉ R. Moreover, when (a, b) belongs to R, a is said to be related to b by R.
Binary relations represent relationships between the elements of two sets. We will omit the word
“binary” when there is no danger of confusion.
Example. Let A be the set of all cities, and let B be the set of the 50 states in the USA. Define the
relation R by specifying that (a, b) belongs to R if city a is in state b. For instance, (Boulder,
Colorado), (Chicago, Illinois), (Cupertino, California) are in R, but (Chicago, Colorado), (Cupertino,
Illinois) are not in R.

Functions as relations. Recall that a function f from a set A to a set B assigns a unique element of B
to each element of A. The graph of f is the set of ordered pairs (a, b) such that b = f(a). Since the
graph of f is a subset of A×B , it is a relation from A to B. Moreover, the graph of a function has the
property that every element of A is the first element of exactly one ordered pair of the graph.
Conversely, if R is a relation from A to B such that every element in A is the first element of exactly
one ordered pair of R, then a function can be defined with R as its graph. This can be done by
assigning to an element a of A the unique element b ∈ B such that (a, b) ∈ R.

Relations on a set
A relation on a set A is a relation from A to A. In other words, a relation on a set A is a subset of
A× A .
Example. Let A = {1, 2, 3, 4}. Which ordered pairs are in the relation R = {(a, b) | a divides b}?
Solution: R = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4)}.
Example 1. Consider the following relations on the set of integers:
R1 ={(a , b)|a≤b}, R2 ={(a , b )|a> b}, R3 ={(a , b )|a=b or a=−b},
R4 ={( a ,b )|a=b}, R5 ={(a , b )|a=b+1}, R6 ={(a , b )|a+b≤3}.
Which of these relations contain each of the pairs (1, 1), (1, 2), (2, 1), (1, –1) and (2, 2)?
Solution: The pair (1, 1) is in R1, R3, R4, and R6; (1, 2) is in R1 and R6; (2, 1) is in R2, R5 and R6; (1, –1)
is in R2, R3 and R6; and finally, (2, 2) is in R1, R3 and R4.
Example. How many relations are there on a set with n elements?
Solution: A relation on a set A is a subset of A× A . Since A× A has n2 elements when A has n
n2
elements, and a set with m elements has 2m subsets, there are 2 subsets of A× A . Thus, there are
2
2n relations on a set with n elements.

Properties of relations
A relation R on a set A is called reflexive if (a, a) ∈ R for every element a ∈ A .
Example 2. Consider the following relations on {1, 2, 3, 4}:
R1 = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 4), (4, 1), (4, 4)},

R2 = {(1, 1), (1, 2), (2, 1)},

R3 = {(1, 1), (1, 2), (1, 4), (2, 1), (2, 2), (3, 3), (4, 1), (4, 4)},

R4 = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3)},

R5 = {(1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 3), (2, 4), (3, 3), (3, 4), (4, 4)},

R6 = {(3, 4)}. Which of these relations are reflexive?


Example. Is the “divides” relation on the set of positive integers reflexive?
Solution: Since a | a whenever a is a positive integer, the “divides” relation is reflexive.
A relation R on a set A is called symmetric if (b ,a )∈ R whenever (a , b )∈ R , for a,b∈ A.
A relation R on a set A such that (a , b )∈ R and (b ,a )∈ R only if a = b, for a,b∈ A , is called
antisymmetric.
The terms symmetric and antisymmetric are not opposites, since a relation can have both of these
properties or may lack both of them. A relation cannot be both symmetric and antisymmetric if it
contains some pair of the form (a, b) where a ≠ b.
Example. Which of the relations from Example 1 are symmetric and which are antisymmetric?
R
Solution: The relations R3, R4 and R6 are symmetric. Indeed, 3 is symmetric, since if a=b or
a=−b , then b=a or b=−a . R4 is symmetric since a = b implies that b=a . R6 is symmetric since
a+b≤3 implies that b+a≤3 .
The relations R1, R2, R4 and R5 are antisymmetric.
Example. Is the “divides” relation on the set of positive integers symmetric? Is it antisymmetric?
Solution: This relation is not symmetric since 1 | 2, but 2|1 . It is antisymmetric, for if a and b are
positive integers with a | b and b | a, then a = b.
A relation R on a set A is called transitive if whenever (a , b )∈ R and (b,c)∈ R , then (a ,c)∈ R , for
a,b,c∈ A .
Example. Which of the relations in Example 2 are transitive?
Solution: R4, R5 and R6 are transitive.
Example. Is the “divides” relation on the set of positive integers transitive?
Solution: Suppose that a divides b and b divides c. Then there are positive integers k and l such that
b = ak and c = bl. Hence, c = akl, so that a divides c. It follows that this relation is transitive.

Combining relations
Since relations from A to B are subsets of A×B , two relations from A to B can be combined in any
way two sets can be combined.
Example. Let A = {1, 2, 3} and B = {1, 2, 3, 4}. The relations R1 = {(1, 1), (2, 2), (3, 3)} and R2 =
{(1, 1), (1, 2), (1, 3), (1, 4)} can be combined to obtain R1 ∪R2 ={(1,1 ),(1,2),(1,3),(1,4 ),(2,2),(3,3)} ,
R1 ∩R2 ={(1 , 1)}, R1 −R2 ={(2,2),(3,3)} , R2 −R1 ={(1, 2),(1 , 3 ),(1 , 4 )} .
There is another way that relations are combined which is analogous to the composition of functions.
Let R be a relation from a set A to a set B and S a relation from B to a set C. The composite of R and
S is the relation consisting of ordered pairs (a, c), where a∈ A , c∈ C , and for which there exists an
element b ∈ B such that (a , b )∈ R and (b ,c)∈ S . We denote the composite of R and S by S ∘ R .
Example. What is the composite of the relations R and S where R is the relation from {1, 2, 3} to {1,
2, 3, 4} with R = {(1, 1), (1, 4), (2, 3), (3, 1), (3, 4)} and S is the relation from {1, 2, 3, 4} to {0, 1, 2}
with S = {(1, 0), (2, 0), (3, 1), (3, 2), (4, 1)}?
Solution: S ∘ R is constructed using all ordered pairs in R and ordered pairs in S, where the second
element of the ordered pair in R agrees with the first element of the ordered pair in S. For example,
the ordered pair (2, 3) in R and (3, 1) in S produce the ordered pair in S. For example, the ordered
pair (2, 3) in R and (3, 1) in S produce the ordered pair (2, 1) in S ∘ R . Computing all the ordered
pairs in the composite, we find S∘ R={(1, 0),(1, 1),(2, 1),(2, 2),(3, 0),(3 , 1)} .
The powers of a relation R can be inductively defined from the definition of a composite of two
relations.
Let R be a relation on the set A. The powers Rn, n = 1, 2, 3, … are defined inductively by R1 = R and
3 2
R =R ∘ R . The definition shows that R =R∘ R , R =R ∘ R=( R∘ R )∘ R , and so on.
n+1 n 2

Example. Let R = {(1, 1), (2, 1), (3, 2), (4, 3)}. Find the powers Rn, n = 2, 3, 4, …
2
R =R∘ R , we find that R ={(1, 1), (2, 1), (3, 1), (4 , 2)}. Furthermore, since
2
Solution: Since
3
R =R ∘ R , R ={(1, 1), (2, 1), (3, 1), (4, 1)}. Additional computation shows that R4 is the same as R3,
3 2

4
so R ={(1, 1),(2, 1),(3, 1),(4, 1)}. It is also follows that R =R for n = 5, 6, 7, …
n 3

n
Theorem 1. The relation R on a set A is transitive iff R ⊆ R for n = 1, 2, 3, …

n-ary relations
Let A1, A2, …, An be sets. An n-ary relation on these sets is a subset of 1 2
A ×A ×...× A
n . The sets A1,
A2, …, An are called the domains of the relation, and n is called its degree.
Example. Let R be the relation consisting of triples (a, b, c), where a, b and c are integers with a < b
< c. Then (1, 2, 3)∈ R , but (2, 4 , 3)∉ R . The degree of this relation is 3. Its domains are all equal to
the set of integers.
Example. Let R be the relation consisting of 5-tuples (A, N, S, D, T) representing airplane flights,
where A is the airline, N is the flight number, S is the starting point, D is the destination, and T is the
departure time. For instance, if Nadir Express Airplanes has flight 963 from Newark to Bangor at
15:00, then (Nadir, 963, Newark, Bangor, 15:00) belongs to R. The degree of this relation is 5, and
its domains are the set of all airlines, the set of flight numbers, the set of cities, the set of cities
(again), and the set of times.
Representing relations using matrices
A relation between finite sets can be represented using a zero-one matrix. Suppose that R is a relation
from
A={a 1 , a2 ,.. . ,an } to B={b1 , b2 ,. .. ,b n } . The relation R can be represented by the matrix

M R=[ mij ] , where


mij=
{
1 if (ai , b j )∈ R
0 if (ai , b j )∉ R
.
In other words, the zero-one matrix representing R has a 1 as its (i, j) entry when ai is related to bj,
and a 0 in this position if ai is not related to bj.
Example. Suppose that A = {1, 2, 3} and B = {1, 2}. Let R be the relation from A to B containing (a,
a =1 , a2=2, a3 =3, b1 =1 and
b) if a∈ A , b∈ B and a > b. What is the matrix representing R if 1
b2 =2 ?

[ ]
0 0
M R= 1 0
Solution: Since R={(2, 1},(3, 1),(3, 2)¿¿ , the matrix for R is 1 1 .
Example. Let
A={a 1 , a2 , a3 } and B={b1 , b2 ,b 3 , b 4 , b5 } . Which ordered pairs are in the relation R

[ ]
0 1 0 0 0
M R= 1 0 1 1 0
represented by the matrix 1 0 1 0 1 ?
m =1 , it follows that R = {(a , b ),
Solution: Since R consists of those ordered pairs (ai ,b j ) with ij 1 2
(a2, b1),(a2, b3), (a2, b4), (a3, b1), (a3, b3), (a3, b5)}.

Representing relations using digraphs


A directed graph, or digraph, consists of a set V of vertices (or nodes) together with a set E of
ordered pairs of elements of V called edges (or arcs). The vertex a is called the initial vertex of the
edge (a, b), and the vertex b is called the terminal vertex of this edge.
An edge of the form (a, a) is represented using an arc from the vertex a back to itself. Such an edge
is called a loop.
Example. The directed graph with vertices a, b, c and d, and edges (a, b), (a, d), (b, b), (b, d), (c, a),

(c, b) and (d, b) is displayed in Figure:


Example. The directed graph of the relation R = {(1, 1),(1, 3), (2, 1),(2, 3),(2, 4), (3, 1), (3, 2),(4, 1)}

on the set {1, 2, 3, 4} is shown in Figure:


Example. What are the ordered pairs in the relation R represented by the directed graph shown in
Figure below?

Solution: The ordered pair (x, y) in the relation are R = {(1, 3),(1, 4), (2, 1),(2, 2),(2, 3), (3, 1), (3, 3),
(4, 1), (4, 3)}. Each of these pairs corresponds to an edge of the directed graph, with (2, 2) and (3, 3),
corresponding to loops.

Glossary
composite – композиция; power – степень; directed graph – ориентированный граф
vertex – вершина; edge – ребро; loop – цикл

Exercises for Seminar 9


9.1. List the ordered pairs in the relation R from A = {1, 2, 3, 4, 5} to B = {1, 2, 3, 4} where
(a , b )∈ R if and only if a) a = b; b) a > b; c) gcd(a, b) = 1 (gcd is abbreviate for “great common
divisor”) .
9.2. For each of the following relations on the set {1, 2, 3, 4}, decide whether it is reflexive, whether
it is symmetric, whether it is antisymmetric, and whether it is transitive.
a) {(2, 2), (2, 3), (2, 4), (3, 2), (3, 3), (3, 4)}; b) {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)};
c) {(2, 4), (4, 2)}; d) {(1, 2), (2, 3), (3, 4)}; e) {(1, 1), (2, 2), (3, 3), (4, 4)};
f) {(1, 3), (1, 4), (2, 3), (2, 4), (3, 1), (3, 4)}.
9.3. Let R1 ={(1, 2),(2, 3 ),(3 , 4)} and R2={(1, 1),(1, 2),(2, 1),(2, 2),(2, 3),(3 , 1),(3, 2),(3, 3),(3, 4)} be
relations from {1, 2, 3} to {1, 2, 3, 4}. Find a) R1 ∪R2 ; b) R1 ∩R2 ; c) R1 −R2 ; d) R2 −R1 .
9.4. Let R be the relation {(1, 2), (1, 3), (2, 3), (2, 4), (3, 1)}, and let S be the relation {(2, 1), (3, 1),
(3, 2), (4, 2)}. Find S ∘ R .
9.5. List the triples in the relation {(a, b, c) | a, b and c are integers with 0 < a < b < c < 5}.
9.6. Represent each of the following relations on {1, 2, 3} with a matrix (with the elements of this set
listed in increasing order): a) {(1, 1), (1, 2), (1, 3)}; b) {(1,1), (1, 2), (1, 3), (2, 2), (2, 3), (3, 3)}.
9.7. List the ordered pairs in the relations on {1, 2, 3} corresponding to the following matrices
(where the rows and columns correspond to the integers listed in increasing order).
[ ] [ ] [ ]
1 0 1 0 1 0 1 1 1
0 1 0 0 1 0 1 0 1
a) 1 0 1 ; b) 0 1 0 ; c) 1 1 1 .
9.8. Draw the directed graphs representing each of the relations from Ex. 9.6.
9.9. List the ordered pairs in the relations represented by the following directed graphs:

9.10. Draw the directed graphs representing each of the relations from Ex. 9.7.
9.11. Let R be the relation on the set of people consisting of pairs (a,b) where a is a parent of b .
Let S be the relation on the set of people consisting of pairs (a,b) where a and b are siblings
(brothers or sisters). What are S ∘ R and R∘ S ?
9.12. A relation R on the set A is irreflexive if for every a ∈ A (a , a)∉ R . That is, R is irreflexive
if no element in A is related to itself.
Suppose that R and S are reflexive relations on a set A . Prove or disprove each of the following
statements: a) R∪S is reflexive; b) R∩S is reflexive; c) R ⊕ S is irreflexive; d) R−S is
irreflexive; e) S ∘ R is reflexive.
Exercise for Homework 9
9.13. List the ordered pairs in the relation R from A = {1, 2, 3, 4, 5} to B = {1, 2, 3, 4} where
(a , b )∈ R if and only if a) a + b = 4; b) a | b; c) lcm(a, b) = 2 (lcm is abbreviate for “least common
multiple”) .
9.14. Determine whether the relation R on the set of all people is reflexive, symmetric,
antisymmetric, and/or transitive, where (a , b )∈ R if and only if a) a is taller than b; b) a and b were
born on the same day; c) a has the same first name as b; d) a and b have a common grandparent.
9.15. Let R1 ={(1, 1),(1, 3),(2, 1),(2, 4),(3, 2)} and R2 ={(1, 3),(1, 4),(2, 3),(3, 2 ),(3, 3),(3, 4 )} be
relations from {1, 2, 3} to {1, 2, 3, 4}. Find a) R1 ∪R2 ; b) R1 ∩R2 ; c) R1 −R2 ; d) R2 −R1 .
9.16. Let R be the relation {(1, 1), (1, 2), (2, 2), (2, 3), (3, 2), (3, 3)}, and let S be the relation {(1, 3),
(2, 3), (2, 4), (3, 2), (3, 4), (4, 1)}. Find S ∘ R .
9.17. Which 4–tuples are in the relation {(a, b, c, d) | a, b, c and d are positive integers with abcd =
6}?
9.18. Represent each of the following relations on {1, 2, 3} with a matrix (with the elements of this
set listed in increasing order): a) {(1, 2), (2, 1), (2, 2), (3, 3)}; b) {(1, 3), (3, 1)}.
9.19. List the ordered pairs in the relations on {1, 2, 3, 4} corresponding to the following matrices
(where the rows and columns correspond to the integers listed in increasing order).

[ ][ ][ ]
1 0 0 1 0 1 0 1 1 1 1 1
0 1 1 0 1 0 1 1 1 0 0 1
0 1 1 0 1 0 1 1 1 0 0 1
a)
1 0 0 1 ; b) 0 1 0 1 ; c) 1 1 1 1 .
9.20. Draw the directed graphs representing each of the relations from Ex. 9.19.
9.21. List the ordered pairs in the relation represented by the following directed graph:
9.22. Draw the directed graph that represents the following relation: {(a, a), (a, b), (b, c), (c, b), (c,
d), (d, a), (d, b)}.

You might also like