0

The problem of scheduling n jobs of known durations t1,t2,...tn for execution on a single processor. The jobs can be executed in any order, one job at a time. we want to find a schedule that minimizes the total time spend by all the jobs in this system. The time spent by one job is the sum of the time spent on waiting plus the time spent on its execution. Design a greedy algorithm for this problem.

....so far i am thinking i have to get the shortest jobs first and to get that i would have to sort the array , but is it a single array ?

  • I don't get it. If it's one processor, just fire them one by one, there won't be any waiting time. The total time will be the sum of all the jobs durations. – Joris Van Regemortel Jun 18 '13 at 13:33
  • This isn't remotely coding-style related. The problem sounds like something from a combinatorial optimization book. You could grab a copy of Korte, Vygen: "Combinatorial Optimization". – arne Jun 19 '13 at 08:49

0 Answers0