Class Scheduling algorithm to show best match with criteria?
I am looking to create a system where you can input the courses (3-7 courses) that you want to take at a college and then select preferences (Morning, Day, Evening, Night / M, T, W, TR, F). I need a way so that when the program queries the database (MySQL) it returns the best possible schedule that was made according to those parameters. I am writing it in php. Does any one know the best way to do this? Or a link to some sample code I could understand it from? It's NP-complete. If you want something simple and fast, write a construction heuristic like First Fit Decreasing . Simply put, it