I am struggling to solve the following excercise:
Design an assignment of a group of n students to m classes. Student i should take a minimum of $l_i$, and a maximum of $u_i$ within a set C1 of classes. Class j should be attended by a minimum of $m_j$ and a maximum of $M_j$ students in order to be activated.
- Design an algorithm that solves the problem of the existence of a feasible schedule in polynomial time.
- Study the time complexity of the algorithm.
I think I am overthinking this a bit: I have tried creating a graph made as follows:
- Minimum classes per student as capacities on edges from a source to each student
- Maximum number of students per class on edges from classes to a sink
- Edges between students and classes: if student $i$ can attend class $j$, then there is a single capacity edge This was done in order to calculate max-flow, which I am aware would not actually solve the problem. But I can't come up with anything better. Any help would be greatly appreciated!