Question: Exercise 4 . How to PASS THE MIDTERM. [ 1 8 points ] Consider an exam with ( n ) questions, each worth
Exercise How to PASS THE MIDTERM.
points
Consider an exam with n questions, each worth vi points and requiring ti minutes to solve.
Your goal is to pass the exam with the minimum possible effort. Write an algorithm that, given arrays vldots n tldots n and a threshold V representing the passing score, finds the subset of questions requiring the least time to achieve the passing score.
a points Let Ti v be the minimum time required to score at least v points by solving any subset of the first i problems. Write a recursive expression for Ti v
b points Write the algorithm based on dynamic programming.
c points Analyze the complexity of the proposed algorithm. Justify briefly.
d points Now, suppose that solving a problem partially can yield a proportionate score eg solving x of a problem gives you x of the points Describe an On log n algorithm to solve the same problem.
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
