Question: Dynamic Programming: Need help with the problem below! Problem 3 , Test Time : Benny, is taking his CS 325 algorithms exam which consists of

Dynamic Programming: Need help with the problem below!

Problem 3, Test Time: Benny, is taking his CS 325 algorithms exam which consists of n questions. He notices that the professor has assigned points { p1, p2, ..., pn } to each problem according to the professor's opinion of the difficulty of the problem. Benny wants to maximize the total number of points he earns on the exam, but he is worried about running out of time since there is only T minutes for the exam. He estimates that the amount of time it will take him to solve each of the n questions is { t1, t2, ..., tn }. You can assume that Benny gets full credit for every question he answers completely. Develop an algorithm to help Benny select which questions to answer to maximize his total points earned. Note: NO partial credit is assigned to problems that are only partially completed.

(a) Verbally describe a dynamic programming algorithm to solve this problem.

(b) Give pseudo code with enough detail to obtain the running time, include the formula used to fill the table or array.

(c) What is the running time of your algorithm? Explain.

(d) Would Benny use this algorithm if the professor gave partial credit for partially completed questions on the exam? Discuss.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!