Arg, too late. Each student goes to 2 classes then? That would mean that you can assign to "infinite size" classes all students who chose it as 1st or 2nd choice. That should reduce the problem domain quite a bit.