Exam 2                              Friday, April 20, 2001

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.

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

 f(a) = 2,    f(b) = 4   and f(c) = 2.

(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

 f-1(S) = {x Î X: f(x) Î S}.

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 = 12åj = 03(i+j).

(ii)    åk = 0100[(2k)/(3k+1)].

(iii)    åk = 1n[1/(k+k2)].

Solution. (i)

 2 å i = 1 3 å j = 0 (i+j)
 =
 2 å i = 1 ((i+0)+(i+1)+(i+2)+(i+3))
 =
 2 å i = 1 (4i+6) = (4+6)+(8+6) = 24.

(ii)

 100 å k = 0 2k 3k+1
 =
 1 3 + 2 32 + 22 33 +... = 1 3 1-(2/3)101 1-(2/3)
 =
 1-(2/3)101 .

(iii)

 n å k = 1 1 k+k2
 =
 n å k = 1 1 k(1+k) = n å k = 1 1 k - n å k = 1 1 1+k = (1-1/2)+(1/2-1/3)+...,+(1/n-1/(1+n))
 =
 1-1/(1+n) = n/(1+n).

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

 7007 = 7.7.11.13 = 72.11.13.

5.    (20 Marks)    Find gcd(330,156) and lcm
(1020, 6030).

Solution. 330 = 2×165, 165 = 3×55, 55 = 5×11. Hence, we have

 330 = 2.3.5.11

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

 156 = 2.2.3.13 = 22.3.13

This implies gcd(330,156) = 2min{1,2}.3min{1,1}.5min{1,0}.11min{1,0}.13min{0,1} = 2.3 = 6.

Since 1020 = 220×520 and 6030 = (22.3.5)30 = 260.330.530. It follows that

 lcm (1020,3060) = 2max{20,60}.3max{0,30}.5max{20,30} = 260.330.530 = 6030.

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

 365 mod 7 = 3.

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

File translated from TEX by TTH, version 2.79.
On 20 Apr 2001, 14:43.