Refer to the prev problem https://www.mathworks.com/matlabcentral/cody/problems/45416-don-t-be-greedy
A list of assignments is given to the students. For this problem, assume - each of the assignment carries equal marks.
Different assignments take different amounts of time to complete - which is also given.
But for each day of delay before starting an assignment, a penalty is added.
Assignment = [ a1, a2, a3, a4, a5, a6] Marks = [100,100,100,100,100,100] Time Req. = [ 2, 4, 3, 8, 1, 10] Penalty = [ 10, 4, 1, 2, 5, 2]
Now, say if he starts with the 1st assignment - then a penalty will be added to all the other assignments for two days since it takes 2 days to complete the 1st assignment.
Then say he starts the 2nd assignment which takes 4 days to complete. So penalty will be added for the other assignments that he hasn't started yet (not the 1st one--since it's been finished)
In which order should he finish his assignments so that he has to suffer the minimum penalty.