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 History
- Math conflicts with CS
- Biology conflicts with English
- Biology conflicts with CS
- Biology conflicts with History
- Biology conflicts with Chemistry
- History conflicts with English
- English conflicts with Chemistry
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
- Biology: Slot 2
- History: Slot 3
- English: Slot 1
- Chemistry: Slot 3
- CS: Slot 4
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
- Biology: Slot 2
- History: Slot 3
- English: Slot 1
- Chemistry: Slot 3
- CS: Slot 4
3. Colors/slots used: 4
Answer: Minimum 4 time slots
Key Strategy: The chromatic number of the conflict graph gives the minimum slots needed.