# Ex-W00 - YORK UNIVERSITY Faculty of Pure Applied Science...

This preview shows pages 1–3. Sign up to view the full content.

YORK UNIVERSITY Dept. of Computer Science Faculty of Pure & Applied Science May 14, 2001 FINAL EXAMINATION COSC3101: Design & Analysis of Algorithms Fiv e problems, 180 minutes. Crib Sheet: You may use a crib sheet with your name and student number on it as explained in the course. Submit your crib sheet together with your exam booklet, when the exam is over. Do not spend too much time on a single problem. Read them all through first and solve them in the order that allows you to make the most progress. Do not use any electronic/mechanical computation devices. You will be graded not only on the correctness of your answer, but also on the clarity with which you express it. Be neat. Use the back of the pages for scratch work. This booklet consists of 9 pages, including this cover page. Name: Student Number: Problem Worth Mark 1 20 2 15 3 15 4 25 5 25 TOTAL 100

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
-2- Problem 1. [20%] Fill in the underlined blanks with the most appropriate and most simplified answer. (a) If the average-case time complexity of an algorithm is Θ ( n lg n ), then its worst-case time complexity is _______________. (b) n i = 1 Σ (3 lg i + i n + n lg n i ) = Θ (__________________). (c) The solution of the recurrence T ( n ) = 4 T ( n 4 + f8e5 f8e5 n ) + 4 n + f8e5 f8e5 n is T ( n ) = Θ (________________). (d) Name four greedy algorithms with their greedy choices learned in the course: (i) _________________________________, greedy choice:________________________________ , (ii) _________________________________, greedy choice:________________________________ , (iii) _________________________________, greedy choice:________________________________ , (iv) _________________________________, greedy choice:________________________________ . (e) Consider the integer sequence given by the recurrence g 0 = 0, g 1 = 1, and g n = 2 g n - 1 + 3 g n - 2 , for all n 2. By a fast technique learned in class, we can compute g n , for an arbitrary given n
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern