$title Basketweavers State University: $ontext Students at Basketweavers State University must satisfy course requirements in three areas - math, operations research, and cs - in order to graduate. They must choose from among a variety of courses, some of which satisfy course requirements in more than one of these areas. Some of these courses are prerequistes for other courses. How can a student satisfy the requirements (and the prerequisites) while taking the smallest possible number of courses? $offtext option limrow=0, limcol=0; set area /math, opres, cs/; parameter requirement(area) / math 2, opres 2, cs 2/; set courses /Calculus, OperationsResearch, DataStructures, BusinessStats, ComputerSim, IntroCS, Forecasting/; set fulfil(courses, area) "course satisfies a requirement in this area" / Calculus . math OperationsResearch .(math, opres) DataStructures . (cs, math) BusinessStats . (math, opres) ComputerSim . (opres, cs) IntroCS . cs Forecasting . (opres, math) /; set prerequisites(courses,courses) "course 1 is a prerequisite for course 2" / Calculus . BusinessStats IntroCS . (ComputerSim, DataStructures) BusinessStats . Forecasting /; alias (courses, ci, cj); binary variable taken(courses); variable totalTaken; equations EQgraduate(area) "required courses to graduate from each area" EQprereqs(ci,cj) "check that the prerequisites are satisfied" objective; EQgraduate(area).. sum(fulfil(courses,area), taken(courses)) =g= requirement(area); EQprereqs(prerequisites(ci,cj)).. taken(ci) =g= taken(cj); objective.. totalTaken =e= sum(courses, taken(courses)); model basket/all/; basket.optca = .999; basket.optcr = 0; option mip=cplex; solve basket using mip minimizing totalTaken;