Question: There are n students in the CS program, and each of them must take the Algorithms course. There are m sections of Algorithms offered: Ai,
There are n students in the CS program, and each of them must take the Algorithms course. There are m sections of Algorithms offered: Ai, ..., Am They begin at times Ti,.Tm. Each student can sign up for at most one section. Because students also have other courses to take, each student can only attend some subset of the Algorithms sections. This varies by student some may only be free during one or two sections, while others might be able to attend all of them. In addition, each section A, has a capacity Ci on the total enrollment, so you cannot put more than Ci students in that section Your goal is to assign students to sections so that as many students as possi- ble are enrolled in a section of Algorithms (note that it might be impossible to enroll everybody into a section: this is fine) Design an algorithm to solve this problem by using network flows. Note that it is not enough to only describe the graph to solve the proble. You should write an algorithm to describe how to use that graph to solve the given enrollment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
