Relation

advertisement
Relation
1. List the ordered pairs in the relation R on the set A = {2, 4, 6, 8, 10}, where (x, y)  R if
an only if
(a) x + 2y < 15
(b) 3 divides x + y
(a) {(2, 2), (2, 4), (2, 6), (4, 2), (4, 4), (6, 2), (6, 4), (8, 2), (10, 2)}
(b) {(2, 4), (2, 10), (4, 2), (4, 8), (6, 6), (8, 4), (8, 10), (10, 2), (10, 8)}
2. Give an example of a relation on the set A = {1, 3, 4, 5, 9}that is
a) reflexive, symmetric, but not transitive
b) not reflexive, not symmetric, but transitive
c) reflexive, not symmetric, not transitive
Many solutions, one possible solution for each is shown below:
a) {(1,1), (1, 3), (3, 1), (3, 3), (3, 4), (4, 3), (4, 4), (5, 5), (9, 9)}
b) {(1, 1), (1, 3)}
c) {(1, 1), (3, 3), (4, 4), (4, 5), (5, 1), (5, 5), (9, 9)}
3. Determine whether the relation R on the set A = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} is reflexive,
symmetric, transitive, and equivalence, where (x, y)  R if and only if 3 divides x – y.
R = {(1, 1), (1, 4), (1, 7), (1, 10), (2, 2), (2, 5), (2, 8), (3, 3), (3, 6), (3, 9), (4, 1), (4, 4), (4,
7), (4, 10), (5, 2), (5, 5), (5, 8), (6, 3), (6, 6), (6, 9), (7, 1), (7, 4), (7, 7), (8, 2), (8, 5), (8,
8), (9, 3), (9, 6), (9, 9), (10, 1), (10, 4), (10, 7), (10, 10)}
The relation is reflexive, symmetric, transitive, and equivalence.
4. i. Determine whether the relation R on the set A = {1, 2, 3, 4, 5} is reflexive,
symmetric, transitive, and equivalence, where (x, y)  R if an only if | x – y | < 2
R = {(1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 2), (3, 3), (3, 4), (4, 3), (4, 4), (4, 5), (5, 4),
(5, 5)}
Reflexive, symmetric, not transitive (takes (1, 2), (2, 3)  (1, 3)  R), and not
equivalence.
ii. Consider the relation
B = { (x, y) N x N : | x - y | < 2 }
Is the relation
(a) reflexive?
(b) symmetric?
Explain your answers.
(c) transitive?
a) The relation is reflexive,
For every a N,
|a - a| = 0
 |a - a| < 2
 (a, a) B
b) The relation is symmetric.
For every a, b N, we have |a - b| = |b - a|; therefore,
(a,b) B
1
(d) an equivalence?
|a - b| < 2
|b - a| < 2
 (b,a)  B
c) The relation is not transitive.
As a counterexample, select
(3, 2)  B  (2,1)  B
Notice that (3,1)  B, since
( |3 - 1| < 2) is false
Any counter example will do.
d) The relation is not an equivalence, because it is not transitive
iii. Johnsonbaugh, R., Discrete Mathematics, 6th Ed. Chapter 3, pg 124, Exercises 29 –
34.
In Exercises 29 – 34, determine whether each relation defined on the set of positive
integers is reflecive, symmetric, antisymmetric, transitive, and/or a partial order.
29. (x,y)  R if x = y2.
a) The relation is not reflexive.
As a counterexample, select x = 2.
Since 2 22, thus (2,2)  R.
b) The relation is not symmetric.
As a counterexample, select (4, 2)  R. But (2,4)  R, since 2  42.
c) The relation is antisymmetric.
For every a, b  N, and a  b, (a,b) R
 a = b2
This means that b =
a , and thus (b, a)  R.
d) The relation is not transitive.
As a counterexample, select
(16,4)  R  (4,2)  R.
Notice that (16,2)  R, since 16  22
e) The relation is not partial order, since it is not reflexive and not transitive.
30. (x,y)  R if x > y.
a) The relation is not reflexive.
As a counterexample, select x = 1.
Since 1 is not greater than 1, thus (1,1)  R.
b) The relation is not symmetric.
As a counterexample, select (4, 2)  R. But (2,4)  R, since 2 < 4.
c) The relation is antisymmetric.
For every a, b  N, and a  b, (a,b) R
a>b
This means that b < a, and thus (b, a)  R.
d) The relation is transitive.
For every x, y, z  N, and (x, y)  R and (y, z)  R,
(x, y)  R  x > y and (y, z)  R  y > z
2
Thus x > y > z  x > z, and hence (x, z)  R
e) The relation is not partial order, since it is not reflexive.
31. (x,y)  R if x  y.
a) The relation is reflexive.
For every x  N, x  x (i.e. x is greater or equal to itself).
Thus (x, x)  R.
b) The relation is not symmetric.
As a counterexample, select (6, 2)
(6, 2)  R  6  2
But 2 < 6, i.e. 2 is NOT greater than or equal to 6, thus (2, 6)  R.
c) The relation is antisymmetric.
For every a, b  N, and a  b, (a,b) R
a>b
This means that b < a, and thus (b, a)  R.
For every a, b  N, if (a,b) R and (b,a) R
 a  b and b  a
 a = b.
d) The relation is transitive.
For every x, y, z  N, and (x, y)  R and (y, z)  R,
(x, y)  R  x  y and (y, z)  R  y  z
Thus x  y  z  x  z, and hence (x, z)  R
e) The relation is partial order since it is reflexive, antisymmetric, and
transitive.
32. (x,y)  R if x = y.
a) The relation is reflexive.
For every x  N, x = x (i.e. x is equal to itself).
Thus (x, x)  R.
b) The relation is symmetric.
For every a, b  N, (a,b) R
a=b
 b = a (Commutative Law)
And thus (b, a)  R.
(Note: In symmetric, it is possible to have a = b).
c) The relation is antisymmetric.
For every a, b  N, if (a,b) R and (b,a) R
 a = b and b = a
d) The relation is transitive.
For every x, y, z  N, and (x, y)  R and (y, z)  R,
(x, y)  R  x = y and (y, z)  R  y = z
Thus x = y = z  x = z, and hence (x, z)  R
e) The relation is partial order since it is reflexive, antisymmetric, and
transitive.
3
33. (x,y)  R if 3 divides x – y.
a) The relation is reflexive.
For every x  N, x – x = 0, which is divisible by 3.
Thus (x, x)  R.
b) The relation is symmetric.
For every a, b  N, (a,b) R
 3 divides (a – b)
 a – b = 3k, for some integer k
But b – a = -(a – b) = -3k = 3(-k), and thus is divisible by 3
Therefore, (b,a)  R.
c) The relation is not antisymmetric.
As a counterexample, select (6, 3) and (3,6)
6 – 3 = 3, which is divisible by 3, and thus (6,3)  R
3 – 6 = -3 = 3(-1), which is divisible by 3, and thus (3,6)  R
Since (6,3) and (3,6) in R, with 6  3, thus the relation is not antisymmetric.
d) The relation is transitive.
For every x, y, z  N, and (x, y)  R and (y, z)  R,
(x, y)  R  3 divides x – y  x – y = 3k, for some integer k
and (y, z)  R  3 divides y – z  y – z = 3j, for some integer j
x – z = (x – y) + (y – z) = 3k + 3j = 3(k + j), which is divisible by 3.
Hence (x, z)  R
e) The relation is not partial order, since it is not antisymmetric.
34. (x,y)  R if 3 divides x + 2y.
a) The relation is reflexive.
For every x  N, x + 2x = 3x, which is divisible by 3.
Thus (x, x)  R.
b) The relation is symmetric.
For every a, b  N, (a,b) R
 3 divides a + 2b
 a + 2b = 3k, for some integer k.
b + 2a = b + 2(3k – 2b) = b + 6k – 4b = 6k – 3b = 3(2k – b),
which is divisible by 3.
And thus (b, a)  R.
c) The relation is not antisymmetric.
As a counterexample, select (6, 3) and (3,6)
6 + 2(3) = 12, which is divisible by 3, and thus (6,3)  R
3 + 2(6) = 15, which is divisible by 3, and thus (3,6)  R
Since (6,3) and (3,6) in R, with 6  3, thus the relation is not antisymmetric.
d) The relation is transitive.
For every x, y, z  N, and (x, y)  R and (y, z)  R,
(x, y)  R  3 divides x + 2y  x + 2y = 3k, for some integer k
and (y, z)  R  3 divides y + 2z  y + 2z = 3j, for some integer j
x + 2z = x + 3y + 2z – 3y = (x + 2y) + (y + 2z) – 3y = 3k + 3j – 3y
4
= 3(k + j – y), which is divisible by 3.
Hence (x, z)  R
e) The relation is not partial order, since it is not antisymmetric.
Function
5. Let A = {1, 2, 3, 4} and B = {p, q, r}. Determine whether the relation R from A to B is a
function. If it is a function, give its range.
a) R = {(1, q), (2, r), (3, r), (4, q)}
b) R = {(1, p), (2, q), (3, r), (1, q), (4, p)}
c) R = {(1, r), (2, q), (3, p)}
d) R = {(1, q), (2, q), (3, q), (4, q)}
e) R = {(1, p), (2, q), (3, r), (4, p)}
a)
b)
c)
d)
e)
5
R is a function, with range = {q, r}
R is NOT a function as 1 maps to 2 images (p and q), and thus is not unique
R is NOT a function as 4 does not map to any value in B, i.e. 4 has no image
R is a function, with range = {q}
R is a function, with range = {p, q, r}
6. (I) Why is f not a function from R to R in the following equations?
2
a. f(x) =
b. f(x) = x  25
c. f(x)= x
x2
a.
f is not defined for x = 2
b.
f is not defined for x < –25
c.
f maps every element in domain to 2 elements in the codomain, i.e. not unique elements
7. Johnsonbaugh, R., Discrete Mathematics, 6th Ed. Chapter 2, pg 124 100, Exercises 26 –
27.
26. Let f and g be functions from the positive integers to the positive integers defined by
the equations
f(n) = 2n + 1, g(n) = 3n – 1.
Find the compositions f o g, g o g, f o g, and g o f.
(f o f)(n) = f(f(n)) = 2 f(n) + 1 = 2(2n + 1) + 1 = 4n + 2 + 1 = 4n + 3.
(g o g)(n) = g(g(n)) = 3 g(n) – 1 = 3(3n – 1) – 1 = 9n – 3 – 1 = 9n – 4.
(f o g)(n) = f(g(n)) = 2 g(n) + 1 = 2(3n – 1) + 1 = 6n – 2 + 1 = 6n – 1.
(g o f)(n) = g(f(n)) = 3 f(n) – 1 = 3(2n + 1) – 1 = 6n + 3 – 1 = 6n + 2 = 2(3n + 1).
27. Let f and g be functions from the positive integers to the positive integers defined by
the equations
f(n) = n2, g(n) = 2n.
Find the compositions f o f, g o g, f o g, and g o f.
(f o f)(n) = f(f(n)) = f(n)2 = (n2)2 = n4.
n
g(n)
2
=2 .
(g o g)(n) = g(g(n)) = 2
(f o g)(n) = f(g(n)) = g(n)2 = (2n)2 = 22n.
(g o f)(n) = g(f(n)) = 2f(n) =
n
2
2
8. Johnsonbaugh, R., Discrete Mathematics, 6th Ed. Chapter 2, pg 124 100, Exercises 38 –
39.
38. Let f be the function from X = {0,1,2,3,4} to X defined by
f(x) = 4x mod 5
Write f as a set of ordered pairs and draw diagram of f. Is f one-to-one? Is f onto?
f = {(0, 0), (1, 4), (2, 3), (3, 2), (4, 1)}.
f is 1-1 and onto.
6
0
1
2
3
4
0
1
2
3
4
0
1
2
3
4
5
0
1
2
3
4
5
X
Y
X
Y
39. Let f be the function from X = {0,1,2,3,4,5} to X defined by
f(x) = 4x mod 6
Write f as a set of ordered pairs and draw diagram of f. Is f one-to-one? Is f onto?
f = {(0, 0), (1, 4), (2, 2), (3, 0), (4, 4), (5, 2)}
f is not 1-1 (both 0 and 3 map to the same image, i.e. 0)
f is not onto (there are no values of x that map to 1, 3, 5 in the codomain)
9. Let f and g be the functions
f(x) = x + 3
g(x) = 2x - 8
(i) Give the conditions and explain precisely what it means for a function to be
invertible.
(ii) Calculate the inverse of function f(x).
(iii)Calculate the inverse of function g(x).
(iv) Calculate (f o g)(x), (g o f)(x)
i. A function is invertible if its inverse relation is also a function. A function is
invertible precisely when it is a bijection, that is both one-to-one and onto.
ii. Let y = f(x)
y= x+3
x=y–3
f-1(y) = y – 3
Therefore the inverse of f is f–1(x) = x – 3
iii. Let y = g(x)
y = 2x – 8
2x = y + 8
y8
x
2
y8
f-1(y) =
2
x 8
Therefore the inverse of f is f–1(x) =
2
iv. (f o g)(x) = f(g(x))
= g(x) + 3
= (2x – 8) + 3
= 2x – 5
(g o f)(x) = g(f(x))
= 2f(x) – 8
= 2(x + 3) – 8
= 2x + 6 – 8
= 2x – 2
7
10. P = {x  R : x  0}
f: PP
f(x) = x
Find:
a. f(7)
g: R P
g(x) = ex
b. g(7)
c. (g  f)(7)
d. (f  g)(7)
a. f(7) = 7 = 2.6458 (to 4 d.p.)
b. g(7) = e7 = 1096.6332 (to 4 d.p.)
c. (g o f)(x) = e x
(g o f)(7) = e 7 =14.0940 (to 4 d.p.)
d. (f o g)(x) =
(f o g)(7) =
ex
e 7 = 33.1155 (to 4 d.p.)
----------------------------------------------------------------------------------------------------------------------------- ----------
TEST1
Question 3 [7 + 10 + 3 + 10 = 30 marks]
a) Let the universal set U = {1, 2, 4, 6, 8, 10, 13, 15}, A = {2, 6, 10, 13}, B = {4, 8, 13, 15},
and C = {1, 2, 6}. Determine each of the following:
(i) A  B
(ii) A'  B'
(iii) (A  B') – C
(iv) (C), power set of C
b) Determine whether the relation R on the set A = {1, 2, 3, 4} is reflexive, symmetric,
antisymmetric, transitive, partial order, and equivalence, where (x, y)  R if an only if x +
1  y.
c) Why is f not a function from R to R in the following equation?
f(x) = 36 - x 2
d) The functions f: R  R and g: R  R are given by
f(x) = 2 – x2, g(x) = 2x + 1
i. Find inverse function g-1(x).
iii. Find the composition function (f o g)(x).
8
Download