This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 473: Fundamental Algorithms, Spring 2012 Homework 5 (due Tuesday, 23:55:00, March 6, 2012) Collaboration Policy & submission guidelines: See homework 1. Each student individually have to also do quiz 5 online. Version: 1.11 1. ( 45 pts. ) Stock Picking. You have a group of investor friends who are looking at n consecutive days of a given stock at some point in the past. The days are numbered. i = 1 , 2 ,...,n . For each day i , they have a price p ( i ) per share for the stock on that day. For certain (possibly large) values of k , they want to study what they call kshot strategies . A kshot strategy is a collection of m pairs of days ( b 1 ,s 1 ) ,..., ( b m ,s m ), where 0 ≤ m ≤ k and 1 ≤ b 1 < s 1 < b 2 < s 2 ··· < b m < s m ≤ n. We view these as a set of up to k nonoverlapping intervals, during each of which the investors buy 1,000 shares of the stock (on day b i ) and then sell it (on day s i ). The return of a given kshot strategy is simply the profit obtained from the...
View
Full Document
 Spring '08
 Chekuri,C
 Algorithms, Graph Theory, DI, 20 pts, 35 pts, head chef, 45 pts

Click to edit the document details