You are on page 1of 7

MA215 Midterm Test 1

[5 marks]

Page 1 of 7

1. Let A and B be sets. Prove that (A B) \ (A B) = (A \ B) (B \ A). (Hint: you may use
the laws of set operations; however, any correct method you choose is acceptable.)
Solution:
Note that A \ B = A B c and B \ A = B Ac . Further more, DeMorgans law implies that
(A B)c = Ac B c , etc. We have
(A \ B) (B \ A) = (A B c ) (B Ac )
= (A B) (A Ac ) (B c B) (B c Ac )
= (A B) U U (A B)c
= (A B) \ (A B)
Alternate:(textbook version)
(A B) \ (A B) =(A B) (A B)c
=(A B) (Ac B c )
=(A Ac ) (A B c ) (B Ac ) (B B c )
= (A \ B) (B \ A)
=(A \ B) (B \ A)

[5 marks]

2. Find the number of relations from A = {a, b, c, d} to B = {x, y}.


Solution:
A binary relation from A to B is a subset of A B. In other words, it is an element of
P(A B). Therefore, the number of binary relations from A to B is
|P(A B)| = 2|AB|
= 2|A||B|
= 28
= 256.

MA215 Midterm Test 1

Page 2 of 7

3. For each x P and y N, let


Ax = {k : k P, k divides x} and By = {Ax : sum of elements in Ax = x + y}
For example, A2 = {1, 2} and A2 B1 . Let C = {By : y N} and show that
[5 marks]

(a) B0 = {A1 }
Solution: For any x P, 1 divides x and x divides x, i.e. 1 Ax and x Ax for all
x P.
For x = 1, Ax = {1} and obviously A1 B0 . If x 6= 1, sum of elements in Ax must at
least be x + 1, then Ax 6 B0 . It follows that B0 = {A1 }.

[5 marks]

(b) B1 = {Ap : p is a prime number }


Solution: If x = p is a prime number, then Ap = {1, p} and it follows that Ap B1 .
On the other hand, Ax B1 means that the sum of the divisors of x is x + 1, and this
happens only if the divisors of x are exactly 1 and x, i.e. x is a prime number.

[5 marks]

(c) C
Solution: B2 = . We have seen that A1 6 B2 . Let x 6= 1, then {1, x} Ax . Suppose
that Ax B2 , then Ax contains at least another positive integer a 6= 1, x, which implies
that the sum of divisors of x is at least x + 1 + a > x + 2. This is contradiction, and
B2 = .

[5 marks]

(d) C is an infinite set


Solution: {xn : xn = 2n , n = 1, 2, . . .} has infinitely many elements. For each m = 2n ,
Am = {1, 2, 22 , . . . , 2n1 , 2n }. Since
1 + 2 + 22 + . . . + 2n1 + 2n = 2n+1 1 = 2n + (2n 1)
A2n B2n 1 . There are infinitely many distinct By s. C is infinite.
Comment: the sequence can be 2p, p2 , etc. where p runs through the prime numbers
Alternate solution: First, notice that by the definitions, the sets By for y N are
disjoint, namely, the intersection of any two different By s is the empty set. For x P,
let Sx denote the sum of elements in Ax .
Proof by contradiction. Assume that C is finite. It follows that there are only finitely
many y N such that By 6= . Suppose that k N is the largest such y, i.e. Bk 6= and
By = for all y > k. Let An Bk then Sn = n + k and An {2n} A2n . Thus
S2n > Sn + 2n = 3n + k = 2n + (n + k) A2n Bm
for some m > n + k. Since n P and n + k > k, this is a contradiction. Thus C is
infinite.

MA215 Midterm Test 1

Page 3 of 7

4. Let R and S be the relations on A = {1, 2, 3} given by


R = {(1, 1), (1, 2), (2, 3), (3, 1), (3, 3)}
and
S = {(1, 2), (1, 3), (2, 1), (3, 3)}.
Find the following relations.
[2 marks]

(a) R S
Solution:
R S = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 3), (3, 1), (3, 3)}.

[2 marks]

(b) R S
Solution:
R S = {(1, 2), (3, 3)}.

[2 marks]

(c) (A A) \ R (the complement of R)


Solution:
(A A) \ R = {(1, 3), (2, 1), (2, 2), (3, 2)}.

[2 marks]

(d) R1
Solution:
R1 is obtained by interchanging the order of the pairs:
R1 = {(1, 1), (1, 3), (2, 1), (3, 2), (3, 3)}.

MA215 Midterm Test 1


[4 marks]

Page 4 of 7

(e) R S (Hint: draw the arrow diagram for the relations)


Solution:
The relation R S can be determined by drawing the arrow diagrams for R and S next
to each other:
1

From this diagram, we conclude that


R S = {(1, 1), (1, 2), (1, 3), (2, 3), (3, 2), (3, 3)}.
[6 marks]

(f) The transitive closure of S (Hint: draw the directed graph for the relation)
Solution:
First, examine the directed graph diagram for S:
1

2
We make the following observations about this diagram:
There are sequences of arrows, starting at 1 and ending at x for every x A.
There are sequences of arrows, starting at 2 and ending at x for every x A.
There are no sequences of arrows leading from 3 to either 1 or 2.
Therefore, we conclude that
transitive(S) = {(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 3)}.

MA215 Midterm Test 1

Page 5 of 7

5. The construction of the integers outlined in this problem uses the relation on N N defined
by (a, b) (c, d) if and only if a + d = b + c.
[8 marks]

(a) Prove that is an equivalence relation.


Solution:
We check the three properties of an equivalence relation:
Reflexivity: For any (a, b) N, a + b = a + b so (a, b) (a, b).
Symmetry: Suppose (a, b) (c, d). Then a + d = b + c. This is equivalent to
c + b = d + a, so (c, d) (a, b).
Transitivity: Suppose (a1 , b1 ) (a2 , b2 ) and (a2 , b2 ) (a3 , b3 ). Then a1 + b2 =
b1 + a2 and a2 + b3 = a3 + b2 . Add a3 to both sides of the first equation to get:
a1 + b 2 + a3 = b 1 + a2 + a3 .
Now, use the second equation a2 + b3 = a3 + b2 to change the left side:
a1 + a2 + b 3 = b 1 + a2 + a3
Cancel out the a2 to get
a1 + b 3 = b 1 + a3
so (a1 , b1 ) (a3 , b3 ).

[4 marks]

(b) Let [(a, b)] denote the equivalence class of (a, b) with respect to . Prove that the
operation given by
[(a, b)] + [(c, d)] := [(a + c, b + d)]
is well-defined.
Solution:
Suppose that [(a1 , b1 )] = [(a2 , b2 )] and that [(c1 , d1 )] = [(c2 , d2 )]. We need to show that
[(a1 + c1 , b1 + d1 )] = [(a2 + c2 , b2 + d2 )].
By definition of the equivalence classes,
a1 + b 2 = b 1 + a2
and
c1 + d2 = d1 + c2 .
Add these two equations together, and parenthesize as follows:
(a1 + c1 ) + (b2 + d2 ) = (a2 + c2 ) + (b1 + d1 ).
Therefore,
(a1 + c1 , b1 + d1 ) (a2 + c2 , b2 + d2 ),
which is the same as saying
[(a1 + c1 , b1 + d1 )] = [(a2 + c2 , b2 + d2 )],
so addition is well-defined.

MA215 Midterm Test 1


[4 marks]

Page 6 of 7

(c) Prove that N N/ contains an additive identity. In other words, find an element
[(i, j)] N N/ with the property that
[(i, j)] + [(c, d)] = [(c, d)]
for every [(c, d)] N N/ .
Solution:
Let [(i, j)] = [(0, 0)]. Then for any [(c, d)] N N/ ,
[(c, d)] + [(i, j)] = [(c, d)] + [(0, 0)] = [(c + 0, d + 0)] = [(c, d)].

MA215 Midterm Test 1


[6 marks]

Page 7 of 7

6. Let A = {1, 2, 3, 4, 5} and let f : A B be defined as


f = {(1, 3), (2, 5), (3, 5), (4, 2), (5, 3)}
(a) Find f (A), the image of f
Solution: f (A) = {f (1), f (2), f (3), f (4), f (5)} = {3, 5, 5, 2, 3} = {2, 3, 5}
(b) Find f (S) where S = {1, 3, 5}
Solution: f (S) = {f (1), f (3), f (5)} = {3, 5, 3} = {3, 5}
(c) Find f 1 (T ) where T = {2, 3}
Solution: Since f (4) = 2, f (1) = f (5) = 3 and f (2) = f (3) = 5. It follows that
f 1 (T ) = {1, 4, 5}.

You might also like