ELEC-270 Solutions to Assignment 7 1. A relation R on a set

ELEC-270 Solutions to Assignment 7
1. A relation R on a set A is called irreflexive if for all a  A, (a, a)  R.
(a) Give an example of a relation R on the set of integers where R is irreflexive and
transitive but not symmetric.
(b) Let R be a nonempty relation on A. Prove that if R is irreflexive and symmetric, then
it cannot be transitive.
(c) If |A| = n  1. How many different relations on A are irreflexive?
(a)
Let R = {(x, y) | x < y}.
Then for no integer n  Z will (n, n) be in R since n is not less than n.
R is transitive: take m, n, p  Z where m < n and n < p. Then m < p.
R is not symmetric: if x < y then y is not less than x, e.g., 2<7 but 7 is not less than 2.
(b)
Since R  , there is at least one pair (x, y)  R.
Since R is irreflexive, x  y.
Since R is symmetric, (y, x)  R.
But if R were transitive then the fact that (x, y)  R and (y, x)  R would imply that (x, x) 
R, which would contradict irreflexivity.
(c)
The relations on A are subsets of A  A.
We must preclude relations that include (a, a) for any a  R.
That is, for each of the n elements of A, you can only pair it with at most (n – 1) other
elements.
Suppose A = {a1, a2, … , an}
Then you are restricted to relations that are subsets of
{a1}{a2, … , an}{a2}{a1, a3, … , an}  {an}{a2, … , an-1} and the
size of the above set is (n – 1)  n.
2
 # of subsets is 2(n – 1) n = 2 n  n .
2. Construct a relation on the set {2, {a}, b, {d, c}} that is
(a) reflexive, symmetric, but not transitive and indicate why your relation is not
transitive.
(b) irreflexive, symmetric and transitive.
(c) reflexive, transitive, but neither symmetric nor antisymmetric and indicate why your
relation is not symmetric and why it’s not antisymmetric.
(a)
Let R = {(2,2), ({a},{a}), (b, b), ({d, c},{ d, c}), (2, b), (b, 2), (b, {a}), ({a}, b)}
R is not transitive since (2, b)  R and (b, {a})  R but (2,{a})  R.
(b)
R = .
(Note from 1(b) that the empty set is the only relation that is irreflexive, symmetric and
transitive.)
(c)
R = {(2,2), ({a},{a}), (b, b), ({d, c},{ d, c}), (2, b), (b, 2), ({a}, 2), ({a}, b)}
R is not symmetric since ({a}, 2)  R but (2,{a})  R.
R is not antisymmetric since (2, b)  R and (b, 2)  R (and 2  b)
Note that ({a}, b) cannot be removed from R without R losing transitivity since
({a}, 2)  R and (2, b)  R.
3. Let R be the following relation on the set of integers:
R = { (x, y) | x, y  Z, x 2  y 2 is divisible by 3}.
(a) Prove that R is an equivalence relation on the set of integers.
(b) What is the equivalence class [0]? [1]? Simplify as much as possible. In addition, list
five numbers in each equivalence class. How many distinct equivalence classes on the
set of integers does the relation yield? List them.
(a) Reflexivity
Let x  Z. Then x 2  x 2 = 0 and 3 | 0.
 (x, x)  R.
Symmetry
Suppose that (x, y)  R.
Then 3 | ( x 2  y 2 )
i.e., 3m = x 2  y 2 for some integer m
 3m = y 2  x 2
 3 | (y2  x2) (since if m  Z, m  Z )
Transitivity
Suppose that (x, y)  R and (y, z)  R.
Then  integers m, n such that
3m = x 2  y 2
3n = y 2  z 2
 3(m + n) = x 2  z 2
3 | x2 z2
 (x, z)  R
(b)
[0] = {x | (0, x)  R}
= {x |  x 2 is divisible by 3}
= {6, 3, 0, 3, 6, 9, …}
= {x | 3 divides x} ( note: x2 is divisible by 3 iff x is divisible by 3 )
[1] = { x | (1, x)  R }
= { x | 1  x 2 is divisible by 3 }
= {4, 2, 1, 2, 4, 5, 7, 8, …},
which appears to be all x such that x is not divisible by 3.
3 | 1  x2
 3 | (1 + x) (1 x)
 3 | (1  x)
or
3 | (1 + x)
( 3 is a prime)
 3n = 1  x
or
3n = 1 + x
 3n  1 = x or
3n  1 = x
 x =  (3n – 1) for any integer n
The two equivalence classes [0] and [1] are distinct and cover all the integers.
4.
Let R be the relation defined on real number as
R = {(x, y) | x, y  , x – y  Q}
where  denotes the set of real numbers and Q denotes a set of rational numbers.
(a) Prove that R is an equivalence relation on the set of real numbers.
(b) What is the equivalence class [1]? [½]? []? Simplify as much as possible. In addition,
list two numbers in each equivalence class. How many distinct equivalence classes do
the above 3 sets yield? List them.
(a) Reflexivity:
Take x  .
x – x = 0 and 0  Q
 (x, x)  R.
Symmetry:
Suppose that (x, y)  R. Then x, y   and x – y  Q.
If x – y is a rational number, then so is – (x – y), i.e., (y – x)  Q.
 (y, x)  R.
Transitivity:
Suppose (x, y)  R and (y, z)  R. Then x, y, z  
x–yQ
and y – z  Q
Let
m=x–y
n=y–z
If m, n are rational, so is m + n
i.e. x – y + y – z  Q
x– zQ
 (x, z)  R
(b)
[1] = { x | (1, x)  R }
= { x | x  , 1 – x  Q}
= { x | x  Q} since numbers that are 1 away from a rational number are also
rational and vice versa
[½] = { x | (½, x)  R }
= { x | x  , ½ – x  Q}
= { x | x  Q}
[] = { x | (, x)  R }
= { x | x  ,  – x  Q}
= { x +  | x  Q}
i.e., the set of numbers that differ from  by a rational number
This yields two distinct equivalence classes: [1] and [] as [½] = [1].
The following are some examples of elements in each of the equivalence classes:
1 1 2
1, 2, 3, 4, …, , , , … [1]
2 3 3
1 + , 2 + , … []
1
+ , … []
2