This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: CS 473G Homework 3 (due March 9, 2007) Spring 2007 CS 473G: Graduate Algorithms, Spring 2007 Homework 3 Due Friday, March 9, 2007 Remember to submit separate, individually stapled solutions to each problem. As a general rule, a complete, full-credit solution to any homework problem should fit into two typeset pages (or five hand-written pages). If your solution is significantly longer than this, you may be including too much detail. 1. (a) Let X [1 .. m ] and Y [1 .. n ] be two arbitrary arrays. A common supersequence of X and Y is another sequence that contains both X and Y as subsequences. Describe and analyze an efficient algorithm to compute the function scs ( X, Y ) , which gives the length of the shortest common supersequence of X and Y . (b) Call a sequence X [1 .. n ] oscillating if X [ i ] < X [ i +1] for all even i , and X [ i ] > X [ i +1] for all odd i . Describe and analyze an efficient algorithm to compute the function los ( X ) , which gives the length of the longest oscillating subsequence of an arbitrary array X of integers....
View Full Document
- Spring '11
- Graph Theory, Empty set, Natural number, Graph theory objects, Travelling salesman problem