Are all scheduling problems NP-Hard?

隐身守侯 提交于 2019-11-28 20:32:21
Ian Ringrose

The hardest part of most scheduling problems in real life is getting hold of a reliability and complete set of constraints. If we take the example of creating a university timetable:

  • Professor A will not get up in the morning, he is on a lot of committees, but no-one will tell the timetable office about this sort of constraint
  • Department 1 needs the timetable by the start of term, however, Department 2 that uses the same rooms is unwilling to decide on the courses that will be run until after all the students have arrived
  • Etc

Then you need a schedule system that can cope with changes, so when one constraint is changed at the last minute you don’t have to change the complete timetable.

All of the above is normally ignored in research papers about scheduling systems. As to NP completeness of a given scheduling problem, in real life you don’t care as even if it is not NP complete you are unlikely to even be able to define what the “best solution” is, so good enough is good enough.

See http://www.asap.cs.nott.ac.uk/watt/resources/university.html for a list of papers that may help get you started; there are still many PHDs to be had in scheduling software.

There are often good approximation algorithms for NP-hard/complete optimization problems like scheduling. You might skim the course notes by Ahmed Abu Safia on Approximation Algorithms for scheduling or various papers.

In a sense, all public key cryptography is done with "less hard" problems like factoring partially because NP-hard problems offer up too many easy cases. It's the same NP-completeness that makes them "morally hard" which also gives them too many easy problems, which often fall within some error bound of optimal.

There is a deeper theory of hardness of approximation that discusses the limitations of approximation algorithms though.

You can use dynamic programming to solve some of these things. Greedy algorithms also come to mind. Scheduling theory is both deep and beautiful but those two I find will solve most of the problems I've faced. Perhaps I've been lucky.

What do you mean with startBy?

With startAfter and if there is only one resource, then a fast solution could be to use topological sorting. The example algorithm runs in linear time, but does not include the error case if the graph contains cycles.

Here's one that isn't.

Schedule a set of jobs i= 1,2...n on a single machine which each take time t(i) so that the average waiting time is minimized.

Solution: Sort in increasing order of t(i). O(n log n)

Good list here

Consider the scheduling problem that is in the class P:

Input: list of activities which include the start time and finish time.

Sort by finish time.

Select the first N elements of this sorted list to find the maximum amount of activities you can schedule in a given time.

You can add caveats like: all activities must end at 5pm, well in this case as you work through the list, stop once you reach an activity which ends after this time.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!