subject

Suppose you are managing a consulting team of expert computer hackers, and each week you have to choose a job for them to undertake. The set of possible jobs is divided into those that are low-stress (e. g. setting up a Web site for a class at the local elementary school) and those that are high-stress (e. g., protecting the dean’s most valuable secrets.) The basic question each week is whether to take on a low-stress job or a high-stress job. If you select a low-stress job for your team in week i, then you get a revenue of li > 0 dollars; if you select a high-stress job, you get a revenue of hi > 0 dollars. High-stress jobs typically pay more. The catch, however, is that in order for the team to take on a high-stress job in week i, it is required that they do no job (of either type) in week i − 1; they need a full week of prep time to get ready for the crushing stress level. On the other hand, it is okay for them to take a low-stress job in week i even if they have done a job (of either type) in week i − 1. So, given a sequence of n weeks, a plan is specified by a choice of low-stress, high-stress or none for each of the n weeks, with the property that if high-stress is chosen for week i > 1, then none has to be chosen for week i − 1. (It is okay to choose a high-stress job in week 1.) The value of the plan is determined in the natural way; for each i, you add li to the value if you choose low-stress in week i, and you add hi to the value if you choose high-stress in week i. (You add 0 if you choose none in week i.) Given sets of values l1, l2, ..., ln and h1, h2, ..., hn, find a plan of maximum value (such a plan is called optimal.) Give an efficient algorithm to take the input values and return the value of an optimal plan.

What would a recursive dynamic programming solution to this be?

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:20
Cengagenowv2 is a comprehensive online learning tool. using cengagenowv2, you may access all of the following except: 2. each time you log in, cengagenowv2 automatically performs a system check and informs you if your computer does not meet the cengagenowv2 system requirements. 3. which tab/page allows you to easily track your assignment scores, number of submissions, time spent, as well as the ability view assign
Answers: 3
question
Computers and Technology, 22.06.2019 22:40
Least square fit to polynomial write a function leastsquarefit3pol that solves a linear system of equations to find a least squares fit of a third order polynomial to an experimental data set given as two row arrays. the function leastsquarefit3pol must explicitly solve a set of linear equations and cannot use polyfit. there should be no restriction on the size of the problem that can be solved.
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
Which tab is used to change the theme of a photo album slide show? a. design b. view c. transitions d. home
Answers: 1
question
Computers and Technology, 23.06.2019 03:30
In vista and windows 7, the appearance and personalization option allows you to change the
Answers: 1
You know the right answer?
Suppose you are managing a consulting team of expert computer hackers, and each week you have to cho...
Questions
question
SAT, 02.02.2021 17:30
question
Mathematics, 02.02.2021 17:40
question
Geography, 02.02.2021 17:40
question
Mathematics, 02.02.2021 17:40