 So, last class we have discussed how to solve standard LP problem linear programming problem by using algebraic approach and then we have considered a numerical example which we could not complete. So, we recap the example here. So, our problem is given the function which you have to minimize subject to the constraint which is in a standard LP problems. So, what we have to do first? So, these two equation linear equation we have to write into matrix and vector form. That means, we have to write in A x is equal to B form that if you look these two expression then A matrix is A matrix is 1 0 2 2 and next row is 0 1 2 minus 2 from this one and B is 6 3. So, now we have to do this thing into A that variables we have a x 1 x 2 x 3 x 4 variables are there. So, you we have to choose the which are the which are the what is called the basic variable and which are the non-basic variable. These two equation straight away they are already in canonical form. So, what that x 1 x 2 I can consider as a basic variable and x 3 and x 4 are non-basic variable. So, we have partition x 1 x 2 this and x 3 x 4. So, basic variables as we have used the standard notation x suffix B and then non-basic variable x suffix n. So, correspondingly the what is called the objective function that we will write in terms of c transpose of x and accordingly from this expression c transpose is this one. Coefficient of x 1 is 1 coefficient of x 2 is 1 coefficient of x 5 is x 3 is 5 and coefficient of x 1 minus 1. And then we have partition this c matrix c transpose matrix into 2 parts the variables x 1 x 2 which is that means basic variable which is associated with the c transpose matrix that we have partition and denoted by c B transpose and this c D transpose non-basic variables associated with the non-basic variables. So, with this one we have immediately that identified the B and D matrix from the A matrix that we have formed that B matrix is associated with the basic variables x 1 x 2 and D matrix associated with the non-basic variables and c B transpose which is formed from the performing index or the objective function associated with the basic variables and c D is associated in the performing index associated with the c transpose matrix in the objective function c transpose is associated with the non-basic variables. So, first we have to find out the in that initial vertex by solution of this equation that we have derived earlier B into D because our A matrix is partition into a B into D form x B this since x n is 0. So, x B into B plus D into x n is equal to B small b this is the small b from there we got the initial solution or vertex point is 6 by 2. So, this is the initial vertex. So, our x 1 value is 6 x 2 value is 3 and that remaining 2 variables x 3 x 4 are the non-basic variables that is. So, this is the solution for initial vertex in here. So, correspondingly immediately I can find out the cost function value that is f of x value is that one. So, that value is if I put the value of x B value c B transpose c D transpose x n is equal to 0 then I will got that objective function value is 9. Then our question comes logically question of whether those non-basic variable if one of them is changed to a basic variables and the basic variable one of them if changed to the non-basic variable whether the objective function value will decrease or not. So, that can be tested with the this vector in the which we have derived earlier. So, you form you know c D transpose is this one c B is transpose this one then B inverse B is this one that inverse is that one of this then D is that one you see this one B is this one and D here you see that is by mistake it is a minus 2 this one is minus 2. So, then D is that one. So, if you simplify this one we got the 2 minus 1 and that associate with the non-basic variable x 3 and x 4. Now, it is clear that in the objective function which can be expressed into a two parts one is R D transpose into x 3, x 4 you see from this expression this negative terms that negative value of that associate with x bar x 4 if you change this non-basic variable to a basic variable then there is a possibility to reduce the what is called function value. So, our choice will be next our non-basic variable x 4 will be converted into a or will be treated as a basic variable and from x 1 and x 2 which there are two basic variables are there out of which one will consider the non-basic variable that we have to decide. So, from this one we can see this one choose x 3 is the what is the entered basic variable from non-basic variable to it is entering to the basic variable x 4 and this is one associate with the largest negative this is the important largest negative component associate with R D transpose largest suppose we have a more than two negative numbers was there out of this which one is largest that you will consider as a what is called entering basic variables because that very that element if you consider the largest negative component of R D if you consider as an basic variable that will reduce the function value very compared to other negative values it will reduce faster or you can say reduce in the better way. So, this is last class we have discussed then we will see today that once we know that x 4 is the our non-basic variable will be changed to a basic variable then we have to select between x 1 and x 2 which one will be the non-basic variable. So, step 3 is so select w is equal to that is that you define w which is associated with the non-basic variable x 4 the element associated with the non-basic variable x 4 form a matrix see this one our a matrix is this one a matrix is that one and it is x 4 is now entering as a basic variable. So, this column will consider as a w defined as a w. So, that is we defined as a 2 minus 2 is defined as a w and that is corresponding that let us call this element is w 1 and this element is w 2. So, then corresponding a x is equal to b that equation basic set of linear equation that b we have a 6 3 which is equal to that we denoted by b 1 that we denoted by b 2. So, now calculate the ratio b 1 by that b 1 by w 1 what is this values is equal to 3 and b 2 by b 2 b 2 by w 2 and this will be minus 3 by 2. So, we have to find out this ratio and out of this we have to consider only positive 1. So, our next step is to find because this is associated with the w is associated with the x 4 x 4 we have considering the basic variables. Now, we have to select from x 1 and x 2 which one is the basic what is called which one will be non-basic variables. So, this ratio that corresponding to x 1 and that corresponding to x 2 which will enter the non-basic variable. So, see this one that we have to consider the positive quantity ratio which one is the largest a least ratio of this one that we have to consider least ratio and positive that corresponding variable will be considered as a non-basic variable. Now, you can see also from here how we are taking this one in the day earlier also we have discussed, but if you see this expression let us call this expression. Let us call we write the first is that expression of this one. So, this one if you write it let see here I am just x 2 plus x 3 minus 2 x 4 is equal to 3, and our x 3 x 4 previously it was a non-basic variable and from there we have selected the x 4 will be a basic variables. So, this value cannot be 0. So, this is remain as a non-basic this is 0. So, we have a now we have a equation x 2 is equal to minus 2 x 4 is equal to 3. Another equation from the first equation you see that x 1 plus 2 x 2 3 minus plus 2 x 4 is equal to 6, and this is now we have considered is a basic variable non-basic variable change to basic variable and this is non-basic variable. So, we have a expression for x 1 plus 2 x 4 is equal to 6. Now, look out of these two variables x 1 if you consider that x 2 is the non-basic variable then x 4 value is coming negative. So, it cannot because x 4 is greater than 0 since x 4 is greater than 2. So, x 2 cannot entered as a non-basic variable. Now, in this case sorry that is x 2 if it is a non-basic variables x 2 if a non-basic variable that x 2 is 0 the x 4 is equal to negative quantity. So, this cannot be a non-basic variable suppose this is a non-basic variable x 1 is treated as a non-basic variable then x 4 value is coming to 6 by 2 is equal to 3 that what we are checking the ratio c b 1 by w 1 b 1 by b is 6 by w 1 is 2. So, this that way we are checking. So, now we have selected x 1 is leaving variable being the one corresponding to the least positive ratio among the ones we would selected ratio with positive values with positive value. So, this the next step is step 4. So, now you have selected if you recollect that x 1 and x 3 are non-basic variable next iteration is non-basic variable and x 2 and x 4 is the basic variables. So, we have to check the stopping criteria check the stopping criterion. So, what is this one if you remain x 2 and x 4 is the basic variable x 3 and x 1 are non-basic variables. So, we have identified. So, now once again you from A x is equal to b now we can identify from A x is equal to b. So, we have a matrix A x is equal to b identify which variables are basic variables and non-basic. We have seen x 1 and x 4 are the basic variables and correspondingly we can write that what is called our b matrix from A matrix b is in now in this case is 0 to 1 minus 2. So, this corresponding to x 1 column this corresponding to x 2 this is we formed from A matrix. A matrix we have a 4 columns and the columns associated with x 1 I have written here because that is the basic variables column x associated with the x 4 this is x 4 is the basic variable that column I have written then d from the m matrix column associated with the non-basic variables. That means x 2 this is the basic variables are x 2 and x 4 and this is the non-basic variables is what x 1 and x 3. So, column associated with x 1 in matrix A are 1 0 and this is the non-basic variable column associated in a matrix associated with the non-basic variable x 3 is 2 0. So, once again I repeat since x 2 x 4 are the basic variable from A matrix I am picking up the columns associated with the basic variable that x 2 and x 4 from a matrix. Similarly non-basic variable x 3 and x 1 x 3 from the matrix A I am picked up the d matrix. So, you know A d correspondingly the performance objective function I found out the C B transpose that is corresponding to the variable non-basic variables associated in the objective function 1 minus 1 that is x 2 x 4 and C D transpose that is associated with 1 5 that is x 1 x 3. See this one if you look at this one that this x 1 and x 3 under non-basic variable the coefficient associated with 1 and 5. So, I have written 1 5 and the basic variable x 2 and x 4 the coefficient associated with this one is 1 and minus 1 I have considered this in matrix what is a vector from vector notation from this and C transpose is split up into C B transpose and C D. So, that is what we have written. Once you have written this one and B is equal to 6 3 immediately I can find out that x into x B B is equal to your B. So, therefore, x B is equal to B transpose B inverse not transpose into 6 3 B inverse is what B is that one 0 1 2 minus 2 whole inverse 6 3. So, if you do the inverse of this one you will get this value after multiplication everything you will get 9 3. So, that corresponding value is this is corresponding to x 2 and this is corresponding to x 4. Now, the way we have partition x you say x B x we have partition into a x B x D or x n we have partition that your x B is equal to x. So, our basic variables are basic variables are x 2 and x 4. So, we got this one next once you got this one that our basic variable then you have to find out the objective function value whether the function value is reduced or not, but in true sense is not necessary. So, you have to check the what is called. So, our new corner point if you see the our new corner point or vertex is what what is our x 1, x 1 is entered as a if you see the x 1, x 1 is a non basic variables and x 3 is a non basic variables. So, our new corner vector is 0 then x 2 value I give basic variable x 2 value is 9 then x 3 value is your 0 with a non basic variable and x 3 value we got it 3 again that is x 3 value we got it 3. So, here the x 3, x 4 value we got it 3. So, this is the new corner variable. So, now we have to see the check associated cost function value. So, we know f of x if you recollect c B transpose x B plus c D transpose x D agree. So, this notation I have written small x you can write it small x B small x B this small x B and this small this small the throughout the text keep it that x small. So, this so put the value of c B, c B means what the coefficient associated in associated with the basic variables in the objective function. So, that value is 1 minus 1 c B transpose then it is a x 2 and x 4 then c D is your 1 5 then x 3 this is x 1 and x 3 x 1 and x 3 and that value is 0 this value is 0 and this value you got it 9 and this value is 6 sorry 3. So, if you do this one that is 9 minus 3 is equal to 6 you see that c B value c B value c B value c D value just put it in the objective function this. So, again what is you have to check the what is called your stopping criteria that you see the check the stopping criteria next check the step 4 not step 4 this step 5 step 5 check the stopping criteria. What is the stopping criteria again you find out R D transpose last example you see R D transpose. So, what is the R D transpose minus c B transpose B inverse D you put the value of c D transpose 1 5 then c B 1 minus 1 then B inverse value I am taking the inverse of this one 0 1 1 half 0 this is the B inverse then your D is 0 1 0 2 1 D value you see it the D value you got it. So, now D value what we got it you see that is corresponding to x 1 and x 3 what is x 1 and x 3 this x 1 and x 3 x 1 and x 3. So, this 1 2 1. So, this value is 1 not this value is 1. So, if you see this expression a matrix 1 0 2 1. So, this is 2 1 and if you compute this one finally, you will get half 3 and that corresponding to x 1 and that corresponding to x 3 which are non basic variables and see the non basic variables are positive. So, there is no negative term associated in the R D transpose. So, it indicates there is further not possible to reduce the value of the objective function. So, our objective function value will remain same as earlier that means, since R D transpose is greater than equal to 0 this indicates no further reduction in cost function is possible. So, our optimum value of the function as we got in the last stage that is this one optimum value of the function what you got it that that will be the optimum value function at the vertex. So, our optimal extreme point is 0 9 0 3 and the corresponding cost function and corresponding cost function value is 6. So, this is the solution of this one. So, basically first you have to identify the basic variables and non basic variables then you compute the what is called new solution of vertex of this one. Once you find out the vertex then you compute the what is the value of the objective function value and check the what is called further iteration is required or not by computing R D transpose of this one. Once you identify B D C B C D then you can compute that one if the elements of R D is containing the negative terms then take the largest negative one that is which element having the largest negative element that one will be the corresponding what is called non basic variable to basic variables agree. So, this is the problem with let us see the an example with this example we have shown how to sort out how to solve the problems. Graphically we will see now characteristics of this solution. So, minimize f of x is equal to let us call our objective function is given 990 990 into x 1 900 x 2 then 5 to 5 0 this is our objective function and subject to g 1 of x is equal to 0.4 x 1 plus 0.6 x 2 is less than equal to 8.5 then g 2 of x is equal to 3 x 1 minus x 2 then 25 g 3 of x is equal to 3 x 1 plus 6 x 2 less than equal to 7. So, one can easily form this is you can convert first you convert the what is called standard LP problem. So, standard LP problem so 0.4 0.4 x 1 plus 0.6 x 2 plus some slack variable x 3 this is slack variable in order to make it equal equality sign. Then next is your 3 x 1 minus x 2 plus another new variable x 4 is a slack variable is equal to 25. Then third equation x 1 plus 6 x 2 plus x 5 another slack variables introduced in third equation to make equality sign. So, our problem is minimize this one and then subject to the constraint of this. So, this is a standard LP problem is now formulated. So, you have to solve this one we know how to solve this one by what is called algebraic approach. So, first you identify which are the basic variables are there again. Then you can see once you know the basic variables of this one then there are 3 equations are there 3 equations and you have a 5 variables are there. So, how many what is called that basic solution is exist that one can find out immediately. So, our n is equal to how many variables are there 5 variables are there how many equations are there m is the number of 3. So, number of basic number of basic solution is equal to n c m. So, it is a factorial 5 divided by factorial 3 and this is a factorial 2. So, that will be a 10. So, 10 feasible basic solution is there number of basic solution. So, now you see the way you want to solve it by algebraic approach. So, you have to 3 basic variables are there and 2 are what is called non-basic variables. So, you select 3 basic variables and find out the new vertex of the solution. Once you find out the vertex of the solution find out the objective function value and once you find out the then you check the what is called our you check whether you need further to change non-basic variable to basic variable or not. Competing r d transpose if the elements of r d transpose contains negative terms negative values then take the largest negative component of r d and corresponding non-basic variable will enter as a basic variables and then you from the basic variables which variable will enter as a non-basic variable that you tested and repeat the process until unless you get that r d transpose all elements are positive. Once it is positive it indicates further movement is not required to achieve the minimum value of the functions. So, this is let us see this one graphically see what is that will make you more clear so let us call this is x 1 and this is x 2. Now, I am plotting this 3 equations so let us call first I am plotting g 1 of x. So, before that I am just putting 5, 10, 15, 20 and 25 and similarly 5, 5, 10 this is 15 and this is minus 5, minus 10, minus 15, minus 20 and minus 25, minus 10. So, let us call this equation I am plotting that is this is equal to 8.5. So, when x 1 is 0 then x 2 value will be 8.5 divided by 0.6 that will be 14.2. So, 14.2 is here 14.2 when x 2 is 0 just you plot that one with equal to sign when x 2 is equal to 0 that will coming near about 8.5 divided by 0.4 that will come near about 21.25. So, this is your equation and since it in inequality condition this one is g 1 of x is equal to 0. Since the g 1 x is less than 0 then this indicates this region all regions below this shaded one this condition is satisfied. So, our we also know the x 1 or x 2 is greater than 0 that means this quadrant this whole quadrant x 2 and also know x 1 is greater than 0. So, it is only in the first quadrant of this one. So, this is our 0. So, this is our g 1 now see the our g 2 similarly you plot you plot g 2. So, if you plot g 2 then when x 1 is 0 x 2 is minus 25. So, it starts from minus 25 minus 25 and then when x 2 you say when x 2 is 0 then it is a 8 point something. So, 8 point something means here. So, 8.33 let us call it is here. So, this is the straight line and this line is g 2 of x is equal to 0 on the line any point on the line g 2 is 0 any point on the line this blue line is g 1 x is 0. So, our since it is less than this our region is that one. So, now you plot it what is called g 3 g 3 when x 1 is 0. So, x 2 will be 70 by 6 that near about 11 point something. So, this one is 11.66 10 11.66. So, this point is 11.66. Now, when x 2 is 0 then this is 70 divided by 3 70 divided by 7 when x 2 is 0 70 divided by I am just plotting this one with equal to sign. So, 70 by this will be near about 20. So, this will be a so 70 by. So, it will be a 70 by 3 70 by 3 is 20 70 by 3 is near about 23.33. So, this will be 23.33 somewhere here or somewhere here. So, on the line this is g 3 of x is equal to g on the line and since it is less than this one that region is that one. So, clearly from this one our feasible region is that one only any point on this one any point on this shaded region is satisfy the all constraints, but outside this it does not violates the any one of the constraint out of the three constraint it violates. So, our thing this is the feasible region this. So, now according to the problem stated here according to the problem stated here you see that this is our function and we have to minimize this function minimize this function. So, we know if you add some constraint in a objective function and then you minimize this function the what is called the optimum point optimum point will not change anything, but function value will change it, but optimum value of this variable decision variable will not change. So, let us see our objective function or let us say what are the feasible points are there all basic solutions are there what are the basic solution are there. So, we have a this point let us call this point is p 1 this point then we consider this is p 2 this point is p 2 then we consider this point is p 3 and then we consider this point is p 4 and this point is p 5 and this point is p 6 and then this cross of this one is let us call p 7 then this cross is p 8 this cross is p 8 let us call this is p 8 p 8 and where it cross cross of that point is p 9 and this point is p 10 so this is the basic solutions are there agree. So, out of this basic solution you can easily realize from this figure that p 1 p 2 p 3 p 4 p 1 p 2 p 3 p 4 are the feasible solution and remaining that p 5 to p 10 p 5 to p 10 are the infeasible solution infeasible solutions. Now, let us say p 5 p 5 it does not satisfy it satisfies only the g 1 conditions, but it does not satisfy the other condition g 2 g 3 g 2 g 3 it does not satisfy that one it satisfies only g 1 and x 1 is greater than 0 x 2 is also greater than 0, but it does not satisfy g 1. Similarly, you can see other points also let us call p 6 p 6 also is satisfy the only g 1 conditions, but it does not satisfy other conditions. So, we may have in this particular problem that are what is called 10 basic solution are there out of 10 only 4 only this 4 p 1 p 2 p 3 p 4 are the feasible solution and remaining points vertices of this one is p 5 to p 6 p 7 p 8 p 9 and p 10 are the infeasible solution. Now, see if you change the some of the constraint let us call if I just put if g 1 of x is greater than equal to 8.5 that is our same thing just only we have changed the inequality constraint instead of less than equal greater than this then our region of for g 1 will be above this one above that one. So, we do not have at all any solution of this problem, because it violates all the points what we got the basic feasible basic solution all points is violates means is we do not have any solution if we change the what is called the constraint with this type is now let us call what is the our what is called our minimum value of this function. So, our objective function as we mentioned it that our objective function is f x if we add our problem is f x minimize the f x subject to this condition and what point what vertex this function will minimize same point if you change the function by a constant by adding a constant term with this function it will also minimize the new objective function at the same point that is we have already discussed that if you add to the objective function some constant term or if you add with the if you multiply by this thing with it some constant factor. So, our optimal point will not change it. So, let us call our objective function was this one that is given is minus 990 x 1 plus minus 900 x 2 minus 5250. So, now I am changing our new objective function is we are telling our new objective function is f bar of x which is nothing but a f of x plus 5250 that constant term we take in this one. So, that is a minus 990 x 1 minus 900 x 2. So, graphically you see so when x 1 is 0 x 2 0 the function value is 0. So, if you plot a line through 0 origin this is a bar of x is equal to 0 any point on this line is new objective function value is 0 means this one if you move this new objective function up parallel with this one f bar is 0 up and down the objective function value will decrease and increase. So, if you go up then objective function value is increase if you go down the objective function f bar value will decrease. Now, let us say if you go up slowly you are going up parallel to the f bar of x this dotted line parallel to this dotted line then function value is go on increasing, but our problem is to minimize the function value. So, that will be the minimize value of the function f bar is 0. So, we can go below suppose if you go parallel below this one then let us call another I am showing it parallel to this one is. So, the function value is decrease f bar value is decrease which in turn f also decrease agree, but we have to see whether it is a feasible solution or not. So, any point below this line any line parallel to this one if you go downwards then that will not give you any feasible solution because our feasible region is that one. So, let us call this corresponding to this corresponding to f bar of x is equal to minus 5 to 5 0 this and corresponding value one can easily find out this corresponding the line corresponding to this one, but this value is increasing I am sorry decreasing, but any point on this line or anywhere in this is not the feasible solution. So, this solution though function value is decrease, but solution is not acceptable. So, our for this particular problem from graphical interpretation is that the point p 1 is the optimum value of the function at that value. That means p bound value is x 1 is equal to 0 x 2 is 0 agree and x 3 x 4 x 5 value we will get it correspondingly that I am not just graphically I want to represent that what is this. So, I will just write you at p 1 point at point p 1 we will get the minimum value of f bar of x which implied f of x the and the corresponding value and the corresponding value is your minus 5 to 5 0. You see this one f bar what I have considered the f bar just f bar we have considered the value of f bar here see the value of f bar is this is 0. So, f of x is equal to minus this one is the optimum value of the function. So, the if I just recollect recall that you will get unique solution if the objective function and the constant have dissimilar slopes unique solution if the objective function and the constant have dissimilar slopes. And there is a infinite solution if the objective function slope and if it is same as one of the constant one of the slope of the constant equations or constant equation then you will get a infinite number of solution. That means same means parallel if the objective function is parallel with the constant of the subject to the constant one of the constant then we have a infinite solution. So, this is our so if you recall all this thing first given the if you have given the problem convert into standard LP problems. Then once you convert into the standard LP problems then find out the what it is see it is basic variable and non-basic variables. And you find out the objective function value at the initial vertex once you find out the objective function value then you compute the R D transport which will give the indication whether if you change one of the non-basic variable to a basic variable and basic variable to a non-basic variable whether function value will reduce further or not. That if it is shows that the R D transpose the elements of R D transpose having more than two negative numbers then consider the consider the largest negative component corresponding to the non-basic variable that that basic non-basic variable will treated as an basic variable for further iterations. And one of the basic variable you have to convert into a transfer entered one of the basic variable will entered as a non-basic variable by following for the test we have what we have mentioned it. So, this is the summary of the problem how LP problem is solved by algebraic approach how it can be solved. So, this is we will stop here today.