Question 1
A school needs to schedule 6 courses. The following courses have overlapping students and cannot be scheduled at the same time:
- Math conflicts with Biology
- Math conflicts with CS
- Math conflicts with History
- Math conflicts with Physics
- English conflicts with Biology
- English conflicts with CS
- English conflicts with Physics
- Biology conflicts with CS
- Biology conflicts with History
- Biology conflicts with Physics
- CS conflicts with History
What is the minimum number of time slots needed to schedule all courses without conflicts?
Step-by-step solution (Graph Coloring):
1. Model as graph coloring problem:
- Vertices = Courses
- Edges = Conflicts (courses that cannot be together)
2. Apply greedy coloring algorithm:
- Math: Slot 1
- English: Slot 1
- Biology: Slot 2
- CS: Slot 3
- History: Slot 4
- Physics: Slot 3
3. Colors/slots used: 4
Answer: Minimum 4 time slots
Key Strategy: The chromatic number of the conflict graph gives the minimum slots needed.
1. Model as graph coloring problem:
- Vertices = Courses
- Edges = Conflicts (courses that cannot be together)
2. Apply greedy coloring algorithm:
- Math: Slot 1
- English: Slot 1
- Biology: Slot 2
- CS: Slot 3
- History: Slot 4
- Physics: Slot 3
3. Colors/slots used: 4
Answer: Minimum 4 time slots
Key Strategy: The chromatic number of the conflict graph gives the minimum slots needed.