 This other book that I recommended that you can find it free on the web if you are on the campus network. The weight structure has three parts. So this is the book. Well, I don't know how the cover looks like, but actually the part three is optimization. And it has, I don't know, five or six actually chapters. Each is an individual problem with pretty much complete solution. And all these problems deal with linear programming. I think this one, chapter optimization of manufactured personal computers, I think it does a little bit of everything like unconstrained optimization, constrained, and then linear programming. So it should be a good kind of additional source for examples. In particular, as I said this, I think it looks project B8, so that's optimization of manufactured personal computers. It talks about, I totally, it's in the exact same format as our book. It must have been just an additional, you know, somebody thought of additional kind of examples. But it talks about manufacturing two types of computers and all kinds of constraints and costs, I mean, price per unit, so forth. And then some of the goals of this model. So I'm not going to have time to talk about most of this, but you can see even the notation of the step one. It's identical, built up of the profit function, does unconstrained optimization with the help of a graph, then solves, if you can see that. And then it moves to what about if there are constraints. So it's, I kind of encourage you to look through that. See some of the constraints are, again, the way we've been looking at them. And in this case, again, a linear programming problem. You can use a computer to compute, you know, shadow prices, sensitivities. Even the program that they use is the same as I think this book used in the earlier edition. So linda, which may or may not be popular nowadays, or maple. So anyway, so, and finally, you can see a linear programming setting up as a linear programming problem with slack and final interpretation, even a Newton's algorithm. And it gives a reference, so you can, I don't know, if any of these chapters clicks with whatever interests you might have, then you can look for further reference. I want to point to the first chapter, that's, I think it's, hold on. If you click on PDF, it will pop up. Okay, so this project called A5 deals with wine production, better than pig problems, right? You can read through this. Again, it talks about a producer making two types of wines, medium white, dry white. It talks about the profit for each type, and then it talks about the constraints, right? So one type of wine requires a certain amount of grapes, a certain amount of sugar, a certain amount of extract, okay? And then the constraints that the producer has a certain, you know, limited amount of each from each kind of raw material, okay? And you want to maximize the profit, okay? So that shouldn't sound scary anymore, okay? So the point is that we can recognize this as a linear programming. We can set it up as a linear programming, and the question is how do you solve the linear programming, okay? The approach they use here is so-called dual linear programming problem, which we haven't talked about it. So the primal and dual linear programming problems kind of go hand in hand, and you can define one knowing the other. Usually you know the primal, you can define the dual. But what I want to point is not much about the dual formulation, so that unfortunately we won't have time to explain why we need a dual, why sometimes solving a different problem that you're given. So you're given this problem, two variables, three constraints, right? So your feasible set is in the plane, and you have three constraints, right? So it looks, you can draw that line, that feasible set, right? So you could do it visually, or with the slopes if you want, or you could just find what the vertices are and evaluate the objective function at each vertex, right? And then pick the one where it's maximum. But anyway, so that's not the point here. The point is to illustrate how the simplex method works, and I'm going to scroll down, so I'm going to skip this dual formulation. Although, let me just say, if you're faced with a problem like this, believe it or not, it's sometimes more advantageous to convert to a problem with three variables. So the number of variables comes from the number of constraints in the original problem. And with two constraints. And why two? Because that's how many variables you have there. So you switch the roles of the constraints with the roles of the variables, okay? So now you have three variables with two constraints. That's already harder to visualize, right? Because it's not three. But for the computer, it's sometimes it's much more efficient, much faster to solve so-called this dual problem. For instance, using the simplex method. So let me skip this and go to the original problem. The original problem has 5x1 plus 4x2, and it's on the next page. So we'll just remember that 5 and 4, right? So then it's, and these are the constraints. And what we say we do, we introduce what are called slack variables, right? Now, all these constraints are less than or equal than. So what do we put? We just put plus x, I think I prefer u1, u2, u3. But x3, x3, x4, x5 with positives, right? Positive quantities, right? Which in case they are 0, if at a vertex, right? x3 is 0, this means what? This means that first constraint is binding, right? That is the quality is actually satisfied at that vertex, okay? But some of this could be positive, not all. The question is how do you find which vertex in that feasible set should be chosen as the optimal value? Okay, so I just wanted to point out how this simplex method works. This is kind of a representation of what the computer algorithm does, right? And this is using the simplex, what's called simplex tableau or just tables, right? So this is how a initial, so the simplex method is, as I said, is a search on vertices, right? So what happens is you're going to start with each, at each iteration you're going to actually build this table or tableau based on the constraints and the, you know, variables. So you're going to have five variables in this case, right? We remember we started with two variables and three constraints. These two are, if you want, the decision variables and these are the slack variables, right? Then on each row you're going to put the coefficients of this constraint, right? Remember these are now equality constraints. So you see 3, 4, 1, 0, 0. Everybody sees that. So until the last row, which is not a constraint, but it's actually just the objective function, right? And I don't want to go into detail why we put negative, negative the coefficients here. Not really, because this is now an equality constraint. So you just want to maximize this, right? So it's like you want to minimize the negative ones. But the standard way of doing this is you write it as a maximization problem and then you put the negative coefficients here. It would still be negative coefficients. So the way you actually proceed with this simplex method is you do raw operations like you do in linear algebra on the rows of this. And the goal is to have this entries on the bottom to be all positive. So it's not really about maximizing versus minimizing. So let me just point the next step in this simplex method is to identify what's called basic variables and non-basic variables. And again, that's sort of typically what you have is you have, let me scroll down here so you can see. So you see that's kind of the end of this simplex method. The third tableau is achieves positive entries on the last row. And when you have positive entries on the last row, it's means you have completed a search. And you can just read off this table. You can read off the coefficients, I mean the vertex, right? And you see what do you see? You see that what happens is you always start with slag variables as the identity metrics, right? But in the end, you end up with vertices that are, so you end up with the columns of the identity metrics that are not in different places, right? So these are x1, x2, and x5 will be what's called the basic variables and these are the non-basic variables for this vertex, okay? So anyway, so the idea is to go from one to the next is to try to identify what I call pivots. So you see that number four on the first column is pivot, meaning that you're going to try to make one instead of the, you know, in that place for that pivot and zero above and below by doing row operations, okay? And how is that pivot chosen? Well, the pivot is chosen by looking at these ratios and the ratios are just ratios of the right-hand side of the constraints to the entries in this metric, in this first column, okay? So you see the ratios are 14 over 3, 2, and 3 and it's always the smallest ratio that's taken this chosen, okay? Somehow that the choice of the smallest ratio is connected with the fact that you want to move to a vertex where the objective function increases at most, okay? So you make that choice and, right? So think about when you're in the first... the first tableau corresponds to... Let me try to make this so I can draw a picture. So the first tableau corresponds to... so it'll be an interesting way of doing it, but so your picture is an x1, x2 plane and you're going to have three constraints, right? So the first thing you do is you start with... let's say tableau number one corresponds to this vertex, okay? And why does it correspond to that vertex? Because let's look at the slack variables. So when I say... when I look at those slack variables, right, in the first tableau, I identify those three as the basic variables and then the other two, the x1, x2 are non-basic. So we always set the non-basic to zero so that x3 is 14, x4 is 8, and x5 is 6, right? This means... I mean, the x1 and x2 are both zero. This means you started the origin, okay? The next tableau is going to... what are the basic variables? So the non-x3 and x5, non-basic are x2, x4. So what will be the... So the non-basic variables correspond to zero. I mean, they are chosen to be zero. x2 and x4. x2 is zero, right? And x4 is zero. So x2 is zero. It means you're on the horizontal or vertical. I think vertical. Excuse me. Horizontal, right? So the next tableau corresponds to the non-basic variables to be x2 is zero and x4 is zero. Now, the fact that x4 is zero means what? It means that constraint. What was that constraint? 4x1 plus 2x2 equals 8, right? This means 4x1 plus 2x2 equals 8. And of course, x2 is zero. It means... I mean, you can identify what the vertex is if you want to. But the more important thing is you have found, basically, a vertex. You have identified what constraints is being binding for that vertex. And it's a second constraint. So that's kind of how you interpret this tableau. Now, the last one, which one are the basic variables? x1, x2, and x5, right? And the non-basic are x3, x4. x3 and x4 are now zero, right? And x2 is this. x1 is this. And x5 is this, right? So that's how you read the vertex of this tableau. So you see x1 is 2 fifths and x2 is 16 fifths, right? So that's probably this one. So this one is a tableau number two. And tableau number three is x1 is 2 fifths and x2 is 16 fifths. And you also know which ones are the binding constraints. So x3 and x4 are zero means those two constraints that led to those select variables are satisfied. So you know which two, right? Which two of the lines give rise to that vertex. So the fact that these things are positive kind of, well, there's basically a theory why the last row being positive terms gives guarantees that you've reached the maximum, okay? I think if you can never reach this stage, so if you always construct tableaus in which the last row has a negative entry, then that means that you will never find a minimum or a maximum, right? Let's see. So we saw how we went from the first tableau to the second. How do you go from the second to the third? You identify the pivot again by choosing the ratio that's smallest. And of course, like what is two and zero, that's infinite, so that's not the smallest. The smallest is 16 fifths. So that's the pivot. Then you create this column of the identity on the second column, right? Let's see. So I think this tableau is always by default. So in standard form of linear programming for the simplex method has to be to maximize in MATLAB. Okay, we're talking about two different things. If you're talking about the linprog, that's to minimize, right? If you're talking about the simplex method, just the algorithm, right? Not its implementation in any computer program. For this kind of sequence to work, then you do, it's to maximize, right? So I think your question is, what if you have to minimize this problem, right? If you have to minimize this problem, how do you start it? How would you start it? Well, let's see. To minimize this problem, you would get... So I think you're right. You have to... Because to minimize this problem, the origin would be the point where it's minimized, right? From the picture, right? So then you're right. So then you would start with a five and four already positive, right? And then it would be done at the first tableau. So your optimization function, your objective function has to be, in this case, right? It has to have at least one... To maximize, it has to be at least one positive thing, right? One positive coefficient. So that when you put it in a tableau, it comes with a negative. So this is sort of in its simplest realization, sort of the simplex method. The theory that goes behind it sort of would take some time to go over. I want to point out, there is an archive of courses, an optimization course that I taught in a summer, a year ago, and the first few lectures actually go over what exactly is... Why do you pick those ratios to be the minimum? Why do you look at the last row to be positive? Why that guarantees you've reached the optimal and so forth? So you can actually watch those if you're interested in. And I have... What was the course number? 442? 442. 442, summer of 2008. Let's see. Again, I have some... You can see some of this. The same kind of discussion that we're having here. So I don't want to spend too much time on this. It talks about basic, non-basic variables, how you pick them. The point is there's not an unique way of picking the basic variables. Let me see if it's... I think it's the second lecture that there's a tableau. So maybe the standard is minimum, minimizing thing. If we do it in that way, think about it the same way. If you minimize this... But notice what happens here is to create a simplex tableau, you need to have equality constraints. So if you start from inequality constraints, then you have to introduce those slack variables. So that's kind of another example of simplex tableau here. Coming from equality constraints. So I guess I should mention this that you may... In the problems that we talk about, you may actually interpret some of the constraints as being equality constraints or inequality constraints. It's never very dangerous to interpret everything as inequality constraints. The only thing that's dangerous is to interpret inequality constraints as being of the wrong sign. So for instance, if you want to maximize... So sometimes some of these problems, if you don't treat them correctly, then you would end up with no solution. So inequality versus equality constraints. Let me just take for instance this example. If I have to maximize 5x1 plus 4x2 subject to... And now I have, let's say, 2x1 plus 3x2 less than or equal to... Actually, I had to take this example here that... Okay, let's look at this example here. So I maximize this objective function and I have these two constraints. These are inequality constraints. So this gives rise to a feasible set that's bounded. So I can maximize it. So I have a maximum value. So I have a solution to this maximization problem. Now let's think of actually changing this to an equality constraint. If I have an equality constraint instead of the first inequality constraint, then is it going to change the maximum or not? Well, the problem with inequality constraints is that it has a maximum at this vertex. So this vertex, both constraints are binding. So this means that if you set one as an equality and the other one leave it as inequality, the maximum is still going to be achieved at the same point. So it doesn't hurt to have inequality or equality. If the maximum would not occur at this point but maybe at this point in the inequality constraints and you change your inequality this one, which was negative x1 plus x2 x2 less than or equal than 1 to equality, then the optimum will actually be forced to be living on this constraint line. So in other words, when you change an inequality to a equality constraint, you're restricting the feasible set to a smaller region. So when you maximize a problem over a larger region versus a smaller region, sometimes you may end up with the same number, the same vertex as an optimal vertex, but other times you may end up with different values. And of course, the examples where this makes more sense are when you have not two variables and three constraints but you have more than two variables and more than two constraints. So you can see that it can change. So the example that has, again, is two variables but let's say three constraints was this one, the one we talked about earlier. So it's three, looks like an old TV set. So the constraints that we're talking about in that chapter were 3x1 plus 4x2 less than or equal to 14, 4x1 plus 2x2 less than or equal to 8, 2x1 plus x2 less than or equal to 6. And we said the maximum is achieved at two-fifths and 16-fifths and that was because I had three, let's say this and this was the maximum, right? So again, if I change, if we change, oh, and I should say this was constrained, I'm just going to label this constrained, I think this was constrained one, this was constrained two. And three was here, okay? It's actually funny that this actually are parallel to each other, aren't they? So they weren't actually a great example because one term is the other, right? This actually trumps this constraint. So we need to change that a little bit. Can we change that? Yeah. Why is it not the smaller constraints that trumps the bigger one? Because they got to be less than or equal to both. Well, if this is satisfied, this is automatically satisfied, right? Because you double this, you have to double this. Yeah, so wouldn't it be the smaller one satisfied, the bigger one satisfied? Yeah, so that's why I said so. So if this is satisfied, then 2x1 plus x2 is less than 4, so it's automatically less than 6. So in other words, this constraint is kind of superfluous here, right? That's why we didn't get that, you know, in the simplex method. In the simplex tableau, we didn't get that. So the picture wasn't really accurate, but we didn't look at it at the coefficients. So I don't know if we can change that on the fly. We have to change the circumstance trying to match that picture, which is probably not very difficult, thinking of the slopes like we did last time, right? So let's see, what is the slope? The slope of this one is negative 2, right? The slope of that one was negative three-quarters. So negative three-quarters, negative 2, and I want something that's actually less than negative three-quarters. So I want something that is like negative a half, right? So I really want something that's like one here and two here. So now the picture looks correct. But of course, and I believe this one is also going to be correct. Yes, no, maybe not. Yeah, it's correct, right? Remember because we looked at the slope of the negative five-quarters, so that fits where here or here. I think it fits between these two slopes, right? So it means it's going to hit at this point. Okay, so now it should be the picture should match this, right? So now if I think, if I change, which inequality I need to change to an inequality to actually change this optimal value? Three, right? So if we change three, so if we change three into x1 plus 2x2 has to be equal to six, right? Then there's going to be a new optimal values or vertex, which would need to be computed, but we can almost, well, we can see on the picture what the maximum should be, right? Because now you're restricted on that, on the line where this vertex is not, right? This vertex did not belong to that line. But what's even worse, so you have to be, so for instance, if we have the wrong, so I call this three prime, right? And if we have the wrong sign and then inequality, so we have x1 plus 2x2 greater than or equal to six, so the feasible set instead of being below this line, right? So being bounded would be above that line, would be unbounded, right? So then the feasible set is unbounded, assuming, of course, leaving the other ones. So it means that there is no optimal value or we say the problem is infeasible, yep. Because if I'm maximizing, because it's unbounded, I'm maximizing 5x1 plus 4x2, right? I can take values of x1 and x2 as large as, this allows me to take values as large as possible for both x1 and x2, and so maximum is not achieved. You're going to that linear function that goes to infinity. So this means the maximum of 5x1 plus 4x2 is infinite over that feasible set, right? If we call it s, then the maximum over x1, x2 in that feasible set is infinite so you don't have any optimum value, right? So what I'm saying here is that if sometimes you set up your optimization problem with the constraints to be equality, it doesn't harm to change that equality, you know, inequality as long as you know in which direction that inequality should go. So that you have a feasible set, yeah. Yes, certainly, certainly do. So actually that example that we haven't worked it out, I didn't give you a code for. Let's see, has anybody looked at it? Because I'd like to just maybe program it together. That's example 3.5. And if you look, I'm just going to skip two page 84 where you see the constraints. So I think we have lots of, how many variables? We have 16 variables and we have an objective function to be minimized. That is a linear function of all 16 variables. I'm looking at page 84. In case you don't have the book, maybe you can couple with somebody that does have. So some of the constraints are less than or equal then, some of the constraints are greater than or equal then. By just looking at this, could you tell if this problem is feasible or not? I don't think so, right? Because to be feasible, you have to have a minimum, right? You have to have a minimum value in that set, right? So in other words, you have to know that that simplex, well, if you could tell if the simplex is bounded, then you would be sure that it has a minimum and a maximum, right? It's a continuous function over a bounded region. But it's extremely hard to tell when you have so many variables and so many constraints, whether that simplex is bounded, right? It's actually hard to tell. So when you run the simplex algorithm, the fact that you reach to a point where something happens in the tableau, right? Guarantees that you do have a minimum. So it doesn't say the region was, the feasible region is bounded, but it just says that it's bounded in that direction where that objective function could potentially decrease further, right? So you see the feasible set doesn't have to be bounded in all directions, right? It just has to be bounded where, you know, where your kind of level curve or level set or level plane of your objective function is, right, can no longer slide to more negative values, to more less values, yeah, right? So you're above, so I guess your feasible region would be, well, so what I was saying is if this was a greater than a regular then, and you had to maximize, you would actually be able to go in that feasible set which is infinite, which is infinite, unbounded and make that quantity as big as you'd like. So you wouldn't have a finite point, right? Maybe that's not the most clear picture. I guess one would have to really identify all the regions in the plane where, you know, that these three lines, you know, determine, right? Think about, maybe to see it a little bit better, think about switching the second one, so now instead of going, it has to be less than, it's greater than, right? And the first one, if you switch first on the second one, then you can see the feasible set, right? The feasible set would be kind of going in that direction, right? Yeah, you cannot. You cannot establish. So in other words, when you have a large problem, you cannot say, I mean, if it's a two-dimensional or three-dimensional, maybe when it's multidimensional, you cannot say a priori if it's going to be a feasible or not. Okay? I guess you could say if your objective is always, it has positive numbers and all your inequalities have positive coefficients and it's all less than or equal to n. And I guess you could make that case. And also x1, x2, all the variables are positive. You could make that case that is bounded. But again, the feasible set doesn't have to be bounded for your linear programming to be feasible. That is to have a maximum, a minimum. So how many qualities could be the wrong way? So you could have a feasible set that's like this, right? And then have a minimum, right? So the feasible set is like this and you always have a minimum, right? But you could have a feasible set that is like this, right? That's infinite. And your objective function is just like it goes this way increasing. So you have a maximum, right? Because you slide this level curve parallel to itself and this is where it hits last. And some of these inequalities could be the wrong way. And it could be greater than or equal to n. Okay, so let's do this. So I have 16 variables in this linear programming problem. I'm not going to list all of them, these are 16 variables that correspond to, so xij is the amount of dirt shipped from site i to site j and refers to a table here at 3.3 in the book that maybe I should have just scanned. So the site excavation site is 1, 2, 3, there are four of them and there is a receiving site, construction site, A, B, C, D. Okay, and this table just indicates distances, distances between sites. Okay, so the problem basically says try to find the optimal way of shipping dirt from excavation sites to receiving sites knowing these distances which translate into costs. Okay, and let's see, there are some constraints which unfortunately there are too many to write down I guess. But let me just start by listing. So for instance, for the first excavation site you cannot extract more than 150 cubic yards. If you read the problem carefully it says the excavation site 1 produces 150 cubic yards of dirt per day. So you could be saying do I interpret this as an equality constraint. And my point is it doesn't hurt to treat first inequality constraint that is to allow possibly less than 150 yards to be extracted. Okay, maybe the optimal is going to be achieved when this is actually going to be equality, right? But maybe not, right? If it's not then you may ask the question, you know, if it's cheaper to actually have less than 150 from this first one then maybe you should go with that, right? And live with some leftover at site 1. But now take a look at, so anyway, so I have these three sites, so site 1 constraint, site 2 constraint, site 3 constraint. So I have two more that I'm not going to list here, right? But now let's look at the site A constraint. So the site A requires 175 cubic yards per day. So this means x1A plus x2A plus x3A. Again, is it equal or is it at least 175? Or is it the most? It has to be at least if it's not... Well, first of all you could say it has to be equal, right? Or did you say at least? No, it doesn't say at least. You see the building site requires 175 cubic yards of dirt per day. Okay? So again it's a matter of, well, it's not just interpretation. It's what do you take out of this, put it in the problem, right? So I'm saying you could start with the equality, but you're restricting that feasible set, right? And so by letting it a larger set, you may be able to find a lower minimum than if you had equality constraint. Now, if you were to choose less than or equal then, then you run the risk of doing what? Of having an infeasible problem, right? I mean, certainly if you kind of restricted it to be a little stricter less, or like less than or equal than 174 or something, that doesn't satisfy your requirement of problem, right? So it has to be at least. Okay? And then all the others. Okay? So now let's try to put this in MATLAB. Linprog requires all inequalities to be less than or equal than, right? So in which case you have to rephrase side A as being minus x1A minus x2A minus x3A less than or equal than negative 175. Okay? So you have to, you don't change the constraint, it's just you put negative numbers in front of it, okay? And then the same with all the greater than or equal than inequalities, okay? So then let's see, can we build up metrics? Well, we can certainly start building it by hand. So the important thing is to realize is what's the order of the variable. So the order of the variable should be, you have to list them, right? So the column of the variable should be x1, so let's make that, so I have A times x less than or equal than B, right? So what is x going to be? Well, let's start x1A, x1B, x1C, x1D, x2A. Okay? Can we do that? And we have to make a convention. So we start listing the, by, by, by excavation site. Okay? And by the way, what will be the metric say? How many rows and how many columns? Well, the number of columns is the number of variables, right? So 16 variables, it means the number of variables, right? So when you write this, you just imagine seeing the constraint. So you can see it on that page. You can see those coefficients, not all of them because a lot of them are zero. So that's how many constraints there are? Seven constraints, seven number of constraints. So you have to kind of populate a matrix, seven by 16, that's lots of numbers, right? That's like a hundred some entries in that matrix. So lots of them are zero, right? So one thing to do is to, instead of typing here, I would type it in a file, right? And I just start doing this, right? I have to do 16 of this, right? Quite inefficient, right? But that's what it is. You just have to input that matrix. So instead of doing this, what do you think we should do? First start with zeros, seven by 16, right? And now we start assigning the non-zero entries. So to do that, we're going to do, we can do the following. So you have to start the first four on the first row, right? So it's going to be one through four, I'm sorry, on the first row. So that's actually on the first row, one through four. And I assign this to be one, let's see, does this work? So I can try this at the command line. Okay, I don't want to display any of this, but... So let's open the... Remember in the workspace, we see what we've created, so we can see this matrix. Okay, so I see it created those four once. By the way, we could just go like in Excel. We could just now start modifying the values there. So if we change this value into one, it doesn't work. I mean, the code, you need to do this in a code. But I'm saying if you just need that matrix, right? You can do it any way you want, I mean, multiple ways. The new A is now, you know, has the right thing, but you're right. If I were to do it in a code, I'd have to do it on the second. So the second constraint is the... Which ones? Five through eight. The third constraint is the ninth through the 12, and the last one is 13 through the 16th. Okay, so if I run this code, and you just call it somehow, right, dirt. I see it created... It replicated the first four constraints, okay? And now we need to do the other one. So A of five and what? Now it's a little bit tricky, right? So now it's the receiving sites, right? So it's X1A, X1B, X1C, and X1D, right? No, I'm sorry. We had it wrong here, so... Sorry. So we had only the first three... Okay, so the fourth one is not right. Only the first three rows were corresponding to the constraints of the excavation sites. And now I have four... The last four rows correspond to greater than or equal to any constraint, so now we're going to have to put negative ones in the right places. So how do we do that? So the fourth one, so I need to... Let's say I need to run this again just to be... Okay, so I need to run this. So now the fourth, the fifth, the sixth, and the seventh rows are all zeros. So now I have to do A4 and A1A, A2A, A3A, A4A. So these are sitting on this slot, right? So 4, 1, 4, 5, right? I mean, you could do it fancy, but... Does everybody kind of understand what I'm doing here? Just populating this huge matrix with ones and negative ones. Okay, so now I have this and I have to copy this for each of the constraints but with the fifth instead of four. Again, you can make this in a line with a for loop if you want. Not one, but two, not five, but six, so just an increment by one, 14. And at this point you can start thinking maybe I should do this smarter but we're kind of running low on time, so let me just... What was it, 13? Now it's 14. Should be 15. Yeah, and the last one is seven, right? So six. Okay, so it's 615 and now 7, 3, 7, 4, 6, 8, 12, 16. Okay, so now when I run this, the matrix should be as I want it. And the last thing to do is to define B. So now what is B? B is the right-hand side, so I have 150. And remember this is a column, 400, 325, and the others are negative 175, negative 125, negative 225, negative 450. Okay, so I didn't define it. Oh, I didn't define this, so what happened? I think I just deleted this, so... Okay, so what's the... Okay, so now I should be right. So the last thing to do is to define the objective function, which is going to be F, and that will be 10, 4, 12, 20, 8. So does this come out of that table, right? No, okay, so this is right. Okay, so now all we have to do is let me just run this. So now I have these things. It's a 16 by 1, so that's right. So now let's just lean-prog. And remember we need to maximize, so we're going to put minus F. No, we need to minimize, so that's F. A, B, let's just leave it like this. Okay, so this seemed to have terminated. Ooh, no. Let's see. Yeah, maybe I should post the correct code. Yeah, right, so when you see something like this, what is probably the most... What is the culprit? You're right. You have to have the lower bound, right? Yeah, so that's the problem here. We don't have the lower bound. Unfortunately, it's kind of long time. So let's go lower bound, 0s, 16, 1. And now I have no equality constraints, no equality constraints, lower bound, no upper bound. Thank you. So when you don't specify the lower bound, the computer just can go to negative value, negative infinity, right? But now, so it looks like the signs were right, right? But if some of the inequalities were wrong, then it could allow to go infinite, you know, in time. So the only thing that I want to say about this homework due Wednesday is the last two problems that have linear programming. You have to make sure that you have the variables right. So I think it's very similar to this one, actually. It has sites, you know. Well, it has... I think one of them has 12 variables and the other one has, I don't know, a few variables. But try to interpret them as inequality constraints and then go in the same... Once you have this code, you can actually reassign some of the inequalities to equality constraints, right? And then see what happens depending on the, you know, whether those constraints are binding or not, right? Everybody knows how to see the constraints are binding or not, looking at the slack variables. So you need to know how to display them and so forth. The slack is zero as binding. So which means it doesn't matter if you put equality or inequality. Yeah.