

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Instructions: Solve any three of the following four problems. Each problem is worth ten points. Before giving more detailed descriptions of algorithms, briefly describe the main ideas and techniques, in 1-3 sentences. Complete pseudocode is not required, as long as you clearly state what your algorithm is doing. You may use without proof any well-known algorithms. Give at least an informal proof for all your answers; for algorithms, this should include a convincing argument of correctness as well as a time analysis. The time complexity of your algorithms will influence your score; for instance, you might get only 8 or 9 points for an O ( n^2 ) algorithm if there is an O ( n log n ) algorithm. The relative weight of efficiency versus correctness is given after the specific problems.
usp[u]= {
1 if the shortest path from s to u is unique 0 if not
Show how this can be achieved using a modification of Dijkstra’s algorithm. [Correctness 7 points; efficiency 3 points.]
Give a dynamic programming algorithm which returns the cost of the optimal partitioning. Hint : one possible solution uses the following recurrence: for m < n and j < k ,
≤ =+
m
i l
1
Be sure to handle the base cases. [Correctness 7 points; efficiency 3 points.]