Answer to Quiz 5 BSNS5230, J. Wang 1. An integer program is a linear program with integral restrictions on some or all variables. a. True b. False The correct answer is ‘a. True’. But if you were thinking of integer programming vs. mixed integer programming in QM, your answer could be ‘b. False’. So, either a or b is taken as correct. For questions 2 – 8: There are three projects. Binary variables X1, X2, and X3 are defined as follows: Xi = 1 if project i is selected, and Xi = 0 if project i is not selected, for i = 1, 2, 3. 2. Write a constraint to represent: “At least one of the three project must be selected”. X1 + X2 + X3 >= 1 3. Write a constraint to represent: “Between project 1 and project 2, exactly one is selected”. X1 + X2 = 1 4. Write a constraint to represent: “At most two projects of the three can be selected”. X1 + X2 + X3 <= 2 5. Write a constraint to represent: “Project 2 and project 3 must go together. That is, it is not allowed to select one while deselect the other”. X2 = X3 , or X2 X3 = 0 6. Write a constraint to represent: “The three projects can not be all selected. There must be at least one that is not selected”. The above statement is equivalent to “at most two can be selected”, which is same as in question 4. X1 + X2 + X3 <= 2 7. Write a constraint to represent: “If project 2 is selected, then project 1 must be selected; but if project 2 is not selected, then there is no restriction on project 1”. X2 <= X1, or –X1 +X2 <=0, or X1 –X2 >=0. 8. (Bonus question) Write a constraint to represent: “If project 1 is not selected, then project 2 must not be selected; but if project 1 is selected, then there is no restriction on project 2”. The above statement is equivalent to “if project 2 is selected then project 1 is selected” (Recall the rule in logic: “If A then B” is equivalent to “If not B then not A”), which is same as that in question 7. So, we have X2 <= X1 , or –X1 +X2 <=0, or X1 –X2 >=0. (Continued at the back) Question 9, 10, and 11 are related to a fixed charge problem, in which a fixed charge of $780 is associated with product 1. The related integral variable X1 and binary variable Y1 are defined as follows: X1 = number of units of product 1 to be produced, an integer. Y1 = 1 if X1>=1, and Y1 = 0 if X1=0. 9. What does the expression “780Y1” mean? a. The expense of the $780 fixed charge in any case. b. The $780 fixed charge is spent if Y1=1, which is not spent if Y1=0. c. It is the total cost of producing project 1, including both fixed and variable costs. 10. Write a constraint to represent: “If X1=0 then Y1=0, and if X1>0 then Y1 can be either 0 or 1”. X1 >= Y1 , or X1 Y1 >= 0 11. Write a constraint to represent: “X1>=1 then Y1=1, and if X1=0 then Y1 can be either 0 or 1”. X1 MY1 <= 0 where M is a large number (larger than any possible value of X1).