Next, let's consider a similar but different situation. A company is making and selling two products with two limited resources. That's the same. Making each product require a setup cost and making both products require or result in some additional setup cost. You may see that the whole formulation is very similar to the previous one. But now this is a minus. What does that mean? You need to have someone to warm up your machine that's set up cost one. If you don't do product one, you only do product two that's $25. If in a machine you want to first do product one and then do product two there is some additional change over cost, you need to clean your machine and then put the materials for part two into the machine and so on. Pretty much that cost you additional $10 If you don't do product one, you don't need to pay that. If you don't do product two, you don't need to pay that. But if you want to do both products, you need to pay that 10 additional dollars. Let's try to see whether we may linearize z_1, z_2 again. Let's replace this guy by w. Now the interesting thing is that, if we still say w should be less than or equal to z_1 and the w should be less than or equal to z_2 in this case is not going to help you at all. Why is that? Because your w appears in a minimization formulation. Well, you'll actually see a maximum, but because this is negation, there is a negative term there. Maximizing negative 10_w is equal to minimizing 10_w. That's why here I say w appears in a minimization objective function, okay? Or equivalently we say it in that way. Pretty much your formulation is going to try to cut term w as much as possible. Your formulation want to set w to be as small as possible. If you provide upper bounds for w, It makes no sense because it does not restrict anything. If you really write it in this way, your w would be set to zero. There's no way for you to pay these $10 even if your c_1 is one, c_2 is one. But because your w is upper bounded, it does not ask you to pay that setup cost $10. What does that mean? That means we need a different way to do that. We need to provide some lower bound for your particular w. How to do that? Well, people tell us that all we need to do is to say w should be greater than or equal to z_1 plus z_2 minus 1. How does that work? Well, you'll want to make w as small as possible. But if you're z_1 is one and z_2 is one, this is requiring your w to be one. If you want to produce both products, you need to pay that $10. If on the other hand, any of them is zero say z_1, then in that case your w is greater than or equal to zero that constraint goes away. You don't need to pay that $10. Makes sense. This is very similar to Scenario 1A, but when you change maximum to minimum, you need to use a different set of constraints. If one thing appears in the objective function, you know how to deal with that 1A and 1B. Now, we want to talk about constraints. What if a product term appears in a constraint? It depends on whether it appears at the larger side or the smaller side on very similar to our previous section. If that product term is at the larger side, for example, something like this, then it may be linearized as if it appears in a maximum objective function. Why is that? Because in this case, pretty much you are saying that this w, If you don't give it upper-bound, your w is going to be as large as possible. If your w appears at the larger side, then you need to give it upper bound. Otherwise, it will always be one, and that's going to be the best case for you because that's going to enlarge your feasible region as much as possible. That does not make sense. You need to set some upper bounds for w such that w can be one only if your z_1 and z_2 are one. The product term should be one only if both terms are one. It's not going to be too surprising for you. If you write it as w, then w should be less than or equal to z_1, and the w should be less than or equal to z_2. Only if your z_1 and z_2 are both one, so that you may set your w to be one, and then this constraint can be x less than or equal to five, which is indeed less than or equal to five if z_1 and z_2 are both one. Similarly, now, if the prior term is at the smaller side, now we take the same way as if we are dealing with the minimization objective function. Because now the product term cannot be one as long as any of the term is one. In this case, what we are going to do is that we are going to have this z_1, z_2 at the smaller side. In this case, what we are going to do is that we are going to replace it by w again, and now if you don't restrict w from the lower bound, then you are going to always set w to be zero. That does not make sense. In this case, you need to give a lower bound for w, and again you set it in this way so that as long as any of them is zero, then you don't have any restriction on it. But if both of them is one, then actually your w would be restricted to be one. Lastly, the product term z_1, z_2 cannot be one if either term is one, Actually this should be zero. Let me correct this typo. If any of them is zero, your product term cannot be one. I hope that makes sense. As long as you have a product of two binary variables, it doesn't matter where it locates. You always may find a way to linearize it. Obviously, if you have a product of 3,4,10 binary variables, you play the same trick. I hope it makes sense for you.