Please help me to solve for b
ou're managing a consulting team of expert computer hackers, and each w you can are low-st school) and those upposk you have to choose a job for them to undertake. Now, as ell imagine, the set of possible jobs is divided into those that (e.g,, setting up a Web site for a class at the local elementary se that are high-stress (e.g., protecting the nation's most ts, or helping a desperate group of Cornell students finish t has something to do with compilers). The basic question, t tha ho week, is whether to take on a low-stress job or a high-stress Job. a pro ou select a low-stress job for your team in week i, then you get a wenue of l>o dollars; if you select a high-stress job, you get a revenue t h z 0 dollars. The catch, however, is that in order for the team to take a high-stress job in week i, it's 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 stress level. On the other hand, it's okay for them to take a low- stress job in week i even if they have done a job (of either type) in week crushing 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 " is chosen for week i 1, then "none" has to be chosen for week i -1. (It's 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 u 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 property that if high-stress none" in week i.) The problem. Given sets of values e,t2.. en and h,h.hn, find a plan of maximum value. (Such a plan will be called optimal.) Example. Suppose n=4, and the values of ei and hi are given by the g table. Then the plan of maximum value would be to choose n week 1, a high-stress job in week 2, and low-stress jobs in weeks followi ho 3 and 4. The value of this plan would be 0+50+ 10+ 1070 Week 4 10 Week 1 Week 2 Week 3 10 10 50