Problem 45450. Don't be Too Greedy!
Can you give more explain about the example?
say i start 1st assign. today -- now it'll take me 2 days to complete. once I start with one assign, I've to finish it first - then jump to the next assign.
Now for these 2 days, I couldn't 'start' the other assign. so i've to suffer given penalty for each assign. each day. that is = 4*2 + 1*2 + 2*2 + 5*2 + 2*2 .= Σt(1)*p
After 2 days, say I start the last assign. which will take 10 days to finish. so for each of these 10 days - the penalty will keep adding for those assigns. that I've not yet started.
this way I'll continue.
at the end, a particular amount of penalty will be accumulated.
I want that total penalty to be minimum.
there'll be many combinations - among all those, which one will give me minimum penalty?
hope it is clear
OK, I see now
It seems that these problems have multiple degenerate solutions. For example, problem 1 is solved by [1 5 2 3 4 6] or [5 1 2 3 4 6]. Problem 2 has 4 solutions.
if there exists more than one possible scenario, then the assignments are to be assigned based on their priority - meaning, 1st task should get preference over 5th.
similar is in the case of test suite 2 -- a3 should come before a6.
I think it should be ok then.
Please, Asif, add the example that you gave in the comments to the problem description. It will make the problem clearer.
Problem Recent Solvers4
Is my wife right? Now with even more wrong husband
More from this Author165
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!