• Home
  • University of Cambridge
  • Optimisation and Control
  • Dynamic Programming and Optimal Strategies in Optimization and Control

Dynamic Programming and Optimal Strategies in Optimization and Control

Lent Term 2016 Richard Weber MATHEMATICAL TRIPOS: PART II OPTIMIZATION AND CONTROL Example Sheet 1 1. Suppose that the matrix Mk is of dimension nk X nk+1, k € {1, ... , h}. We wish to compute the product M1M2 . . . Mn. Notice that the order of multiplication makes a difference. For example, if (n1, n2, n3, n4) = (1, 10, 1, 10), the calculation (M1M2) M3 requires 20 scalar multiplications, but the calculation M1(M2M3) requires 200 scalar multiplications. Indeed, multiplying a m x n matrix by a n x k matrix requires mnk scalar multiplications. Let F(n1, n2, ... , nh+1; h) be the minimal total number of scalar multiplications required to compute M1M2 . . . Mn. Explain why the dynamic programming equation is F(n1, n2, ... , nk+1; k) = min {ni-inini+1 + F(n1, ... , ni-1, ni+1, . .. , nk+1; k - 1)} , 1 <<< k+1 k = 1, ... , h. Hence describe an algorithm which finds the multiplication order requiring least scalar multiplications. Solve the problem for (a) h=3, (n1,n2,n3, n4) = (2, 10,5, 1); (b) h=4, (n1,n2,n3,n4, n5) = (2, 10, 1, 5, 1). Show that as h increases the amount of effort required to find the optimal order increases faster than any polynomial function of h. 2. A deck of cards is thoroughly shuffled and placed face down on the table. You turn over cards one by one, counting the numbers of reds and blacks you have seen so far. Exactly once, whenever you like, you may bet that the next card you turn over will be red. If correct you win £1000. Let F(r, b) be the probability of winning if you play optimally, beginning from a point at which you have not yet bet and you know that exactly r red and b black cards remain in the face down pack. Find F(26, 26) and your optimal strategy. Arguably, it should be possible to win the £1000 with a probability greater than 1/2 because you can wait until you have seen more black cards than red and then bet that the next card is red. Explain why this argument is wrong. 3. A gambler has the opportunity to bet on a sequence on N coin tosses. The probability of heads on the nth toss is known to be pn, n = 1, ... , N. For the nth toss he may stake any non-negative amount not exceeding his current capital (which is his initial capital plus his winnings so far) and call 'heads' or 'tails'. If he calls correctly then he retains his stake and wins an amount equal to it, but if he calls incorrectly he loses his stake. Let Xo > 0 denote his initial capital and XN his capital after the final toss. Determine how the gambler should call and how much he should stake for each toss in order to maximize E [log XN]. How would your answer differ if the aim