NAME:
Student Number:_{}
No._{}
Marks _{}
Instructions:
1. You have 50 minutes for this exam.
2. This exam contains 6 questions and has a total of 100 marks.
3. Show all of your work. Your work must justify the answer
that you give.
1. (10 Marks) Let X = {a,b,c} and Y = {1,2,3,4}.
(i) Let f(a) = 1 and f(b) = 2. Is f a function from X to Y?
(ii) Let f(a) = 1, f(b) = 2 and f(c) = {2,4}. Is f a function from X to Y?
(iii) Let f(a) = 1, f(b) = 2 and f(c) = 5. Is f a function from X to Y?
Solution. (i). f is not a function from X to Y since c has no images.
(ii) f is not a function from X to Y since c¢s image is not unique.
(iii) f is not a function from X to Y since c¢s image is not in Y.
2. (10 Marks) Let
X = {a,b,c} and Y = {1,2,3,4}. Define a function f:X®
Y by

(i) Write the domain and codomain of f.
(ii) Find the range of f.
(iii) Let S Í Y be a
subset of Y. Define the inverse image of S by the set

Find f^{1}({2}), f^{1}({2,4}) and f^{1}({1}).
Solution. (i) The domain of f is the set X and the codomain of f is Y.
(ii) The range of f is the set {2,4}.
(iii) f^{1}({2}) = {a,c}, f^{1}({2,4}) = {a,b,c} and f^{1}({1}) = Æ.
3. (30 Marks) Evaluate each of the following sums.
(i) å_{i = 1}^{2}å_{j = 0}^{3}(i+j).
(ii) å_{k = 0}^{100}[(2^{k})/(3^{k+1})].
(iii) å_{k = 1}^{n}[1/(k+k^{2})].
Solution. (i)

(ii)

(iii)

4. (15 Marks) Find the prime factorization of 7007.
Solution.
7  7007: 7007 = 1001×7.
7  1001: 1001 = 143×7.
11  143: 143 = 13×11.
Since 13 is prime, the procedure is complete, so we have

5. (20 Marks) Find
gcd(330,156) and lcm
(10^{20}, 60^{30}).
Solution. 330 = 2×165, 165 = 3×55, 55 = 5×11.
Hence, we have

156 = 2×78, 78 = 2×39, 39 = 3×13. Hence
we havve

This implies gcd(330,156) = 2^{min{1,2}}.3^{min{1,1}}.5^{min{1,0}}.11^{min{1,0}}.13^{min{0,1}} = 2.3 = 6.
Since 10^{20} = 2^{20}×5^{20}
and 60^{30} = (2^{2}.3.5)^{30} = 2^{60}.3^{30}.5^{30}.
It follows that

6. (15 Marks) Suppose today is Tuesday, and neither this year nor next year is a leap year. What day of the week will it be one year from today?
Solution. 365+2 mod
7 is the required day.
365 = 52×7+1, so 365+2 = 52×7+3. Hence, we
have

The required day is Wednesday. [Sunday=0, Monday=1,..., Saturdy =6].