6

I wonder how to schedule 10k students to do exams in 2 weeks and guarantee no student will have an exam in two consecutive periods. I'm assuming some form of heuristics be applied.

All we know :

  1. Number of students and the courses that they're each enrolled in.
  2. Number of exam period spots.
user4157124
  • 2,809
  • 13
  • 27
  • 42
dassouki
  • 6,286
  • 7
  • 51
  • 81
  • If they actually do that, things have changed since I went to college -- I definitely had some exams during consecutive periods. – Jerry Coffin Oct 20 '09 at 21:55
  • 1
    I fear it's still done by hand in the vast majority of cases. It's not like the ten thousand students each have a completely different set of exams, right? There are probably a few tens of 'exam groups', each with up to a few hundred students in it. It shouldn't be that much of a problem to schedule them by hand if you have enough space. – Joren Oct 20 '09 at 21:58
  • I went to college just a few years ago. Even though all our scheduling systems were electronic, the onus was on the conflicted student to resolve conflicting scheduled times and find an administrator to reschedule them. The system had no scheduling intelligence of its own. – ephemient Oct 20 '09 at 21:59
  • I always suspected that they schedule 'complementary' courses so that they did't conflict. That is, a sophomore EE major is likely to be taking both 'Elements of EE' and 'Signals & Systems', so they'd never schedule them together. Though it would be safe to schedule 'Signals II' conflicted, because a freshman would never take it. It's the electives that screw things up (and where you usually had to reschedule an exam). – Marc Bernier Oct 22 '09 at 16:43

7 Answers7

17

This is a famous computer science problem (the exam scheduling problem) which is known to be NP-hard. You might not be able to solve it over a weekend.

cdiggins
  • 17,602
  • 7
  • 105
  • 102
5

This is an example of a constraint satisfaction problem, which is a difficult class of problems. Some of them are in the class NP. Large commercial software packages exist for trying to solve problems like these (eg CPLEX) - and in general, they use some mathematics and lots of heuristics.

Peter
  • 127,331
  • 53
  • 180
  • 211
  • A good comment, but not exactly what I call an "answer." Do you have any suggestions for how to solve this problem, or resources on the topic? – San Jacinto Oct 22 '09 at 13:40
2

I used the tabu search during my master. The idea is not too complicated:

  1. start from one possible solution (anyone) and pounder the it (e.g. give -1000 points if one student has two exams at the same time)
  2. change that solution by just changing a few assignments and recalculate the ponderation
  3. if 2. is better than 1. and repeat starting with 2. as the root solution

if you're blocked, you can "visit" other solutions by making important changes to the initial solution.

Vladimir
  • 6,853
  • 2
  • 26
  • 25
1

The problem can actually be a bit more general than that. For instance, at my school, exams are scheduled by when the class is scheduled - i.e. all classes which meet at the same time normally during the semester, have an exam scheduled in a certain block of the exam week (not necessarily the same time as the regular class meeting, however). Thus, conflicts generally don't exist since students wouldn't be attending two classes in the same meeting time for obvious reasons, and thus wouldn't have two exams at the same time.

However, this means that then you still need to schedule classes so that they don't conflict. :)

Amber
  • 507,862
  • 82
  • 626
  • 550
1

When I was a senior in college, we did a final project in our AI class similar to this. We wrote a (barely) working system to schedule classes in buildings at appropriate times. Certain rules could not be violated: if the prof. needed a multimedia classroom, he got one. If it was a CS class, then it shouldn't be scheduled in the Art building. Profs shoulnd't have more than 2 hours between a class, etc.

We used a genetic algorithm.

San Jacinto
  • 8,774
  • 5
  • 43
  • 58
1

A few things to make the problem simpler. You can probably shrink the number of "units to schedule" down from tens of thousands to a few hundred, by looking at people who are sitting the same set of exams. If you have 300 people who all are sitting "Introduction to Computer Science" and "Maths for CS students", you can schedule all 300 as a single unit, because they will all have the same constraints and you (probably) do not want identical exams to be given in multiple slots.

Vatine
  • 20,782
  • 4
  • 54
  • 70
  • 1
    Why not just schedule based on each class? Forget students, think at the class level. You can't be in two places at once regardless of whether it is an exam or a lecture. – San Jacinto Oct 22 '09 at 12:52
  • Main reason is that when I was at university, there was nothing (except time) to stop students from taking extra classes. Add in the complication of re-taking a failed exam later on and you're in a world of pain. – Vatine Oct 23 '09 at 09:24
1

This is an application of the graph coloring problem. This problem can be represented as a graph where every vertex is a course and an edge between two vertices mean there is a common student enrolled in both courses. So this is a graph coloring problem where minimum number of time slots is equal to the minimum number of color required for coloring the vertices of the graph such way that no two adjacent vertices share the same color.

Sajib Mahmood
  • 3,382
  • 3
  • 37
  • 50