Q3 Modified Rod-Cutting Problem Assume the problem requirements change and Rod-Cutting Problem. You are now a buyer of rods, and you have a project that requires a total of n inches in rods. You would like to buy that at the lowest possible purchase price. Additionally, rods of length less than y are out of stock. I.e. you can buy rods between y and n Modified Buy Rod-Cutting: Given: The price array p, and length n, where p[i] is the price for buying rod of length i. Output: What is the min cost to buy a rod and associated cut strategy for a rod of length n, such that the minimum size rod that can be bought/cut is of length y (your y value). a.) What is the optimality recurrence for this problem? b.) What is the general recurrence of this problem? e.)Create a BF algorithm for this problem. Please select file(s) Select file(s)

icon
Related questions
Question

Please solve the following problem as soon as possible. This is analysis of algorithms course and we use c++ psuedo code. Show all work and show explanation: 

Q3 Modified Rod-Cutting Problem
Assume the problem requirements change and Rod-Cutting Problem. You are now a
buyer of rods, and you have a project that requires a total of n inches in rods. You
would like to buy that at the lowest possible purchase price.
Additionally, rods of length less than y are out of stock. I.e. you can buy rods between
y and n
Modified Buy Rod-Cutting:
Given: The price array p, and length n, where p[i] is the price for buying rod of length
i.
Output: What is the min cost to buy a rod and associated cut strategy for a rod of
length n, such that the minimum size rod that can be bought/cut is of length y (your y
value).
a.) What is the optimality recurrence for this problem?
b.) What is the general recurrence of this problem?
e.)Create a BF algorithm for this problem.
Please select file(s)
Select file(s)
Transcribed Image Text:Q3 Modified Rod-Cutting Problem Assume the problem requirements change and Rod-Cutting Problem. You are now a buyer of rods, and you have a project that requires a total of n inches in rods. You would like to buy that at the lowest possible purchase price. Additionally, rods of length less than y are out of stock. I.e. you can buy rods between y and n Modified Buy Rod-Cutting: Given: The price array p, and length n, where p[i] is the price for buying rod of length i. Output: What is the min cost to buy a rod and associated cut strategy for a rod of length n, such that the minimum size rod that can be bought/cut is of length y (your y value). a.) What is the optimality recurrence for this problem? b.) What is the general recurrence of this problem? e.)Create a BF algorithm for this problem. Please select file(s) Select file(s)
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer