


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



June 2003 Lecturer: David Easdown
Time allowed: two hours
Instructions to candidates
This examination paper comprises eight questions split into two sections.
There are two questions in Section A, each worth 10 marks.
There are six questions in Section B, worth 4, 8, 8, 10, 10 and 15 marks respectively.
The total number of marks available is 75, but full marks may be awarded for achieving 70 or more marks.
Both sections should be attempted.
Write your answers to Section A in the places indicated on the gold question sheet. Write your name and student number on that sheet.
Write your answers to Section B in the answer booklet provided.
Place your completed answers for Section A (on the gold sheet) inside the answer booklet, to be returned together to the examiner.
No notes or books are allowed. A University supplied calculator is permitted.
Section B
Write your answers to this section in the answer booklet.
B1. Use the Euclidean Algorithm to write 1 as an integer linear combination of 43 and 37. Hence find the inverse of 37 in Z 43.
[4 marks]
B2. Consider the sets
A = { 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 } and B =
Define the function f : A → B by the rule
f (x) = y whenever x ∈ y.
(a) Find f (3) and f (6). What is |B|?
(b) Is f onto? Is f one-one? Explain very briefly.
(c) Modify f to prove that given any 5 different numbers chosen from A, at least two of them add up to 9.
[2+2+4 = 8 marks]
B3. This question tests your understanding of truth tables and implication.
(a) Recall that P ⇒ Q is an abbreviation for ∼ P ∨ Q. Write out a truth table with columns for P , Q and ∼ P ∨ Q.
(b) Now write out a truth table with columns for each of
(c) Use your table to explain why (P ⇒ Q)∧(Q ⇒ R) implies ∼ (P ∧ ∼ R) , but that the converse of this implication is false.
[2+4+2 = 8 marks]
B6. Consider nonnegative functions f (N ) and g(N ) of a natural number N.
(a) Define what is meant by f (N ) = Ω(g(N )).
(b) Consider the following conditions, where K is a positive constant:
(i) lim N→∞
f (N ) g(N )
= ∞ (ii) lim N→∞
f (N ) g(N )
= 0 (iii) lim N→∞
f (N ) g(N )
Which of the following (possibly more than one)
(iv) f (N ) = O(g(N )) (v) f (N ) 6 = O(g(N ))
(vi) f (N ) = Ω(g(N )) (vii) f (N ) 6 = Ω(g(N ))
are implied by each of (i), (ii), (iii)? (There is no need to supply proofs.)
(c) It is a fact that if f (N ) = O(N ) and g(N ) + f (N ) = Ω(N log N ) then
g(N ) = Ω(N log N ).
Use limits to verify this, assuming lim N→∞
g(N ) + f (N ) N log N
exists.
(d) It is a theorem that any sorting algorithm has running time which is Ω(N log N ). Use this and the result of (c) to sketch a proof that any algorithm which finds the convex hull of a finite set of N points in the plane, represented by vertices of a convex polygon in standard form, also has running time which is Ω(N log N ).
(Hint: x 1 <... < xN if and only if (x 1 , x^21 ) ,... , (xN , x^2 N ) are vertices of a convex polygon in standard form.)
[1+3+4+7 = 15 marks]