1 00:00:18,240 --> 00:00:28,240 in this class we will look at the algebraic method to solve minimization problems we consider 2 00:00:28,240 --> 00:00:35,210 the same minimization problem that we used the same problem that we solved using the 3 00:00:35,210 --> 00:00:44,730 graphical method so the problem minimizes seven x one plus five x two subject to x one 4 00:00:44,730 --> 00:00:51,640 plus x two greater than or equal to four five x one plus two x two greater than or equal 5 00:00:51,640 --> 00:01:01,119 to ten x one x two greater than or equal to zero now once again we will follow the same 6 00:01:01,119 --> 00:01:09,190 procedure where we convert the inequalities two equations and we try to solve the equations 7 00:01:09,190 --> 00:01:17,049 so as we did before we will consider the two constraints we will at present leave out the 8 00:01:17,049 --> 00:01:23,049 objective function and the non negativity so the two constraints are x one plus x two 9 00:01:23,049 --> 00:01:28,979 greater than or equal to four and five x one plus two x two greater than or equal to ten 10 00:01:28,979 --> 00:01:36,060 now let's look at x one plus x two greater than or equal to four and convert it to and 11 00:01:36,060 --> 00:01:45,189 equation and we do it as follows now this constraint x one plus x two greater than or 12 00:01:45,189 --> 00:01:54,960 equal to four is now written as x one plus x two minus x three equal to four now x one 13 00:01:54,960 --> 00:02:02,579 and x two are greater than or equal to zero and we want x one plus x two to be either 14 00:02:02,579 --> 00:02:12,210 equal to four or more than four so we introduce the variable x three such that if x one plus 15 00:02:12,210 --> 00:02:21,350 x two is more than four then x three would take a positive value and then make it equal 16 00:02:21,350 --> 00:02:26,300 four so that x one plus x two minus x three is 17 00:02:26,300 --> 00:02:35,070 equal to four if x one plus x two is exactly equal to four than x three will take value 18 00:02:35,070 --> 00:02:44,250 zero now x one and x two have to be such that they ordinarily should not be less than four 19 00:02:44,250 --> 00:02:50,470 therefore x three does not take a negative value so x one plus x two greater than or 20 00:02:50,470 --> 00:03:03,280 equal to four is now rewritten as x one plus x two minus x three equals to four so x one 21 00:03:03,280 --> 00:03:09,570 plus x two greater than or equal to four is now written as x one plus x two minus x three 22 00:03:09,570 --> 00:03:20,980 equals to four now this x three is called a surplus variable it is also a slack variable 23 00:03:20,980 --> 00:03:27,091 but because x three has a negative sign it is also a called a negative slack variable 24 00:03:27,091 --> 00:03:33,760 or it's called a surplus variable so when we have a greater than or equal to the constraint 25 00:03:33,760 --> 00:03:37,680 like this now that would result in a negative slack 26 00:03:37,680 --> 00:03:45,150 or a surplus variable in a similar manner five x one plus two x two greater than or 27 00:03:45,150 --> 00:03:54,180 equal to ten is written as five x one plus two x two minus x four equal to ten now the 28 00:03:54,180 --> 00:04:01,540 minus x four comes because when five x one plus two x two exceeds ten then x four will 29 00:04:01,540 --> 00:04:08,720 take a positive value to make it equal to ten if five x one plus two x four is exactly 30 00:04:08,720 --> 00:04:17,530 equal to ten then x four will take zero we also should have x one x two such that five 31 00:04:17,530 --> 00:04:23,979 x one plus two x two is greater than or equal to ten five x one plus two x two is not less 32 00:04:23,979 --> 00:04:28,190 than ten and therefore x four does not take a negative 33 00:04:28,190 --> 00:04:36,300 value so when we have a greater than or equal to constraint we have a negative slack variable 34 00:04:36,300 --> 00:04:43,270 or surplus variable introduced x three and x four have been introduced and importantly 35 00:04:43,270 --> 00:04:49,599 x three x four are greater than or equal to zero and they will have a negative sign if 36 00:04:49,599 --> 00:04:55,490 we have a greater than or equal to constraint in the earlier class when we had a less than 37 00:04:55,490 --> 00:05:02,900 or equal to constraint we introduced x three and x four as positive slack variables again 38 00:05:02,900 --> 00:05:09,169 x three and x four where greater than or equal to zero but x three and x four had a plus 39 00:05:09,169 --> 00:05:18,069 one sign appearing so when we convert an inequality to an equation by adding a slack variable 40 00:05:18,069 --> 00:05:24,740 we could add a positives slack variable if the constraint is less than or equal to type 41 00:05:24,740 --> 00:05:30,060 and a negative slack if it is greater than or equal to type but what is important is 42 00:05:30,060 --> 00:05:37,470 that the slack variables are defined as greater than or equal to zero in both the cases just 43 00:05:37,470 --> 00:05:44,219 as the decision variables are defined as greater than or equal to zero so once again we observe 44 00:05:44,219 --> 00:05:50,740 like in the previous example that with the addition of the two slack variables we now 45 00:05:50,740 --> 00:05:59,740 have two equations but we have four variables we also know that if we have two equations 46 00:05:59,740 --> 00:06:06,050 we can only solve for two variables therefore we follow a similar manner like what we did 47 00:06:06,050 --> 00:06:12,330 in the previous class to try and solve this system that now has four variables and two 48 00:06:12,330 --> 00:06:19,809 equations just as in the previous example the negative slack or surplus variables do 49 00:06:19,809 --> 00:06:25,809 not contribute to the objective function and therefore they contribute a zero to both 50 00:06:25,809 --> 00:06:34,530 x three and x four we now go on to solve this system that minimizes seven x one plus five 51 00:06:34,530 --> 00:06:42,340 x two plus zero x three plus zero x four subject to x one plus x two minus x three equal to 52 00:06:42,340 --> 00:06:50,090 four five x one plus two x two minus x four equal to ten x one x two x three and x four 53 00:06:50,090 --> 00:06:56,910 greater than or equal to zero now the linear programming problem that we have to solve 54 00:06:56,910 --> 00:07:02,870 is to minimize seven x one plus five x two plus zero x three plus zero x four subject 55 00:07:02,870 --> 00:07:09,999 to the two constraints and non negativity since we have four variables and two equations 56 00:07:09,999 --> 00:07:21,879 we can only solve for two variables at a time and these two variables from four given variables 57 00:07:21,879 --> 00:07:40,189 can be chosen in four c two or it can be chosen in six ways so it can be chosen in so it be 58 00:07:40,189 --> 00:07:45,569 chosen in four c two ways or it can be chosen in six ways 59 00:07:45,569 --> 00:07:52,509 now these six ways of choosing the two variables are shown here for example one of them would 60 00:07:52,509 --> 00:07:57,979 be to solve for x three and x four another one could be to solve for x one and x and 61 00:07:57,979 --> 00:08:06,909 three and so no now when we choose the two variables in anyone out of the six ways we 62 00:08:06,909 --> 00:08:12,800 have the other two variables which we are not solving for and these variables have to 63 00:08:12,800 --> 00:08:19,969 be fixed to some arbitrary value now they can be actually fixed to any arbitrary value 64 00:08:19,969 --> 00:08:28,330 which means they can take infinite values but as we did before in the previous example 65 00:08:28,330 --> 00:08:35,529 we fix those variables to zero so these variables which we are fixing at 66 00:08:35,529 --> 00:08:43,599 zero or these variables which we are fixing variables fix to zero are called non basic 67 00:08:43,599 --> 00:08:51,639 variables and those variables that we are solving are called basic variables so at a 68 00:08:51,639 --> 00:08:58,839 time we take two variables out of the six and solve for them by fixing the remaining 69 00:08:58,839 --> 00:09:10,550 two variables to zero so now let us go back and look at all the six possible solutions 70 00:09:10,550 --> 00:09:18,339 so first let us look at the so the case where we are going to solve for x three and x four 71 00:09:18,339 --> 00:09:26,510 by fixing x one and x two to zero now when we solve when we fix x one and x two to zero 72 00:09:26,510 --> 00:09:34,839 i am kind of deleting x one and x two so we are going to solve for x three and x four 73 00:09:34,839 --> 00:09:43,190 so we solve for minus x three equals four minus x four equals ten which gives us a solution 74 00:09:43,190 --> 00:09:50,899 x three equal to minus four and x four equal to minus ten it gives us this solution now 75 00:09:50,899 --> 00:10:00,950 when we consider this solution where x one equal to zero x two equal to zero x three 76 00:10:00,950 --> 00:10:08,540 equal to minus four and x four equal to minus ten we have this solution where x three equal 77 00:10:08,540 --> 00:10:14,350 to minus four and x four equal to minus ten violates the non negativity restriction and 78 00:10:14,350 --> 00:10:25,329 therefore this solution is infeasible so this solution becomes infeasible because it violates 79 00:10:25,329 --> 00:10:44,339 the non negativity restriction 80 00:10:44,339 --> 00:10:51,180 now we look at the second instance where x one and x three we are going to solve and 81 00:10:51,180 --> 00:11:07,720 we are going to fix x two and x four to zero so we are going to if we take the second instance 82 00:11:07,720 --> 00:11:16,019 we are fixing x two and x four to zero and we are going to solve for x one and x three 83 00:11:16,019 --> 00:11:23,430 since we are fixing x two and x four to zero i am leaving them out so i am going to solve 84 00:11:23,430 --> 00:11:31,800 x one equal to four five x one is equal to ten so five x one equal to ten x one minus 85 00:11:31,800 --> 00:11:41,350 x three is equal to four so five x one equal to ten gives me x one equal to two gives me 86 00:11:41,350 --> 00:11:48,680 x one equal to two and when i substitute x one equal to two i will get x three equal 87 00:11:48,680 --> 00:11:54,399 to minus two so that x one minus x three is equal to four 88 00:11:54,399 --> 00:12:05,529 so we have a solution x one equal to two x two equal to zero 89 00:12:05,529 --> 00:12:16,649 so x two equal to zero x three is equal to minus two and x four is equal to zero now 90 00:12:16,649 --> 00:12:23,250 because x three is equal to minus two it violates the non negativity restriction and therefore 91 00:12:23,250 --> 00:12:32,819 this solution also becomes infeasible now we look at the third out of this six problems 92 00:12:32,819 --> 00:12:41,329 where we are going to solve for x one and x four and we are going to fix x two and x 93 00:12:41,329 --> 00:12:50,949 three to zero since i am fixing x two and x three to zero i am removing x two and x 94 00:12:50,949 --> 00:12:59,230 three from this solution so this gives me a system where x one is equal 95 00:12:59,230 --> 00:13:08,449 to four this gives me a system where x one is equal to four and five x one minus x four 96 00:13:08,449 --> 00:13:15,019 is equal to ten so x one is equal to four is shown here that is the solution and when 97 00:13:15,019 --> 00:13:22,910 i substitute five x one five x one becomes twenty therefore x four becomes ten so that 98 00:13:22,910 --> 00:13:31,529 five x one minus x four is equal to ten so i get a solution x one equal to four x four 99 00:13:31,529 --> 00:13:38,629 equal to ten so x one equal to four x two equal to zero x three equal to zero x four 100 00:13:38,629 --> 00:13:46,389 equal to ten satisfies the non negativity restriction and therefore it is feasible it 101 00:13:46,389 --> 00:13:52,629 is a basic solution because i am solving for two variables i am solving for two variables 102 00:13:52,629 --> 00:13:59,779 because i have two equations so this solution is both basic and feasible therefore it is 103 00:13:59,779 --> 00:14:06,050 basic feasible now i compute the value of the objective function 104 00:14:06,050 --> 00:14:13,750 for x one equal to four x four equal to ten so seven into four plus five into zero gives 105 00:14:13,750 --> 00:14:20,399 z equal to twenty eight the value of the objective function is twenty eight now we move on to 106 00:14:20,399 --> 00:14:30,720 the fourth out of the six solutions now in this solution 107 00:14:30,720 --> 00:14:37,240 in this solution i am going to solve for x two and x three and i am going to fix x one 108 00:14:37,240 --> 00:14:46,170 and x four to zero so i am going to fix x one and x four to zero so this goes this goes 109 00:14:46,170 --> 00:14:54,279 this also goes so the second equation becomes two x two equal to ten from which i get x 110 00:14:54,279 --> 00:15:06,230 two equal to five from which x two is equal to five and if i substitute x two five i get 111 00:15:06,230 --> 00:15:11,740 five minus x three is equal to four therefore x three equal to one 112 00:15:11,740 --> 00:15:19,649 so i have a solution x one equal to zero x two equal to five x three equal to one x four 113 00:15:19,649 --> 00:15:28,050 equal to zero and this solution is feasible because it satisfies the non negativity restriction 114 00:15:28,050 --> 00:15:34,889 it also satisfies the two equations it is also a basic because i am solving for two 115 00:15:34,889 --> 00:15:41,889 variables x two and x three and i have two equation so i have a basic feasible solution 116 00:15:41,889 --> 00:15:47,470 therefore i try to find out the objective function value so the objective function value 117 00:15:47,470 --> 00:15:55,540 would be seven into zero plus five into five which gives me z equal to twenty five 118 00:15:55,540 --> 00:16:09,129 now i move on to the fifth of the six problems where i am going to fix x one and x three 119 00:16:09,129 --> 00:16:16,170 to zero and i am going to solve for x two and x four so i fix x one and x three to zero 120 00:16:16,170 --> 00:16:26,959 x so x one and x three to zero so the first equation gives me x two equal to four first 121 00:16:26,959 --> 00:16:33,120 equation gives me x two equal to four which is shown here and when i substitute two equal 122 00:16:33,120 --> 00:16:41,550 to four eight minus x four is equal to ten which gives me x four is equal to minus two 123 00:16:41,550 --> 00:16:47,529 now when x four is equal to minus two it violates the non negativity restriction and therefore 124 00:16:47,529 --> 00:16:55,829 this solution is not feasible so it become infeasible and this is written as in feasible 125 00:16:55,829 --> 00:17:07,280 now we go to the last of the six situations now the last one i am going to solve for x 126 00:17:07,280 --> 00:17:14,120 one and x two i am going to fix x three and x four to zero so i am going to fix x three 127 00:17:14,120 --> 00:17:22,079 and x four to zero so this goes this also goes i have to solve for x one plus x two 128 00:17:22,079 --> 00:17:29,200 equal to four five x one plus x two x two equal to ten i multiply the first equation 129 00:17:29,200 --> 00:17:37,279 by two to get two x one plus two x two is equal to eight subtracting i will get three 130 00:17:37,279 --> 00:17:44,620 x one is equal to two x one is equal to two by three i will get x one is equal to two 131 00:17:44,620 --> 00:17:51,309 by three which is shown here now when i substitute x one is equal to two 132 00:17:51,309 --> 00:17:57,250 by three in x one plus x two equal to four i will get x two is equal to ten by three 133 00:17:57,250 --> 00:18:04,350 so that x one plus x two is twelve by three which is four now this satisfies the non negativity 134 00:18:04,350 --> 00:18:10,950 restriction and therefore it is feasible it is also a basic because i am solving for two 135 00:18:10,950 --> 00:18:18,450 variables since i have two equations so it is a basic feasible solution now among the 136 00:18:18,450 --> 00:18:22,140 i calculate the value of the objective function for this 137 00:18:22,140 --> 00:18:28,140 so seven x one plus five x two will become seven into two by three fourteen by three 138 00:18:28,140 --> 00:18:34,020 plus five into ten by three fifty by three which will give me sixty four by three which 139 00:18:34,020 --> 00:18:40,960 is equal to twenty one point three three now out of the three solutions which are basic 140 00:18:40,960 --> 00:18:46,779 feasible the one that has the lowest value minimizing the objective function the one 141 00:18:46,779 --> 00:18:52,750 that has the lowest value is optimum it is the best solution so the solution two by three 142 00:18:52,750 --> 00:19:01,159 comma ten by three is optimum to the minimization linear programming problem in the next class 143 00:19:01,159 --> 00:19:07,140 we will see some more aspects of the algebraic method and we will try to relate the algebraic 144 00:19:07,140 --> 00:19:09,409 method to the graphical method