 So, today we will take an example and show how to solve the simplex method that LP problem by using simplex method by what is called the tabular form. Let us consider this example maximize f of x, x is a variable there are two decision variables are there is dimension is 2 cross 1 x. So, it is a we have 99 x 1 plus 90 x 2 plus 5 to 5 to 5 this is the objective function subject to subject to inequality constant that is 4 x 1 plus 6 x 2 is less than equal to 85 and 30 x 1 minus 10 x 2 is less than equal to 250 and 30 x 1 plus 60 x 2 is less than equal to 700 and our x i i varies is greater than 0 i we have a 2 i 1 and i 2 x 1 x 2. These are the constraints are given we have to solve maximize this function last class we have solved a problem of linear programming problem using what is called the algebraic approach algebraic approach. So, today we will solve the LP problem using the tabular form the same basic concept is exactly same as before only we are representing the all operation in tabular form. So, let us kill you as you know our first job is LP problem to convert into a standard LP problems. So, first we convert step 1 we convert this problem into a standard LP problem convert standard LP problem. Our standard LP problem is we have considered in the beginning that maximize the function. So, we are given problem is maximization. So, we will solve this problem that optimization problem LP linear optimization problem by considering the minimization of a objective function. So, f minimize the function let us call z the function which is nothing but a minus f of x f of x is the maximization with implicit sign minus means it is minimization that we have explained earlier also that this is nothing but a 99 x 1 minus sign minus 90 x 2 minus 5 to 5 subject to the constraint. What is the constraint we have to standard LP problem this inequality constraints which is of this type less than equal to all are less than equal to of this type. There may be some greater than equal to some expression is greater than linear expression greater than equal to some numerical values. So, we will see later how to tackle such type of problem for the time being we are considering the inequality of less than equal to type. So, this we have to convert it equal to sign. So, 4 x 1 plus 6 x 2 and this quantity left hand side is less than 85. So, we have to add some variables let us call we are adding some variable new variable x 3 and which we call the slack variable this equal to 85 and not only this right hand side equal to sign we have to convert we have to take care. So, that the right hand side quantity constant quantity is positive quantity non zero component positive quantity this is we have converted first one and second one is 30 x 1 minus 10 x 2 plus this is less than 250 that means some variable we have to add it to this expression that means let us call this is x 4 is equal to 250. And we have a last equation inequality equation 30 x 1 plus 60 x 2 is less than 700 that means we have to add another variable which is slack variable this is also slack variable x 4 x 5 is a slack variable its slack variable value is greater than equal to 0. So, that is your 700 with the constraints that x i is greater than equal to 0 for i is equal to in your case now 1 2 3 4 5 and if you see the right hand side of the equality constant that is b we denoted by vector v earlier that is we written as this 85 first equation equality sign is 85 250 then 700 and each component of this vector is greater than 0. So, this problem we have to solve first we have converted into standard LP problems next is start. So, initial basic solution the way we did it for algebraic approach the same way of doing it. So, we have to identify which are the variables are non basic variable which variables are basic variables agree that means in other word non basic variable we are assigned to 0 and basic variable hence the basic variable we are able to calculate from the expressions. So, now I am writing into the way we have did it for algebraic approach now I am put it in tabular form exactly same manner. So, this is initial table for the LP problem the basic variable table 1. So, you can write it this. So, you can write it is first table initial table table you for the LP problem for the LP problem. So, first column you write it the basic variables basic or choice of basic variables a putting in this way down. Then I am writing all the variables assigned in the standard LP problem x 1 we have a all together 5 variables x 1 x 2 x 3 x 4 then x 5. Then we write write in side of the equality constraints that is b b i you can say then we write it the ratio of b i divided by a i j. So, let us call this equation first equation I am writing the first equation 4 x 1 plus 6 x 2 plus x 3 is equal to 8 x 1 that is 4 into x 1 next is plus 6 into x 2 below x 2 6 then x 3 1 into x 3 below x 3 1 and there is no x 4 x 5. So, I will put this coefficient is 0 and write in side is what 85 similarly this equation x 1 30 into x 1. So, x 1 coefficient is 30 then minus 10 into x 2 minus 10 then x 3 x 4 1 into x 4 x 3 there is no x 3 that means in other words I can 3 I can say x 3 coefficient is 0 then x 4 coefficient is 1 there is no x 5. So, I can assume x 5 coefficient is 0 is equal to 250 similarly the third equation 30 x 1 30 60 x 2 then no there is no x 3 x 4. So, their coefficient I can write 0 then x 5 coefficient is 1 that is equal to your 700. So, this is the standard LP problem this is the equality constant I have written into tabular form. Next is your cost function mean objective function expression function I am writing. So, see the objective function here z minimize z is minus 99 into x 1 x 1 coefficient is minus 99. So, minus 99 x 1 below x 1 minus 99 and you see this minus 90 x 2 x 2 coefficient is minus 90. So, below x 2 I will write minus 90 and there is no other variables are here. So, the coefficient I can write it this into this into this now look at this expression if you recollect I mentioned earlier that if you add a constant term with the objective function then the function value makes some that minimum or makes some value of the function at what point it occurs. If you add a constant term to the function it will occur in the same point only you can say the whole objective function curve is lifted up or down depending upon the value of that constant term either positive or negative. So, I can easily put it this into that side z with z. So, our now objective function I will tell z plus 5 25 this is our objective function value now z plus 5 25. So, we will tell z plus 5 25 this function we have to minimize. So, first iteration you see I have written this one now which one I will consider the objective function what is called non basic function and non basic variables and basic variables and if you see this matrix itself that our according to our definition this is the A matrix. A matrix the x 3 involved in equation number 1 only no x 3 is there x 4 involved in equation number 2 this equation only and x 5 it involves in equation number 3 no other equation. So, I can easily consider the x 3 x 4 x 5 x 3 x 4 x 5 are the basic variables. So, I am writing x 1 sorry x 3 x 3 x 4 x 5 this is the basic variable I have considered and non basic variables are the remaining. If you recollect if you have a equation that a inequality equation or equality equation of the what is called LP problem there are m equation of the n variables are there. So, there will be basic variable is m and remaining n minus m variables will be the non basic variables. Similarly, here also we have a 3 equation 5 unknowns are there. So, 3 are the basic variables and 2 are the remaining variables are non basic variables. So, I identify with an arrow x 1 and x 2 these are the non basic variables. Now, you see from this table if x 1 and x 2 are non basic variable means its value is assigned to 0 its values is assigned to 0. Then immediately from this expression I can find out x 3 is equal to 85 you see 4 into x 1 this value is 0. So, 0 plus 6 into x 2 x 2 value is 0 this is 0 plus x 3 into 1 0 into x 4 0 0 into x 5 0. So, our x 3 non basic variable is 85. Similarly, in this expression you see our x 4 is equal to 250 there our x 5 is equal to 750 because 13 to x 1 x 1 value is 0 16 to x 2 x 2 value is 0 only x 5 is equal to 700. So, from this we can state way we can write from this table that what is called our treating x 3 x 4 and x 5 are the basic variables and x 1 x 2 are the non basic variables whose values are 0 non basic variables. Then we have now from the table if you see now we have from the table I can write we have now from the table x what is our x 3 x 3 value is you see x 3 value is this one this this coefficient is 0 4 into x 1 6 into plus 6 into x 2 x 1 x 2 value is 0. So, our x 3 is equal to 85 x 3 value is our 85 similarly x 4 value is 250 similarly x 5 value is 700. So, these are the basic solution of that one now and corresponding objective function value is what see this one x 1 into 99 0 plus x 2 into 90 0 x 3 into 0 0 plus x 4 into 0. So, our objective function value is this left hand side is 0 right hand side is this. So, z is equal to minus 5 25 if you see and the corresponding the corresponding objective function value cost function value is z plus 5 25 is equal to 0 z is equal to minus 25. Now, our search we have to search we have to move agree to the adjacent vertex. So, that the function value is further decrease or the rate of decrement must be negative. So, now we find out we have to select which one which non-basic variable there are two non-basic variable x 1 x 2 which one go for a basic variable means entering as a basic variable which one x 1 or x 2. Similarly, from the basic variable which one will leave as a non-basic variable which one leave as a non-basic variable either x 3 x 4 x 5 leaving or you can solve leaving basic variable which one is leaving the basic variable leaving basic variable. So, let us see with this one if you make it concentration on this one that our actual 99 into x 1 minus 99 into x 2 we have already explained that the largest negative coefficient will be our choice of pivot column that means which element which variable will consider as a basic variable of non-basic variables which variable. So, largest coefficient in the objective function is that one negative sign largest coefficient with negative sign is that one. So, this is I will call as a we will call as a pivot column agree. So, you concentrate on the cost function expression what is the expression minus 99 into x 1 minus 90 plus minus 90 into x 2 0 into x 3 only these are. So, in the objective function or cost function only non-basic variables are there agree and out of these two non-basic variable which variable will consider as a basic variable the variable which having the what is called as negative coefficient that will be treated as a that non-basic variable treated as a basic variable that means it is leaving from the non-basic variable entering as a basic variable. So, you will write e b p entering basic variables this one agree. So, our if you remain. So, this column and this column belongs to that x 1. So, this is the pivot column is the x 1 will go as a basic variable. Now, which variable that means x 3 x 4 x 5 which variable now will act as a non-basic variable. So, that we have seen we have told you that how to check it this one take the ratio b this is b 1 b 2 b 3 b 1 this is first row b 1 divided by a 1 which column first column. So, I will write it this is ratio you calculate 85 divided by 4 then this is is b 2 is 250 divided by 30 then it is 700 divided by 30. Suppose, if you have a negative sign here that things you just ignore because that will if you if you get a negative sign you this one see what is happening minus 30 if it is a negative minus 30 into x 1 plus 16 into x 2 agree plus x 3 plus x 5 is equal to 700 agree. Now, you see that x 5 that what we are telling is the x 5 is equal to what minus that if you take that side right hand side it will pass plus 30 x 1 then minus 60 x 2 agree. So, you have already considered this is the pivot element of this one. So, if you value is increase if you take that side it will be 30 x 1 if x 1 value is increase from 0 then the function value is increasing instead of decreasing it is increasing. So, that is why if there is a negative sign is there you should not consider that quantity agree. So, you cannot make what I am telling you cannot make x 5 look at this you cannot make x 5 0 by entering this one is a if it is negative. So, if it is negative that corresponding ratio you ignore it. So, now we have all are positive we got it this one out of this ratio which was is the minimum a list that will consider as a pivot row that is also you have discussed when you have discussed in a algebraic approach. So, if you find out this one this will be at 21.4 21.25 agree and this ratio will be 8.33 and this ratio will be your 23.33 So, you will take the ratio which one is the list. So, this is the list one. So, this arrow according to the arrow will give you the pivot row. So, this corresponding to this you see x 4 is the pivot row that from here is a 1 corresponding to 1 is x 4 now. So, out of x 3 x 4 x 5 the one is identified as a non basic variable. That means, leaving basic variable which variable is leaving x 4 is leaving as a non basic variable. So, you just identify this column. So, which element is the pivot element now this is our pivot element pivot column and pivot row corresponding to the element the common element is the pivot element this called pivot element. So, now you can see the x 1 I will treat as a basic variable this is pivot column you find out and x 4 I will treat as a non basic variable. So, you have to now generate that what is called new table. So, table 2 second table you say second table in the 7 table just now we have mentioned making x 1 as basic variable and remaining variables are same previously x 3 x 4 x 5 is the basic variable. The basic variable was there now we have identified x 4 is leaving from the basic variables and acting as a non basic variable. So, x 4 place that is x 1 will take place non basic variable x 1 will act as the basic variable and other basic variable this is what x 3 and x 5. And resultant we can say our basic variables are now x 1 x 3 and x 5 and which basic variable now treat as a non basic variable that is your x 4 our x 4 and x 4 as non basic variable. So, you can call this x 1 is this x 1 is called that entering basic variable x 1 entering as a basic variable this one you can say that this basic variable leaving basic variable leaving basic variable leaving basic variable which variable is leaving x 4 is leaving basic variables this one. So, now keeping this thing in mind we just I am I write the second table from the second table see how I am forming again you write basic variables again you x 1 x 2 x 3 x 4 x 5 then b then our ratio what is called b i divided by a i j ratio this. So, you see previous that table which one is very basic variable pivot element this is and that element coefficient is x 1 coefficient is 30 but I have to make it one coefficient because when you are converted into canonical all coefficient was 1 1 1 you see x 4 was 1. Now, this is a basic variable acting as a x 1 is a basic variable. So, that coefficient must be 1 what does it mean that whole equation I am dividing by 1 scaling by 30 I am scaling by 30. So, if you the whole equation if you scaling by 30 30 by 31 minus 10 by 30 0 by 30 1 by 30 0 by 30 250 by 30. So, if you do this one that corresponding to that our second row. So, I am writing the second row you see 1 then minus 10 by 30 then what is this value will be 1 third means minus 0.333 then 0 by 30 this value will be 0 then 1 by 30 1 by 30 this will be 1 by 30 that means this will be 0.0333 then 0 by 30 0 and 250 by 30 that is 0 and that is 250 by 30 will be 8.33. So, this and since x 1 is the basic variable and it is 0.0333 then 0 by 30 0 and 250 by 30 0 and other basic variable is here previously you see x 3 variable then x 5, but x 4 is going as a non basic variable. So, this place will be replaced by x 1. So, x 3 then x 1 then x 5 this indicates what which one the basic variable and non basic variable is what previously x 2 now it is x 2. Now x 4 is treated as a non basic variable I am put it with arrow non basic variables. So, this basic variables you see if you see the x 1 x 4 x 5 the basic variable in one equation x 3 first equation the x 3 is involved other equation x 3 is not that there. That means the basic variable involved in one equation only x 4 basically involved in second equation only other two equation does not first and third is not involved. So, here I made it, but you see in the first equation the first equation x 1 in involved 4 into x 1. So, I have to remove it that I can remove it by elementary operations you can say now what I did it after scaling this equation I multiplied by 4 because I have to remove that 4 from the first equation. If you remove if you multiply by 4 I am just writing this is the equation number 4 or equation number 1. So, you do the operation equation number 1 minus equation number 2 multiplied by 4. So, if you do the equation number if you multiplied by 4 it is a 4 multiplied by 4 whole row agree. So, and see this one I multiplied by 4. So, 2 multiplied by 4 and then subtract from 1. So, it is it is multiplied by 4 minus 4 minus 4 0. So, this is how much 4 means 4 into this it will be 1.3 something and that coefficient is 6. So, 6 minus of this one and what is this one if you see this value will come 4.668 this is 6 I am multiplied by this I am multiplied by this 4. That means, if I whatever I multiplied by 4 if you multiplied by 4 this will be this will be how much just a rough calculation you see this will be 1.43 just 0.333 multiplied by 4 this will be 1.33 minus sign and you are subtracting that one. So, that value will be what subtracting means it will be a it is already minus is there minus is subtracting that is it will be 7.33 into 7.332 please check it this one. So, this I divided by 30 first. So, this is 1 this is one third this is 0 this is 1 by 30 1 by 30 then 0 250 by 30 that is this one. Now, I am doing elementary operations I am multiplied by this equation after scaling by 4 and subtracting from this subtracted from 1. So, 1 into 4 4 minus 4 0 then this is minus already agree. So, 1.5 I subtracted from this one 6 plus 7 0 minus 2 minus 2 minus 1 that means, this will be 1. Then this is subtracted this is multiplied by 4 4 means just now you have calculated it is 1 point, but it is 0.03 that value will be 0.1322 and x 4 value is what 0. So, this will be minus 0.1332 this is 0. And x 5 value is 0. So, that will be also 0 then this multiplied by 4 8.3 multiplied by 4 agree and subtracted from that 85. So, this will be near about 32 something and you see 8.33 multiplied by 4 agree 33 something subtracted from 85 then you subtract this one it will be coming 51.68. Now, you see in this equation first equation x 1 is eliminated. So, x 1 is involved in equation number 2, but here x 1 also there. So, that from the row 3 x 1 must be eliminated. So, how you do it this is already you have scaled by 1. So, this equation you multiply by 30. So, second equation second that this equation you will get it 3 minus 2 multiplied by 30. If you multiply by 30 is nothing but that that one. So, what will you subtract 3 minus this if you subtract 3 minus this it is 0 3 minus this this minus this 70. So, it will be 0 then 70 then you see 0 0 0 then this 0 minus this that will be minus 1. Then you see 0 1 minus 0 0 I am a 1 then you see this one this is 700 minus 250 it is a 450. So, I got it this one now you see there is no harm if you see this expression now if you see in this expression x 1 if you see x 1 multiplied by 99 x 2 minus 90 there is no harm if you keep it like this way, but you say I can easily because I know the expression for x 1 I can easily eliminate x 1 from this equation from this second second equation with the help of second equation. I can eliminate what is called our basic variables from the objective function there is nothing wrong if you just eliminate how will eliminate that this coefficient is you see 99 into x 1. If you want to eliminate x 1 from the objective function I have to multiply the normalized equation of equation 2 by 99 then add it. So, if you multiply by in order to this is the cost function in cost function our position is fourth equation. So, fourth equation minus equation number 2 this is our equation number 2 into 99. So, if you multiply this equation by 99 and subtract from this one multiplied by 99 this one and subtract from this equation not subtract add this you have to add it. So, I made it add because already minus sign is there you have to add it. So, if you add it then you can write it this is 0 and this is you multiplied by 99 add it with this one 99 means approximately 100 it all called that means 33.3 and add with this one. So, it will be what will be this one near about 33. So, 37 something if you added this one you will get it how much how much you will get it this is minus 99. So, you are divided by this you got it this one. So, you add it this one. So, this I am adding with this one I am adding with this one that is minus 99 and this is 33. That means, 123 near about 123 some this agree. Now, this 0 0 and third position is 0. So, 0 0 then this multiplied by 99 let us call 100. So, it is 0. So, add with the corresponding element the corresponding element means x 4 x 4 is your 0. So, it will come 33 100 3.3. So, 3.3 then this 99 and this position is your 0. So, this will come 0 and this is what you are multiplied by 99 add with that add with what z plus 525. If you added this one it will come z plus 1350 agree. So, what I have written it here exactly same thing you are doing here this way. This is for corresponding to in order to get this row this is corresponding to in order to get this row then this is corresponding to in order to get this row. Now, look at this objective functions the coefficient non 0 coefficient non 0 coefficient objective function related to the non basic variables is x 2 into this one x 4 into this one previous table if you say exactly same and the basic variable coefficients are 0 agree. So, what is this cost function values x 1 into 0 plus x 2 into this one x 2 value also 0 non visibility x 3 value is non 0, but is value is coefficient is 0 0 plus x 4 into 3.3, but x 4 value is non basic value is 0 x 5 into 0 x 5 is not equal to 0 because it is a basic variable, but this coefficient is 0. So, our objective function value is that one z plus 1350 1350 this is 1350 agree. So, I can easily find out this one. So, now you see this one. So, from the table immediately I can write what is the basic variables value x 1 value you see x 1 value is 8.33. How x 1 into 1 x 2 into this quantity plus x 2 value is 0 x 3 into 0 plus x 4 into 0 x 4 value is 0 0 x 5 into 0 0. So, x 1 value is only 8.33. Similarly, I can write x 3 value similarly I can write x 3 value say x 3 value say x 3 value is 51.68 and x 5 value is our x 5 value is our 450. So, these are all basic variables value values non basic variables value is what x 2 is equal to 0 x 4 is equal to 0 x 4 is equal to 0. Now, look at this objective function this objective function you see 123 into x 2 and you have a x 3.3 into x 4. So, if you want to make it this is non basic variable to basic variable x 4 value you have to increase it. If you increase the function value will also increase. So, that will not disturb the positive quantity that will be act as a non basic variable, but here you see this is minus 123. If you increase the value from 0 to some positive value the whole function value is now decrease agree. So, this one can do it this one can do it. This I can take it now which one will be our pivot column I told you if you recollect this one you look at the coefficient of objective function which is most negative coefficient that will be considered as a pivot column. So, this is the pivot column for pivot column for the second table. So, this is the pivot column. So, that means now the x 2 will go as a basic variable. Now, I have to find out if x 2 go as a basic variable then which variables basic variable will enter in place of x 2. So, that will be decided by the ratio of that one that we have explained you when we are discussing the algebraic approach. So, this ratio will be 51.68 divided by 7.332 and that value is coming 10.4 and this negative I told you do not care because that will not help you to increase our function value. So, this is 450 divided by 70 this value is coming 6.43 and lowest positive ratio is this one. So, this is 450 divided by 70 this value is coming 6.43 and lowest positive ratio is this one. So, this row will be treated as a what is called row pivot row means in this row we have whatever the basic variable we have that will be that will go as a non basic variable. And you see this is coefficient of this one is a one and this is x 5 here also you see x 5. So, our if you just draw a that row and this will treat as an pivot row. So, pivot column sorry element. So, this is the. So, we have to now start our operation with this element. So, with this element that means this element is which one x 2 go as a basic variable and x 5 will go as a non basic variable. So, basic variable if it is x 2 is a basic variable that coefficient you see you have here. So, that coefficient I have to make it 0 similarly the corresponding coefficient in the objective function that also you have to make it 0 by using elementary row operation the same procedure if you follow. Now, you see that our what is the from this table what is our objective function value is minus 13.25. Previously we got it if you see this one previously function value we got it z is equal to some function yes minus 5.25. Now, you got minus 13.50. So, now function basically decrease further we can decrease the function value since the coefficient of objective function one coefficient is negative. So, there is a possibility to increase that one. So, let us call in table 3 now third table. So, third table can you tell me which one will be your entering basic variable our entering basic variable is this basic x 2 is entering as a basic variable. So, in short I write it entering basic variable is x 2. So, living basic variable which basic variable is living that means x 5. So, x 5 living basic variable is x 5. So, now you can easily generate our table same way x 1 x 2 x 3 x 4 x 5 b then ratio b i where a i j agree and here is basic variable. So, if you recollect this one what I told you here just now the our this is the pivot element. So, I have to divide that one by 70 that third row I have divided by 70 because I have to make it coefficient 1. So, if you divide by 70 this equation it is 0 1 by 70. So, I am writing the third last equation it is 0 1 then 0 then 1 by 70 minus 1 by 70 then 1 by 70 agree then this is our if you see 450 by 70 450 by 70 is a 45 by 7 in other words this one and which value is 6.4 6.4 28 this one. So, I have to remove I have to eliminate x 1 from this equation from this equation and as well as from this equation. So, what I will do it this one equation number 1 agree equation number 1 multiplied by this equation after normalizing what we got it this you multiplied by 7.33 and subtract from equation 1 and subtract from equation 1 agree you this equation after normalizing you multiplied by 7.33 then subtract from equation 1. Similarly, to get eliminate x 2 you multiplied by this equation after normalization by 3.33 and add with equation number 2 to eliminate that one agree and then this equation you multiplied by after normalization third equation after multiplying by this by 123 add with the objective function then you will get it what you will get it you just see. So, our non basic variables are which one we have identified non basic variables our non basic variables is x 4 and x 5 x 5 is going as a non basic variable. So, x 5 and then your our x 4 is the non basic variables. And our basic variables are x 1 previously our x 1 this is x 3 x 1 and x 2 if you see see this one x 3 x 3 was then x 1 x 3 x 1 then x 2 is entering as a basic variable. So, I have written x 2. So, this is the our basic variables. So, now if you filled up this one then you will get it this the similar manner if you do it it is 0 1 just as it is I told you the same method if you follow it see a third equation I multiplied by this third equation is the I multiplied by in order to get this one what I am writing see equation number 1 equation number 1 minus equation number 3 into 7.33. In order to get equation number 2 equation number 2 minus equation number 3 not minus it is already plus minus is there I have to add this multiplied by 0.333. So, then next cost function how you got it the cost function then you will get it that equation number 4 equation number 4 this is the equation number 4 plus equation number 3 into 1 23 1 2 you will get this finally if you do this operation equation number 1 then your 2 and 4 then you will get finally the results of that one 0 0 0 12.01 1.758 then your this will come 0.3. A plus 2 1 4 0.64 and this will come that is x 4 that value this will come 0 then this will become 0.0285 this will come 4.76 10 to the power 6 and 10.47. And this will come minus 0.143 and 20.99. Now, immediately you can see x 3 value is what 20.98 x 1 value is what 10.47 x 2 value is what 6.42 and x 2 value is what 6.42. So, and this value is will be coming say this value the 1 by 70 into 1 by 70 into this will be 0. So, next class I will complete this table. So, now time is up. So, I just complete next class this. So, we will start from this table next class. So, if you see this last row of the objective function it will be totally all coefficients are positive. That means there is no chance to improve the function value means decrease the function value by changing one of the basic variable is a non-basic variable and non-basic variable as a basic variable. So, we will continue next class.