Question 1
A school needs to schedule 6 courses. The following courses have overlapping students and cannot be scheduled at the same time:
- Chemistry conflicts with Math
- Chemistry conflicts with History
- Chemistry conflicts with Physics
- Math conflicts with Physics
- Math conflicts with History
- Math conflicts with Biology
- Math conflicts with English
- Physics conflicts with History
- 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:
- Chemistry: Slot 1
- Math: Slot 2
- Physics: Slot 3
- History: Slot 4
- Biology: Slot 1
- English: Slot 1
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:
- Chemistry: Slot 1
- Math: Slot 2
- Physics: Slot 3
- History: Slot 4
- Biology: Slot 1
- English: Slot 1
3. Colors/slots used: 4
Answer: Minimum 4 time slots
Key Strategy: The chromatic number of the conflict graph gives the minimum slots needed.