{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

final_702_08

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

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

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 0 + n i =1 c i x i + 1 i<j n c ij x i x j where c 0 , c i , and c ij are given constant coefficients, and x i ∈ { 0 , 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 ∈ { 0 , 1 } ). Then, by replacing some x i and ¯ x i by 1 ¯ x i and 1 x i respectively, φ +

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### 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
Ask a homework question - tutors are online