views:

539

answers:

8

hey Stackoverflowians,

I'm bored, and this problem just haunted me again. Back at university, I used to always wonder how they schedule exams. The ability to schedule 10k student to do exams in 2 weeks and guarantee that no student will have an exam in two consecutive periods. I'm assuming some form of heuristics be applied.

I'm bored tonight, and if you give me the right tools, I'll work on it tonight and up to the weekend

cheers, dassouki

EDIT 1: I guess the assumption would be that all we know is the following:

  1. Number of students and the courses that they're each enrolled in
  2. Number of exam period spots
+1  A: 

It's expensive, but I've seen CPLEX used for similar types of problems.

Jerry Fernholz
+2  A: 

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
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
+1  A: 

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
+1  A: 

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
+2  A: 

I know this is off-topic for SO, but my university simply scheduled the exams in blocks that matched the class times. So, everyone who had a class MWF at 1:20pm was in an exam on the 15th at 1:00pm. Since you can't take two classes at the same time, it was impossible to have exam conflicts.

Jason Berkan
+1 - nice, nonetheless
Jacob
+2  A: 

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
+1  A: 

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
+1  A: 

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
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
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