I am doing a project that makes a course-table(location and time) for students that minimize their walking distance by using genetic algorithm.

There are 500 students and each of them will register for 3 mandatory courses out of 10 courses, and 2 elective courses out of 40 courses. So 50 courses in total and each student will have 5 classes to take.

For example:

student1 = [(math100,0), (phys100,1), (chem100,2), (art100,3), (hist100,4)]. This means for student1, his first class is math100, his second class is phys100 and etc.

And the course-table will looks like:

|        Course       |      Location    |  Time Section    |
|---------------------|------------------|------------------|
|       math 100      |     Building A   |        0         |
|       phys 100      |     Building B   |        1         |
|       chem 100      |     Building C   |        2         |

The problem I am facing right now is, how I know if there exists a course-table such that there is no time conflict for every student. By time conflict, I mean if there exist a student such that:

student1 = [(math100,0), (phys100,0), (chem100,2), (art100,2), (hist100,4)], then there is a time conflict.

To clarify, my question is given students like below:

student_1 = [`(math100)`, `(phys100)`, `(chem100)`, `(art100)`, `(hist100)`]
student_2 = [`(math101)`, `(phys101)`, `(chem101)`, `(art101)`, `(hist101)`]
...
student_n = [`(math100)`, `(phys100)`, `(chem100)`, `(art100)`, `(hist100)`]

How do I know if there exists a course-table that there is no time conflict?

Hoping for your ideas/helps!

0

There are 0 best solutions below