subject
Engineering, 23.12.2019 21:31 sydthekid25

The university has hired you to write an algorithm to schedule their final exams. each quarter, the university 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 e[i] is the number of students enrolled in the ith class, and s[j] is the number of seats in the jth 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 e[i] < s[j].

a. (9 pts) write an algorithm to assign a room and a time slot to each class (or report correctly that no such assignment is possible).

b. (3 pts) provide time complexity analysis.

c. (3 pts) explain why your algorithm is correct.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Apipe with an outside diameter of 15 cm is exposed to an ambient air and surrounding temperature of -20°c. the pipe has an outer surface temperature of 65°c and an emissivity of 0.85. if the rate of heat loss from the pipe surface is 0.95 kw per meter of length, the external convective heat transfer coefficient (h) is: (a) 12.5 w/m"k (b) 18.6 w/mk (c) 23.7 w/mk (d) 27.9 w/mk (e) 33.5 w/mk
Answers: 1
question
Engineering, 04.07.2019 18:10
The thermal expansion or contraction of a given metal is a function of the f a)-density b)-initial temperature c)- temperature difference d)- linear coefficient of thermal expansion e)- final temperature f)- original length
Answers: 2
question
Engineering, 06.07.2019 04:20
At what temperature does the mole fraction of no reach 0.010 for the equilibrium products resulting from the combustion of gasoline and air at 1.0 and 5000 kpa?
Answers: 1
question
Engineering, 06.07.2019 04:30
List five instruments for angular measurement and explain one of them witlh appropriate diagram(s)
Answers: 1
You know the right answer?
The university has hired you to write an algorithm to schedule their final exams. each quarter, the...
Questions
question
Mathematics, 05.02.2021 20:20
question
Mathematics, 05.02.2021 20:20
question
Law, 05.02.2021 20:20
question
Biology, 05.02.2021 20:20
Questions on the website: 13722363