I was just thinking about a problem (not homework :) ):
There are 30 students in a classroom. Each needs to choose a book to do a book report on. However, to discourage cheating, no two students can receive the same book.
The teacher asks each student to list their top 3 choices. If the student gets their first choice, their happiness will be 3. If they get their second choice, their happiness will be 2. If their third choice, happiness=1, and if they get a book that is not on their list, their happiness is 0.
How can one optimize the students' total happiness?
I have looked into Mathematica's optimization functions but have not had much luck on optimizing a function that is discrete like this rather than a set of inequalities. Could someone please help me by showing how to set up and solve this example problem?