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