subject
Engineering, 04.06.2020 14:07 fordd4

Consider the Job Selection problem from lecture. You will modify the solution to this problem to work for a related problem. In lecture we had the rule that if you work one day you can’t work the next (or previous). In the modified problem you are allowed to work two days in a row but not three days in a row (so if you work 2 days in a row you can’t work the day before these 2 days or the day after). 1. Express the modified problem formally with input and output conditions. 2. State a self-reduction for your problem. Use the self-reduction from lecture as inspiration. 3. State a dynamic programming algorithm based off of your self reduction that computes the maximum earnings. 4. Design a function that recovers the days that must be worked to achieve the maximum earnings. 5. Compute the maximum earnings and the days to work for this input P=[5, 9, 12, 7, 5, 13, 7, 5, 4, 9, 8, 7, 5, 8, 4, 3, 5, 10, 4, 6, 8, 12, 5, 6, 3, 7, 16, 2, 2, 16] 6. What are the worst case time and space requirements of your complete solution?

ansver
Answers: 3

Another question on Engineering

question
Engineering, 03.07.2019 14:10
Amass of m 1.5 kg of steam is contained in a closed rigid container. initially the pressure and temperature of the steam are: p 1.5 mpa and t 240°c (superheated state), respectively. then the temperature drops to t2= 100°c as the result of heat transfer to the surroundings. determine: a) quality of the steam at the end of the process, b) heat transfer with the surroundings. for: p1.5 mpa and t 240°c: enthalpy of superheated vapour is 2900 kj/kg, specific volume of superheated vapour is 0. 1483 m/kg, while for t 100°c: enthalpy of saturated liquid water is 419kj/kg, specific volume of saturated liquid water is 0.001043m/kg, enthalpy of saturated vapour is 2676 kj/kg, specific volume of saturated vapour is 1.672 m/kg and pressure is 0.1 mpa.
Answers: 3
question
Engineering, 03.07.2019 15:10
If you were designing a bumper for a car, would you prefer it to exhibit elastic or plastic deformation? why? consider the functions of a bumper in both a minor "fender-bender" and a major collision.
Answers: 1
question
Engineering, 04.07.2019 03:10
What precautions should you take to prevent injuries when dealing with heavy loads?
Answers: 1
question
Engineering, 04.07.2019 18:10
Afull journal bearing has a journal diameter of 27 mm, with a unilateral tolerance of -0.028 mm. the bushing bore has a diameter of 27.028 mm and a unilateral tolerance of 0.04 mm. the l/d ratio is 0.5. the load is 1.3 kn and the journal runs at 1200 rev/min. if the average viscosity is 50 mpa-s, find the minimum film thickness, the power loss, and the side flow for the minimum clearance assembly.
Answers: 1
You know the right answer?
Consider the Job Selection problem from lecture. You will modify the solution to this problem to wor...
Questions
question
Mathematics, 15.07.2021 19:00
Questions on the website: 13722363