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, 04.07.2019 12:10
On a average work day more than work place firs are reorted
Answers: 1
question
Engineering, 04.07.2019 18:10
Thermal stresses are developed in a metal when its a) initial temperature is changed b) final temperature is changed c) density is changed d) thermal deformation is prevented e) expansion is prevented f) contraction is prevented
Answers: 2
question
Engineering, 04.07.2019 18:10
The higher the astm grain size number, the finer the gran is. a)-true b)-false
Answers: 2
question
Engineering, 04.07.2019 18:10
Ifa component is made of two or more materials with different modulus of elasticity (e), it is called a composite member and we calculate the factor·n". mention the formula for calculating n". also, ifn> 1, explain what will happen to the 1. transformed.gi) ifn 1, what will happen to the material when transformed material when
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
Questions on the website: 13722367