{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

final_702_07 - 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
CAS 702 – Data Structures and Algorithms – Final Exam – 60p December 14, 2007 – duration of the exam: 3 hours Name: Student Number: Signature: Problem 1 a. Prove or disprove the following: f ( n ) = Θ( f ( n/ 2)). 5p b. Consider the following: An array of n numbers contains only 1 , 0 and 1 can be sorted in O ( n ) time in the worst case. If true , describe an O ( n ) time algorithm briefly (you are not required to prove its correctness), if false give the correct worst case running time. 5p c. Prove or disprove the following: If a node in a binary search tree has two children, then its successor has no left child and its predecessor has no right child. 5p Problem 2 Consider a positive flow f in a network G = ( V, E ). We wish to decompose f into positive simple path (or cycle) flows f i , i.e. f = f i , where the edges of f i form a simple path form s to t in G , or any cycle in G . (Recall: a simple path has no repeated vertices, and a simple cycle has no repeated vertices aside from the start/end vertex).
Background image of page 1

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

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}