ROD CUTTING ALGORITHM 1. Basic (10 points) Rod cutting. Recall the rod cutting p
ID: 3819844 • Letter: R
Question
ROD CUTTING ALGORITHM
1. Basic (10 points) Rod cutting. Recall the rod cutting problem we learned (ch 15). In the problem, we given a rod of length n along with an array tpilisism, in which pi denotes the price you can charge for a rod/piece of length i The goal is to cut the given rod of length n into smaller pieces or do nothing) so that the total price of the pieces is maximized. Fill out the following table using the recursion in the textbook. Here ri denotes the max revenue you can get out of a rod of length i. No need to explain your results. length i 1 2 3 4 5 6 7 8 price pi 1 3 7 4 9 13 15 16Explanation / Answer
Final answers: 1,3,7,8,10,14,15,17
Length i 1 2 3 4 5 6 7 8 Price pi 1 3 7 4 9 13 15 16 Division of rod (Lengths) 1 2 3 3+1 3+2 3+3 7 6+2 Total price ri 1 3 7 8 10 14 15 17Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.