 the standard primal problem is like this way maximize a linear function, which a where x 1 x 2 dot x n are the design variables, which you can write in vector form like this way subject to the set of linear inequality constants, which you can write a x less than equal to e. So, this type of form of linear equations either in objective function or in and in what is called inequality constant. If it is like this way then it is called standard primal problem and dual of this problem is the structure is like this way minimize the function f of d whatever the right hand side of this equation was there in inequality equation right hand side of this will come as a coefficient in the objective function linear objective function of the dual problem the e 1 y 1 e 2 y 2. So, how many variables will be there equal to the number of inequality constant in primal problems and subject to this type of inequality conditions inequality condition in the form of linear equations. That is when we will convert into dual problems and we know how to solve this one if the primal problem is given then convert into a standard first convert into dual problem and then dual problem you convert into standard l p problem. Then you solve it by either phase one method or phase one and two both method is a depending upon the type of inequality involved in the set of linear equations. And we have work out one simple example and we have seen that the values that is y 1 y 2 dot dot y 6 values which is dual variables values are there then question is how to go back to our primal variables which is the problem is original problem is given that way. So, first we have to now today's lecture is we have to find out the relationship between the primal and dual variables or what is the relationship between primal and dual problems. So, first relationship we can say if one problem has a feasible solution if one problem has a feasible solution and unbounded what is or if one problem has a feasible solution and has a bounded objective function value then other problem should have a feasible solution. This is one thing next is if one problem is next point if one problem has a feasible solution if is a feasible solution solutions and unbounded objective function value then other function is also do not have any feasible solution infeasible solution. That means if one problem has a feasible solution but unbounded objective function then other problem have having a infeasible solution this is the second observation you can see and the third one if one problem has no feasible solution then other problem either do not have feasible solution or they have what is called unbounded objective function value. So, this now next we will see how one can convert the feasible variables how one can convert that our feasible variables in let us call what is called dual variables how one can convert dual variables into a primary variables and vice versa. Before that we will study the first see the few theorems that theorem if x having a dimension n cross 1 is a feasible solution to the to the primal problem to the primal problem and y is your m cross n feasible a feasible a feasible solution for the dual problem. Then one can write y transpose e which is the objective function of the dual problem y transpose e or e transpose y is value objective function value is greater than equal to x transpose d the small x you write it d and you know the dimension of the dimension of e you know what is dimension of e is dimension is m cross 1 that primal problems how many inequality constants are there m constant are there and same number of variables present in the dual what is dual problems. So, this is a scalar quantity this is also scalar quantity. So, our theorem tells if x is a feasible solution of a primal problem and y is the feasible solution of the dual problem then the objective function of the dual problem is always greater than equal to the objective function value of the primal problems that is one. Let us see the proof of this one. So, since x is a feasible solution is a feasible solution of the primal problem feasible solution then what you can kind it must satisfy the our inequality constant of primal problems. That means a into x whose dimension is n cross 1 variables are there is less than equal to e and is dimension m cross 1 and your and what is the variables in dual problems y and y is greater than equal to 0 and also that x or I write it x is greater than equal to 0 for this one. Similarly, in dual problems the feasible solution of the dual problem is y m cross 1. Similarly, if the feasible solution of the dual problem is y then we can write it immediately we can write it a transpose y is greater than equal to our d and d dimension n cross 1 and y variable dual variables values are all greater than 0. Now, see from this one this equation if I multiply it by both side by x transpose then one can write it if I multiply it by both side x transpose of previous equation then we can write it x transpose a transpose y is greater than equal to x transpose d. This is a scalar quantity this is a vector column vector of the multiplying base which is nothing but a in your case is d if you see and this is a vector of dimension if what is the dimension n cross 1 and this is the dimension of 1 cross n x transpose. So, this is a scalar quantity. So, if you take the transpose both side because scalar quantity transpose both side is remain same. So, I can write it y transpose a x is greater than equal to d transpose x which is nothing but a same as x transpose d same because scalar transform scalar value transpose is same value is there. Note you can note that that a x in the primal problem this a x is less than equal to e. So, if I replace this one by a greater number this inequality sign still valid. So, I can write y transpose e is greater than equal to x transpose d and what is this one this is nothing but a objective function value of the dual problems. So, this I can write it f dual problem objective function which is the function of y is greater than equal to the objective function value of the primal problem that is function of x this always to for all x x components is x 1 x 2 x 3 dot x n and for all y 1 y 2 dot y m. So, this proves the theorem of this one proved. So, if we tell one thing if x is the feasible solution of primal problem and y is the feasible solution of the dual problem. Then we can write it the objective function of the dual problem is always greater than equal to the objective function value of the primal problem that is our conclusion and which we have proved here. Next we will see that another theorem that is theorem and if you remain just I am writing it here primal problem is what I am writing maximize z transpose of x which is nothing but a we have written it z of p z of p is equal to this one subject to a of x is less than equal to e that e is the number of inequality constraint in the primal problem. And it is corresponding dual problem is what minimize f of d and what is the right hand side of the primal variables that will come as a coefficient of objective function in the dual problem. So, it will be a if you see this one it is nothing but a y transpose e or you can write e transpose y this subject to a transpose y is greater than equal to d what is the coefficient in the primal problems are coming in the objective function that will come the right hand side of the inequality constraint of dual problems that is dimension is n cross 1 that is our basic statement of the primal and dual problems. The next theorem is the suppose x bar and y bar are feasible solution to the primal and dual problems to the primal and dual problems that means x bar and y bar are the solution of the primal and dual problems are that if a feasible solution of the dual problems. Then if d transpose x bar equal to if it is equal to that y transpose or e transpose y if it is this y bar because these are the feasible solution of the primal dual problem if this equal to this then x bar which we have considered the feasible solution that will be x star means optimal solution of the primal problems x bar and y bar will be equal to y star that means optimal solution of the dual problem means maximization of the function variables that optimal points will get it here if this equal to this this indicate this is the optimal point of dual and this is the optimal point of the primal problems this are the these are the optimal solutions to their respective problems. So, please try to understand what is this if x bar and y bar are the two feasible solution if x bar are the two feasible solution. If you get the objective function of the objective function value of the dual problem value and the primal problem objective function value are same at that two feasible points then we will call that two feasible points are the optimal solution of their respective problems. Then let us see the proof of this theorem. So, let y be an arbitrary feasible solution y is an arbitrary feasible solution of dual problem this arbitrary feasible solution not optimal it is at this moment to the dual problem because x bar because x bar you see is a feasible solution to the primal problem then one can write immediately we can write it it transpose y objective function of this one is greater than equal to the d transpose x bar agree this we can write it even. Therefore, if e transpose y bar there are some values of y bar some feasible solution where if is equal to the d transpose x bar this indicates this indicates then this implies that e transpose y bar is equal to d transpose x bar x bar is less than equal to less than equal to e transpose of y you see d transpose x bar is less than e transpose is. So, if some other than y is there is a there is a feasible point which equal to this indicates that this quantity of objective function value of primal and dual is less than e transpose of that one agree. So, what does it mean this implies that our y bar this implies that y bar is nothing but a our optimal solution of the dual problem is the optimal solution for the dual problem optimal means optimal solution of the dual problem dual problem of our is minimization of the problem minimization agree. Similarly, on the other hand on the other hand with with the same reason on the other hand on the other hand if let let x on the other hand let x on the other hand let x n cross 1 b n arbitrary feasible solution r b triary feasible solution x related to the primal problem the primal problem agree. Because according to the statement of the problem because y bar is the feasible solution is the is a feasible solution of the dual problem to the dual problem immediately we can write it that y transpose e transpose y bar is greater than equal to d transpose x this is the objective function of the dual problem objective function below of dual problem where y bar is the solution in the feasible solution in the dual problems is greater than this one. So, this is greater than this one agree. So, therefore, if e transpose y there are some choice of x is if some choice of x is if some choice of x some choice of x rather than some value let us call it is a d transpose x bar some choice of x x is x bar this objective function is same. And this is this quantity will be greater than or less than this quantity will be that this is a greater this quantity that d bar of this will be greater than equal to d transpose of x e of transpose this I am now telling there exist let us call some feasible solution x bar for which this value is increased objective function and it becomes equal to the e transpose y bar. And since e transpose y bar value is greater than d bar of x this indicates that x bar this implies this implies that x bar is equal to x star is the optimal solution. Of the primary problem optimal means that maximum that optimal this x is the optimal solution of the pipe and corresponding to the maximum value of the function x star will give you and that proves the theorem. So, there are two theorems we have just told you if x is a if x bar is a feasible solution of primary problem and y bar is a feasible solution of a dual problem. If this that means what is this objective function of this one if x x bar transpose into d is equal to that y bar transpose y bar transpose into e if it is same or vice versa d transpose x is equal to e transpose y because it is a scalar quantity I can take transpose same that this indicates the x bar and y bar are the optimal solution of the dual and what is called primary problem optimal solution y bar corresponding to the optimal solution of dual problem and x bar which is equal to x star the optimal solution of the primary problem if their objective functions are value is same. So, next is we state a theorem for which will give you the relationship between the primal variables and the dual variables that theorem will tell you how they are related with primal variables x and dual variables y how they are related the theorem and keeping in mind that primal standard primal problem statement and the dual corresponding dual problem statement keeping in mind we can write it now the feasible solution the feasible solution x and y to a dual pair of problems are optimal if and only if necessary and sufficient condition the feasible solution x x corresponding to the primal problem and y variables corresponding to the dual problems that is a dual pair problems are optimal if and only if one that x transpose that x transpose then you write the inequality constraints associated in the dual problems that means a transpose y minus d and the dimension n cross 1 similarly immediately you done this dimension is what should be the dimension of this one m cross 1 this is n cross 1 this dimension is n cross 1 this equal to 0. Another condition is that y transpose when write the y transpose then you dual problem y transpose you write the inequality constraints that you got it what is called in the primal problem that is 8 into x minus e is equal to 0 this is scalar quantity this is scalar quantity and this dimension is m cross 1 this dimension is n cross 1 similarly you can find out other dimension as you know earlier. So, our theorem tells if x and y are the feasible solution of the dual problems again this are optimal this dual problems are dual problems x 1 x 2 are the dual problems are optimal if and only if this condition is satisfied that this indicates that if you know the solution of the dual problems agree one can find out what is the solution of in primal problems primal problems what is the original problem given in if it is a primal problems what is the solution that we can find out using this two relationship. So, let us see the proof of this one proof is very easy to see that how to get it this proof how to prove it this one if the if two solution are optimal then by theory theorem the optimality theorem what we then d transpose x must be equal to y transpose or e transpose y agree d transpose x is equal to the this is the objective function of dual problems dual problem objective function objective function of dual problem this is the objective function of primal problems. So, if the solution are optimal that is then only this equal to this optimal this equal to this we can write it we know that if x is the optimal solution of this one that means x is a feasible has a feasible solution that we because you can write it because x of k x of a into x whose dimension is this is less than equal to e. Since x is a feasible solution x is the optimal and feasible solution then this is true and not only this in the dual problem this y e is greater than equal to this. Now, we have now we have let us see x transpose a transpose we have let us see x transpose a transpose y minus d what is what will get it this equal to say this equal to minus just you expand this bracket open it then x transpose d plus x transpose a transpose y since it is a scalar quantity I can write it this inverse y transpose a and x minus x transpose d. If you take x transpose d or d transpose x is nothing but a y transpose e. So, we can write it first term as it is second term I can write it easily y transpose e if you take y transpose common then this is x transpose of e. So, x transpose a transpose y is nothing but a y transpose x is y. Now, look at this expression individually that left hand side and right hand side then what will get it see this one left hand side x transpose a transpose y minus d what you can write it x is the all decision variable in primal problem and that very value each element of x there are n variables are there all are greater than equal to 0. Whereas, the inequality constraint in dual problems this quantity if you see the inequality constraint of this quantity is greater than equal to 0. So, this implies the results of this one is result this implies result of this one is becoming less the greater than equal to 0. That means I can write it that x transpose a transpose y minus d is greater than equal to 0 the left hand side. Now, see the right hand side y transpose a x minus d is greater minus e what is this one this is the dual problem variables this value each element of this vector y is greater than equal to 0 and what about the constraint in the primal problems a x minus a is always less than equal to 0. So, this implies that this quantity is greater than equal to 0 and less than equal to 0 this indicate that results is less than equal to 0 means that y transpose a x minus e is less than equal to 0. Just now we have seen earlier these are two equal and one case it is telling that this equal to greater than 0 another case it is telling this equal to less than 0, but both are equal value. So, this cannot be true and it is true only if it is true only if x transpose a transpose y minus d equal to y transpose a x minus e equal to 0. So, in other words we can write x transpose individually this two terms y of d is equal to 0. And y transpose a x minus e is equal to 0 so this is proved the theorem. So, using this theorem one can get the values of dual variable values from the primal variable values and vice versa. I can get the primal variables values after solving the dual problem by using this theorem and vice versa. So, this is the theorem let us now work out one simple example and see how one can solve such type of problems agree. Let us say that example consider the primal dual problem pair given by just here I will solve that if you know the solution of dual problem how to get the solution of primal problem without solving the what is your primal problem in solving using LP problems simplex method. So, let us call our primal problem is maximize z of p is given 3 x 1 plus 2 x 2 subject to x 1 plus x 2 is less than 80. So, this is the inequality constraint of this type if you do not have of this type you have to convert into this type less than equal to this type of form by some manipulations you have to do even if you have a equality sign then you have to convert into this form that you know we have already discussed in details earlier. So, that you can this part we have written is e 1 if you correct then we have another equations inequality condition 2 x 1 plus x 2 is less than equal to 100 is e 2. This is our e 2 right inside of the inequality and we have one equations are there inequality x 1 is less than 40 that means this is our e 3 40 is right hand side of inequality is 40. So, if you just write in terms of our notation that is d transpose of this is 3 2 I can write x 1 x 2. So, this is nothing but our d transpose and this is nothing but our x. So, this set of equation I can write it into matrix form that is a into x is less than equal to a vector e whose dimension is 3 cross 1. Now, we identify what is our a is in your case if from this 3 equation one can write 1 1 2 1 1 0 this is our a. And this is what is our e is our if you see that you are 80 then 100 then our 40 is our into. So, it is a standard LP what is called primal dual primal problems. Now, the corresponding dual problems dual problem minimize f of d minus f of d minus f of d minus f of d minus now you see what is this will come as a coefficient in the dual problems of the objective function. So, that is 80 y 1 plus 100 y 2 how many variables will be there in the dual problems same as the number of inequalities present in the primal problems plus 40 into y 3 and subject to. So, this coefficient first column of this coefficient multiplied by y 1 y 2 y 3 so it will be a it will be a y 1 plus twice y 2 plus y 3 is greater than equal to first coefficient of the primal objective function 3 that is then next is y 1. Similarly, I can write y 1 plus y 2 greater than equal to 2 and that we have denoted by d 1 if you see d 1 coefficient is in this is d 2 and then we have a because we have a 2 coefficients if you see here. So, 2 inequality constraints will be there in dual problems and y 1 y 2 and y 3 will be greater than equal to 0 and what is our a transpose if you write it this set of inequality is nothing but a transpose y is greater than equal to our d and then you see our a transpose is nothing but a what is a got it that transpose 1 to this matrix if you write this matrix y into 2 1 1 1 0 and it is nothing but a whatever the a we got it that transpose agree. Then our y we know y 1 y 2 y 3 and d is our case is a transpose d is equal to our case is 3 2 and it is nothing but a we can write it this one if you see this one we can write it e transpose y. So, if you see the our e is this one. So, you can solve this problem by suppose this is you have given primal problems you are asked to solve. So, that rather I can say show that that x transpose x which dimension is 2 cross 1 again is equal to 20 60 transpose is an optimal solution of the primal problem that is you show it once it is a optimal solution of primal problem that x 1 x 2 x 1 is 20 x 2 is 60 must be a feasible solution of the primal problems. So, let us see how we can solve one can solve this problem by that is first you solve it with this one again. Suppose you want to go back to from one solution to the what is called I want to go this is the primal solution you have to solve it that is I asked to show that. So, I know the solution suppose I want to I want to know the what is the dual problem solution that means y 1 y 2 y 3 star what is the solution of this one that I can once I know the solution of primal problem I can get the solution of dual problem by using the our that theorem last theorem we have discussed or if you know the solution of the dual problem we can go back to the solution of our primal problem by using that theorem. So, now see our the complementary condition that implies our conditions is relationship between the dual variables and the primal variables are this two equation if you see a y transpose dual variable a into x minus e is equal to 0 and this is 1 cross 1 then another condition is x transpose a y of this minus d is equal to 0 this is 1 cross 1. So, this now let us see that once you know this one how can you find out y star that means if you know the primal solution how will you get the dual problem solution y 1 y 2 y 3 let us see. So, we can write it that y 1 has a 3 components y 1 y 2 is y 3 is a column vector transpose is a becoming a row vector and the theorem tells if you see this theorem it tells that if you have a what is called here. If you x and this solution of the dual problem are primal optimal then this is equal to this if it is optimal solution and our problem is given. So, that this optimal solution is that find out the optimal solution in dual problems y 1 y 2. So, I can write it this or I immediately I can write this is a star of y star because optimal solution of this star indicates that optimal solution of this one multiplied by a x minus e and that already we have seen our problem this a x minus e problem if you see this is a x minus if you take this is that side is that that one only. So, x 1 plus x 2 minus a t. So, x 1 star plus x 2 star minus a t 1 first equation then second equation 2 x 1 you see 2 x 1 plus x 2 star 2 x 1 star plus x 2 star minus 100. Now, third one x 1 star minus 40 this equal to 0 1 minus 1 cross 1. Now, look this one if you expand that one y 1 star multiplied by this into this x 1 star plus x 2 star minus a t plus y 2 star 2 x 1 star plus x 2 star minus 100 plus x y 3 star plus into x 1 star minus 40 is equal to 0. Look at this expression y star value is what we expect that value must be equal to get as an equal to 0 and what is this values this value if you see from the what is called inequality constant of primal problem x 1 plus x 2 minus a t is less than equal to 0. So, this quantity is less than equal to 0. So, what is the resultant of this one will get tell me greater than equal to 0 and this quantity is greater than a less than equal to 0. So, results will be less than this product of this one is less than equal to 0 this one. Now, what about this one similarly this is greater than equal to 0 and this is 2 x 1 plus x 1 minus 100 is less than equal to 0. So, resultant of this one will be product of this will be less than equal to 0 similarly this one same logic we can write y 1 this y 3 is greater than equal to 0 and this one less than equal to 0 and product is less than equal to 0. So, whole thing is 0. So, there is no possibility of cancelling one another either it will be negative if what situation all will be negative which does not satisfy this right hand side. So, this is only satisfied if each component of this one is 0. So, I can write it therefore, y 1 star into x 1 star plus x 2 star plus x 2 star plus x minus 80 is equal to 0 and then y 2 star is 2 x 1 star plus x 2 star that component minus 100 is equal to 0. The last one is your y 3 star x 1 star minus 40 is equal to 0 and this set of equation I got it from this equation this condition and this condition is getting from what is called the theorem that if x and y are the two optimal solution of the dual pair then we can write this and this equal to 0 only then if it is 0. Now, look at this expression where our solution is given that primal solution is given x star is 20 and 60 that means x 1 is 20. So, in this equation if you put x 1 is 20 that means this quantity is not equal to 0 then in order to make this is 0 y 3 must be 0. So, y 3 star is equal to 0 since x 1 star is not equal to 40. Our case in our case x 1 star is what x 1 star is 20 that is why we got it x 3 is the dual problem solution x 3 star is 30. But now look at this expression that x 1 x 2 now from the set of equation this set of equation what we can write it from B condition from B conditions similarly with the same logic if you expand that one if you expand that one you will get it from B condition you will get it x 1 star y 1 star plus twice y 2 star plus y 3 star minus 3 is equal to 0. You see I am just applying that x 1 star x 1 transpose x 1 transpose then x 2 x 3 multiplied by a transpose y minus d you know a y transpose minus d that is our a y transpose minus d is this equation. So, I am writing this equation now so x 1 into y 1 star twice y 2 star minus plus y 3 minus 3 is equal to 0 because if you expand in the similar manner with same logic I can say that each individual component must be 0. So, this is 0 then another condition I am getting it here x 2 star into that equation a transpose y minus d that one that y 1 star plus y 2 star minus 2 is equal to 0. So, you know the value of x 1 is 20 this value is 20 primal solution and this value is our 60 you see this one is given that problem the solution of this problem is given 20 and 60. So, this is 60 this implies that y 1 star plus twice y 2 star plus y 3 star minus 3 is equal to 0. This implies this since it is 60 it cannot be only possible this must be 0 that y 1 star plus y 2 star minus 2 is equal to 0. Now, this value just now you have found out from condition a is 0. So, you have to solve it 2 equations now y 1 star plus twice y 2 star minus 3 is equal to 0 then another is y 1 star plus twice y 2 star minus 2 is equal to 0. So, solve this solve these equations we get y 1 star is equal to 1 y 2 star is equal to 2 we get y 1 star is equal to 1 y 2 star is equal to 2. So, our solution in the solution of dual variables the optimal solution of the dual variables we got it y 1 star is equal to 1 y 2 star is equal to 2 y 3 star is equal to 0. Clearly, if you see the graphical representation of this problem it is a feasible solution and corresponding function value is what you can get it just put the value in this equation in which equation you have to put in this value that f of d our nothing but your e transpose y our e is what 30 into 30 into 80 into 1 100 in you see 8 y 1 value this is our dual problem 80 into 1 100 into 2 200 280 agree and y 3 value is 0. Similarly, if you see in the primal problems here primal problems our solution is 0. So, solution is just now we have shown the solution is 20 and 20 and 60 what is this problems just a minute. So, this our this is and our primal problem is that one if you just if you just apply use the 20 and 60 is an optimal solution of the our primal problems this is you put in the objective function if you put the in the objective function x is equal to 20 and 60 you will get the same objective function value as you got from the dual problems. So, you just I will show you this results now here you see here see our optimal solution of this one what you got 20 20 into 3 20 into 3 60 and this is 60 60 into 2 120 120 and 60 180 another dual problems what with the results we got it x 1 y 1 e is your 1 y 2 e is 2 and our that value just if you see this one that value will got also 180 just now it told it you got it 180 in the dual problems. Here 80 y 1 e is 80 y 2 e is 2 y 2 e is 280 here you are getting 60 into 2 120 into 6 to 180. Again you will get it the same below as you did in the both cases. So, we will stop it here again.