Question: There are n students in the CS program, and each of them must take the Algorithms course. There are m sections of Algorithms of-

There are n students in the CS program, and each of them

There are n students in the CS program, and each of them must take the Algorithms course. There are m sections of Algorithms of- fered: A,..., Am. They begin at times T,..., 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 cap C, on the total enrollment, so you cannot put more than C; students in that section. Your goal is to assign students to sections so that as many stu- dents as possible 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. Be pre- cise about the structure of the graph. It is sufficient to explain how to create the graph, and then say to apply the existing network flow algorithm to the graph.

Step by Step Solution

3.48 Rating (148 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve the problem of assigning students to sections of the Algorithms course using network flows we can model it as a flow network In this network ... View full answer

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 Algorithms Questions!