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 Physics
- History conflicts with Biology
- History conflicts with Math
- History conflicts with CS
- History conflicts with English
- Physics conflicts with Biology
- Physics conflicts with Math
- Physics conflicts with CS
- Biology conflicts with CS
- Biology 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
- Physics: Slot 2
- Biology: Slot 3
- Math: Slot 3
- English: Slot 2
- 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:
- History: Slot 1
- Physics: Slot 2
- Biology: Slot 3
- Math: Slot 3
- English: Slot 2
- 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.