Question: Part 1 - recursive run of a sample rod cutting problem with memoization In class we discussed a sample run of the unrefined, recursive rod
Part recursive run of a sample rod cutting problem with memoization
In class we discussed a sample run of the unrefined, recursive rod cutting algorithm, but also hinting at how to do the same problem using memoization. In this exercise, I want you to do memoization for this instance of the problem right away:
LengthsPrices
Run the algorithm on paper. Make sure to show every detail of that run. Use the notes of the demonstration I gave in class go to class notes, ClassesLecture Rod Cutting to see what I expect you to put on paper.
Based on that run, answer the following questions:
What is the value of the optimal solution? Just name the number.
What is the solution, ie how does the rod of inches need to be cut? Show that you did recursive backtracking to get the result.
Part bottom up run of the same, above problem
Now come up with the solution of the same problem above, but now use a bottom up approach. Convince yourself that you need to get the same results. For that reason, I only ask you to run the algorithm on paper, there are no questions as the answers would be the same.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
