Question: [ 2 0 points ] In the Classroom Assignment ( CA ) problem, you are given a collection of n class rosters R and a

[20 points] In the Classroom Assignment (CA) problem, you are given a collection of n class rosters R and a set of k time slots, and you need to determine whether it is possible to assign the n classes to the k time slots so that no student takes two classes at the same time. (Each class roster lists all of the students taking that class.) For example, consider the problem where we have 3 time slots available (say,12:30,2:00, and 3:30) and the 5 class rosters are {s1, s2},{s2, s3},{s3, s4},{s4, s5}, and {s1, s3, s5}. We could assign classes 1 and 3 to 12:30, classes 2 and 4 to 2:00, and class 5 to 3:30, and no student would take more than one class at a time, but this problem would be impossible if we only had 2 time slots available. Give pseudocode for a greedy heuristic for CA

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!