Question 1
A school needs to schedule 6 courses. The following courses have overlapping students and cannot be scheduled at the same time:
- History conflicts with Biology
- History conflicts with Physics
- History conflicts with English
- Math conflicts with Biology
- Math conflicts with CS
- Biology conflicts with English
- Biology conflicts with Physics
- Physics conflicts with CS
- Physics conflicts with English
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:
- History: Slot 1
- Math: Slot 1
- Biology: Slot 2
- Physics: Slot 3
- CS: Slot 2
- English: 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:
- History: Slot 1
- Math: Slot 1
- Biology: Slot 2
- Physics: Slot 3
- CS: Slot 2
- English: 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.