Question: Notice: If you do not how to do it, just SKIP this and do NOT COPT + PASTE ANSWERS FROM OTHER QUESITONS. I REALLY NEED
Notice: If you do not how to do it, just SKIP this and do NOT COPT + PASTE ANSWERS FROM OTHER QUESITONS. I REALLY NEED HELP AND WANT THE REAL ANSWER, THANK YOU!
Notice: If you do not how to do it, just SKIP this and do NOT COPT + PASTE ANSWERS FROM OTHER QUESITONS. I REALLY NEED HELP AND WANT THE REAL ANSWER, THANK YOU!

Notice: If you do not how to do it, just SKIP this and do NOT COPT + PASTE RANDOM ANSWERS FROM OTHER QUESITONS. I REALLY NEED HELP AND WANT THE REAL ANSWER, THANK YOU!
Notice: If you do not how to do it, just SKIP this and do NOT COPT + PASTE RANDOM ANSWERS FROM OTHER QUESITONS. I REALLY NEED HELP AND WANT THE REAL ANSWER, THANK YOU!
1. (15 marks)A student taking a test uses greedy strategies to maximize the test results. The input to this problem consists of the test time K in minutes, and the estimated) times to solve each of the n questions on the test, T[1..n], where time T[i] > 0 is the time in minutes for solving question i, 1 K so that there is not enough time to solve all test questions. (a) (4 marks)Assume that the goal is to maximize the total amount of time the student uses for the completed test questions. Does a greedy algorithm that chooses the longest question at each step (always) generates optimal solutions? If not, given a counterexample. (b) ( 11 marks)Assume that the goal is to maximize the total number of completed test questions. Design a greedy algorithm for it and prove that your algorithm is correct (always generates optimal solutions)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
