George Mason University has hired you to write an algorithm to schedule their final exams. Each semester, Mason offers n different classes. There are r different rooms on campus and t different time...
George Mason University has hired you to write an algorithm to schedule their final exams. Each semester, Mason offers n different classes. There are r different rooms on campus and t different time slots in which exams can be offered. You are given two arrays E[1,... , n] and S[1,...,r], where Eli is the number of students enrolled in the i-th class, and Slj] is the number of seats in the j-th room. At most one final exam can be held in each room during each time slot. Class i can hold its final exam in room j only if ElE s Si] Describe and analyze an efficient algorithm to assign a room and a time slot to each class (or report correctly that no such assignment is possible).
George Mason University has hired you to write an algorithm to schedule their final exams. Each semester, Mason offers n different classes. There are r different rooms on campus and t different time slots in which exams can be offered. You are given two arrays E[1,... , n] and S[1,...,r], where Eli is the number of students enrolled in the i-th class, and Slj] is the number of seats in the j-th room. At most one final exam can be held in each room during each time slot. Class i can hold its final exam in room j only if ElE s Si] Describe and analyze an efficient algorithm to assign a room and a time slot to each class (or report correctly that no such assignment is possible).