Question

(Basic) (10 points) Rod cutting. Recall the rod cutting problem we learned (ch 15). In the problem, were given a rod of length n along with an array pi 1 i n, 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 1 2 3 4 5 6 7 8 3 7 9 13 15 16 price pi

0 0
Add a comment Improve this question Transcribed image text
Answer #1
Length i 1 2 3    4    5    6 7       8
Price pi 1 3 7    4    9 13 15      16
Cutting of the rod (new lengths) 1 2 3 1+3 2+3 3+3 7 3+3+2
Total maximum price 1 3 7    8 10 14 15      17
Add a comment
Know the answer?
Add Answer to:
Rod cutting. Recall the rod cutting problem we learned (ch 15). In the problem, we're given...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Rod-cutting problem Design a dynamic programming algorithm for the following problem. Find the maximum total sale...

    Rod-cutting problem Design a dynamic programming algorithm for the following problem. Find the maximum total sale price that can be obtained by cutting a rod of n units long into integer-length pieces if the sale price of a piece i units long is pi for i = 1, 2, . . . , n. What are the time and space efficiencies of your algorithm? Code or pseudocode is not needed. Just need theoretical explanation with dynamic programming with recurrence relation...

  • IMPORTANT: Please write your answer inside the box that follows each question. Question 1 (4 points)...

    IMPORTANT: Please write your answer inside the box that follows each question. Question 1 (4 points) Consider the following "greedy" strategy for the rod cutting problem: define the density of a rod of length i to be p/i, that is, its value per inch. The greedy strategy for a rod of lengt applying the greedy strategy to the remaining piece of length n - i. h n cuts off a first piece of length i, which has the maximum density....

  • 10. The Beck & Watson article is a Group of answer choices quantitative study qualitative study...

    10. The Beck & Watson article is a Group of answer choices quantitative study qualitative study 11. Beck & Watson examined participants' experiences and perceptions using what type of research design? Group of answer choices particpant obersvation phenomenology 12. Select the participants in the Beck & Watson study Group of answer choices Caucasian women with 2-4 children Caucasian pregnant women 13. In the Beck & Watson study, data was collected via a(n) Group of answer choices internet study focus group...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT