This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Introduction to Algorithms May 21, 2009 Massachusetts Institute of Technology 6.006 Spring 2009 Professors Sivan Toledo and Alan Edelman Final Exam Final Exam • Do not open this quiz booklet until directed to do so. Read all the instructions on this page. • When the quiz begins, write your name on every page of this quiz booklet. • You have 180 minutes to earn 200 points. Do not spend too much time on any one problem. Read them all through first, and attack them in the order that allows you to make the most progress. • This quiz booklet contains 12 pages, including this one. Two extra sheets of scratch paper are attached. Please detach them before turning in your quiz at the end of the exam period. • This quiz is closed book. You may use three 8 1 2 00 × 11 00 or A4 crib sheets (both sides). No calculators or programmable devices are permitted. No cell phones or other communications devices are permitted. • Write your solutions in the space provided. If you need more space, write on the back of the sheet containing the problem. Pages may be separated for grading. • Do not waste time and paper rederiving facts that we have studied. It is sufficient to cite known results. • Show your work, as partial credit will be given. You will be graded not only on the correct ness of your answer, but also on the clarity with which you express it. Be neat. • Good luck! Problem Parts Points Grade Grader Problem Parts Points Grade Grader 1 8 24 5 1 24 2 4 32 6 1 24 3 3 24 7 1 24 4 3 24 8 1 24 Total 200 Name: 6.006 Final Exam Name 2 Problem 1. True or False [24 points] (8 parts) For each of the following questions, circle either T (True) or F (False). Explain your choice. (No credit if no explanation given.) (a) T F There exists an algorithm to build a binary search tree from an unsorted list in O ( n ) time. Explain: (b) T F There exists an algorithm to build a binary heap from an unsorted list in O ( n ) time. Explain: (c) T F To solve the SSSP problem for a graph with no negativeweight edges, it is nec essary that some edge be relaxed at least twice. Explain: (d) T F On a connected, directed graph with only positive edge weights, BellmanFord runs asymptotically as fast as Dijkstra. Explain: 6.006 Final Exam Name 3 (e) T F A Givens rotation requires O (1) time. Explain: (f) T F In the worst case, merge sort runs in O ( n 2 ) time. Explain: (g) T F There exists a stable implementation of merge sort....
View
Full Document
 Fall '08
 ErikDemaine
 Algorithms, Graph Theory, Bitdiddle Bin

Click to edit the document details