final_702_08 - CAS 702 Data Structures and Algorithms Final...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CAS 702 Data Structures and Algorithms Final Exam 60p December 8, 2008 duration of the exam: 3 hours Name: Student Number: Signature: Problem 1 a. Prove that (lg n ) b = O ( n a ) where a and b are strictly positive constants. 5p b. Show how can the output of the Floyd-Warshall algorithm be used to detect the presence of a negative-weight cycle on a simple directed graph. 5p c. Assuming that the best running time of a comparison based algorithm to sort n elements is ( n lg n ), prove that the running time of constructing a binary search tree from an arbitrary list of n elements can not be ( n ). 5p Problem 2 Consider a function = c + n i =1 c i x i + 1 i<j n c ij x i x j where c , c i , and c ij are given constant coefficients, and x i { , 1 } . First, can be transformed into an equivalent form + such that all the coefficients are nonnegative by replacing some x i by 1 x i (note that x i { , 1 } ). Then, by replacing some x i and x i by 1...
View Full Document

This note was uploaded on 10/26/2009 for the course CAS 702 taught by Professor Zera during the Fall '09 term at McMaster University.

Page1 / 2

final_702_08 - CAS 702 Data Structures and Algorithms Final...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online