Question: A thief repeatedly robs the same bank. To avoid capture, he decides to never rob the bank fewer than 10 days after the last robbery.

 A thief repeatedly robs the same bank. To avoid capture, he

decides to never rob the bank fewer than 10 days after the

A thief repeatedly robs the same bank. To avoid capture, he decides to never rob the bank fewer than 10 days after the last robbery. He has obtained information, for the next n days, on the amount of money b that is held at the bank on day i. (a) Let r(i) be the maximum amount of revenue the thief can safely obtain from day 1 through day i. Give a recurrence relation for r(i). (b) Describe a dynamic program based on this recurrence. What is the runtime of your algorithm? Now consider the above problem when (1) for each day, there is an integer value giving the amount of work w; that the thief must perform to rob the bank on that day (due to the amount of security on that day); and (2) there is an additional constraint that the sum of work the thief ever performs is less than some value W. Let r(ij) be the maximum amount of revenue obtainable on days 1 through i, with at most j total work (a) Give a recurrence relation for r(i,j). (b) Describe a dynamic program based on this recurrence. What is the runtime of your algorithm

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!