There are n subjects (1, .., n). Each subject can be offered at two levels : A or B. A combination of subject and level is called course(Examples of courses: 1A,1B,2A,2B etc). There are some students (S1, ..., Sm). Each student has some requirement of courses ( Eg. student S1 might require courses 1A,1B,2A,3B). We have to schedule the courses satisfying the following constraints:
(i) Each subject is offered at exactly one level : A or B
(ii) For each student, at least one course is offered from his/her requirements.
Now we need to find the schedule which minimizes the number of B level courses satisfying the above constraints.
PS: This problem looks like a variant of matching to me. Is there any algorithm related to it?








This is the boolean satisfiability problem (SAT), which is famously NP-complete.
You can solve this problem using recursion.