1 00:00:17,990 --> 00:00:27,220 in this class we summarize the graphical and algebraic methods and we relate the two methods 2 00:00:27,220 --> 00:00:43,830 which are popular to solve linear programming problems we started with a maximization problem 3 00:00:43,830 --> 00:00:51,019 and we solved it using the graphical method and then in another class we to a minimization 4 00:00:51,019 --> 00:00:57,530 problem and solved it using the graphical method in the last two classes we have solved 5 00:00:57,530 --> 00:01:04,980 the same two examples one for maximization and one for minimization using the algebraic 6 00:01:04,980 --> 00:01:12,020 method now let us go back to the graphical method and look at what we did and then we 7 00:01:12,020 --> 00:01:17,670 go back to the algebraic method and try to see whether there is a relationship between 8 00:01:17,670 --> 00:01:23,520 what we did in the graphical method and what we did in the algebraic method 9 00:01:23,520 --> 00:01:35,490 now in the graphical method we found out the feasible region and then we explained that 10 00:01:35,490 --> 00:01:43,570 for every point inside the feasible region there is always a boundary point or a corner 11 00:01:43,570 --> 00:01:51,299 point which will give a better solution a better value of the objective function and 12 00:01:51,299 --> 00:01:58,560 then we restricted ourselves to evaluating only the corner point solutions and we found 13 00:01:58,560 --> 00:02:11,630 the optimum solution from the best corner point solution in this example we had these 14 00:02:11,630 --> 00:02:23,300 four corner points zero comma zero we had these four corners points zero comma zero 15 00:02:23,300 --> 00:02:33,110 six comma zero zero comma seven and three comma four which are our four corner points 16 00:02:33,110 --> 00:02:40,470 and we said that the optimum solution is this corner point three comma for which gave us 17 00:02:40,470 --> 00:02:53,390 a value of sixty six gave us a value of sixty six now let us go back to the corresponding 18 00:02:53,390 --> 00:03:08,620 algebraic method and let us see what we did 19 00:03:08,620 --> 00:03:16,080 now this is the table corresponding to the six solutions for the same linear programming 20 00:03:16,080 --> 00:03:24,000 problem which maximize ten x one plus nine x two plus zero x three plus zero x four subject 21 00:03:24,000 --> 00:03:32,180 to these constraints now as i mention with the inclusion of this slack variable there 22 00:03:32,180 --> 00:03:39,810 are four variables out of which we can only solve for two at a time and therefore we had 23 00:03:39,810 --> 00:03:50,240 four c two or six ways of solving these solutions now these six solutions are given here for 24 00:03:50,240 --> 00:04:00,010 the six problem instances and let us look at these solutions only from the point of 25 00:04:00,010 --> 00:04:07,010 view of x one and x two and relate it to x one and x two because the graphical method 26 00:04:07,010 --> 00:04:13,260 we used only x one and x two so the first solution that we have here is 27 00:04:13,260 --> 00:04:20,459 x one equal to zero and x two equal to zero so the first solution that we have here is 28 00:04:20,459 --> 00:04:36,639 x one equal to zero and x two equal to zero because x three and 29 00:04:36,639 --> 00:04:44,620 x four have some values the second solution that we have here is x one equal to six x 30 00:04:44,620 --> 00:04:52,879 two equal zero which is six comma zero the third solution that we have here is x one 31 00:04:52,879 --> 00:05:00,569 equal to seven and x two equal to zero which is a seven comma zero the fourth solution 32 00:05:00,569 --> 00:05:07,150 that we have is x one equal to zero x two equal to eight the fifth solution that we 33 00:05:07,150 --> 00:05:13,610 have is x one equal to zero x two equal to seven and the sixth solution that we have 34 00:05:13,610 --> 00:05:20,250 is x one equal to three and x two equal to four so these are the six solutions that we 35 00:05:20,250 --> 00:05:25,180 have now out of these six solutions we also said 36 00:05:25,180 --> 00:05:33,360 that situations three and four are infeasible now we also have to remember that all the 37 00:05:33,360 --> 00:05:41,029 six solutions are basic solutions which means that the non basic variables which are here 38 00:05:41,029 --> 00:05:49,060 which are x one x two x two x four extra are fixed to zero even though they could have 39 00:05:49,060 --> 00:05:56,810 been fixed to any other value these six solutions have been obtained by fixing the non basic 40 00:05:56,810 --> 00:06:02,900 variables to zero so now let us go back to the graphical method and try to see where 41 00:06:02,900 --> 00:06:10,949 these six solutions lie in the graph that we actually have so let us do that 42 00:06:10,949 --> 00:06:18,729 the first solution is x one equal to zero and x two equal to zero so we denote this 43 00:06:18,729 --> 00:06:25,840 first solution which is x one equal to zero and x two equal to zero as the first solution 44 00:06:25,840 --> 00:06:36,169 that we have the second solution out of the six is x one equal to six and x two equal 45 00:06:36,169 --> 00:06:50,430 to zero so x one equal to six x two equal to zero is our second solution the third solution 46 00:06:50,430 --> 00:06:56,520 is x one equal to seven and x two equal to zero which happened to be infeasible in the 47 00:06:56,520 --> 00:07:11,559 algebraic method so x one equal to seven x two equal to zero is the third solution 48 00:07:11,559 --> 00:07:18,199 which is here and you can observe from the graph that this solution seven comma zero 49 00:07:18,199 --> 00:07:28,889 is not within the feasible region and therefore it is infeasible the fourth solution is x 50 00:07:28,889 --> 00:07:36,000 one equal to zero and x two equal to eight which was also infeasible now we go back and 51 00:07:36,000 --> 00:07:43,499 mark it in the graph and we realize that this point this is the fourth solution so this 52 00:07:43,499 --> 00:07:55,159 is marked as four the fifth solution was x one equal to zero and x two equal to seven 53 00:07:55,159 --> 00:08:02,449 and we mark this as the solution which is here this is the solution x one equal to zero 54 00:08:02,449 --> 00:08:12,479 and x two equal to seven is marked as the fifth solution and the sixth solution is x 55 00:08:12,479 --> 00:08:20,219 one equal to three and x two equal to four which is marked as the sixth solution marked 56 00:08:20,219 --> 00:08:28,360 as the sixth solution now we observe that the six basic solutions 57 00:08:28,360 --> 00:08:38,190 that we obtained in the algebraic method are actually six corner points in the graph and 58 00:08:38,190 --> 00:08:43,669 since two of these corner points the points where these lines intersect two of them are 59 00:08:43,669 --> 00:08:51,250 infeasible these two are now shown as infeasible solutions now when we look at the algebraic 60 00:08:51,250 --> 00:08:58,460 method and when we look at these six solutions we have to leave out the infeasible ones in 61 00:08:58,460 --> 00:09:05,310 this example there are two infeasible solutions we leave out the infeasible solutions we consider 62 00:09:05,310 --> 00:09:12,329 only the basic feasible solutions and we considered only the basic feasible solutions and found 63 00:09:12,329 --> 00:09:20,310 out the best basic feasible solution out of the four now this is exactly the same as we 64 00:09:20,310 --> 00:09:28,320 now realize that the four feasible or four basic feasible solutions are actually the 65 00:09:28,320 --> 00:09:37,560 four corner points which are points one two five and six therefore what we did in the 66 00:09:37,560 --> 00:09:44,089 algebraic method is the same as what we did in the graphical method 67 00:09:44,089 --> 00:09:51,320 now in the graphical method we were restricted to two variables and we were able to clearly 68 00:09:51,320 --> 00:09:58,620 look at the graph and say that these two solutions are infeasible by looking at the graph we 69 00:09:58,620 --> 00:10:05,660 can do that and therefore we did not consider them for evaluating the objective function 70 00:10:05,660 --> 00:10:11,260 we looked only at the corner points and we defined those corner points which are basic 71 00:10:11,260 --> 00:10:18,839 feasible solutions so the first relationship is that the algebraic method evaluates the 72 00:10:18,839 --> 00:10:26,009 intersection points that the graphical method has now out of these six intersection points 73 00:10:26,009 --> 00:10:32,900 that we have two of them are infeasible and four are basic feasible the algebraic method 74 00:10:32,900 --> 00:10:39,790 also evaluates the same six points and declares two of them that are infeasible and the rest 75 00:10:39,790 --> 00:10:45,160 of them are basic feasible the graphical method looks at the four corner 76 00:10:45,160 --> 00:10:52,910 points which happened to be the four basic feasible solutions so every corner point in 77 00:10:52,910 --> 00:11:01,110 the graphical solution corresponds to a basic feasible solution in the algebraic method 78 00:11:01,110 --> 00:11:08,010 so when we say that the graphical method has four corner points and the algebraic method 79 00:11:08,010 --> 00:11:15,380 has four basic feasible solutions it is enough they are one and the same let us now go back 80 00:11:15,380 --> 00:11:20,680 to another aspect in the algebraic method now let us take this particular solution where 81 00:11:20,680 --> 00:11:27,959 we are solving for x one and x two now we are fixing x three and x four to zero and 82 00:11:27,959 --> 00:11:35,089 we are solving now when we are fixing x three and x four to zero then the equations become 83 00:11:35,089 --> 00:11:41,009 three x one plus three x two equal to twenty one and four x one plus three x two equal 84 00:11:41,009 --> 00:11:47,899 to twenty four so x one and x two is the solution of three x one plus three x two equal to twenty 85 00:11:47,899 --> 00:11:55,620 one four x one plus three x two equal to twenty four now that is exactly the solution here 86 00:11:55,620 --> 00:12:00,620 which is between three x one plus three x two equal to twenty one that gives us the 87 00:12:00,620 --> 00:12:06,529 three comma four that is the solution between three x one plus three x two equal to twenty 88 00:12:06,529 --> 00:12:11,170 one and four x one plus three x two equal to twenty four 89 00:12:11,170 --> 00:12:19,259 so fixing the non basic variable to zero gives us the point of intersection of the lines 90 00:12:19,259 --> 00:12:27,149 which is the corner point if we had fixed x three and x four to one say just for the 91 00:12:27,149 --> 00:12:34,029 sake of illustration and not fixed it to zero then we would have solved for three x one 92 00:12:34,029 --> 00:12:40,500 plus three x two equal to twenty and four x one plus three x two equal to twenty three 93 00:12:40,500 --> 00:12:45,420 and we would have got a different solution and we would have got a point inside the feasible 94 00:12:45,420 --> 00:12:56,110 region so fixing the non basic variables to any positive value is equivalent of evaluating 95 00:12:56,110 --> 00:13:05,230 a point inside the feasible region while fixing the non basic variables to zero is equivalent 96 00:13:05,230 --> 00:13:11,839 of evaluating the corner point and from the graphical method we have already learnt that 97 00:13:11,839 --> 00:13:19,170 points inside the feasible region need not be evaluated now this implies that when we 98 00:13:19,170 --> 00:13:26,129 do the algebraic method it is enough to fix the non basic variables only to zero and not 99 00:13:26,129 --> 00:13:33,470 fix them to any other value fixing them to any other value would end up evaluating points 100 00:13:33,470 --> 00:13:41,339 which are inside the feasible region or fixing them to negative values would mean evaluating 101 00:13:41,339 --> 00:13:45,870 infeasible points therefore the understanding and the equivalent 102 00:13:45,870 --> 00:13:52,480 between the graphical and the algebraic method tells us that since corner point solutions 103 00:13:52,480 --> 00:14:00,199 are optimal it is enough to fix the non basic variables to zero in the algebraic method 104 00:14:00,199 --> 00:14:07,600 and not to fix them at any other positive value so now we understand by considering 105 00:14:07,600 --> 00:14:14,379 the same example we understand that the graphical method and the algebraic method essentially 106 00:14:14,379 --> 00:14:20,279 try to do the same thing but the graphical method is simpler because we are used to drawing 107 00:14:20,279 --> 00:14:27,389 graphs and noti[cing]-noticing the corner points but the graphical method has a restriction 108 00:14:27,389 --> 00:14:34,129 that it can be used only upto two variables now when we have a large number of variables 109 00:14:34,129 --> 00:14:42,019 we can use the algebraic method to solve we have illustrated the algebraic method by considering 110 00:14:42,019 --> 00:14:48,360 a two variable problem but we can also illustrate the algebraic method by considering more variables 111 00:14:48,360 --> 00:14:55,540 if the original problem itself had three variables and two constraints then when we add the slack 112 00:14:55,540 --> 00:15:01,220 variables we would have got five variables and then two constraints so we have to solve 113 00:15:01,220 --> 00:15:06,850 for two at a time so we will have five c three possible solutions we'll have more number 114 00:15:06,850 --> 00:15:14,189 of solutions as the number of variables and constraints increase now out of these solutions 115 00:15:14,189 --> 00:15:20,279 we have to evaluate all of them and we have to leave out the infeasible ones and look 116 00:15:20,279 --> 00:15:25,589 only at the basic feasible ones to begin with we have to understand that we 117 00:15:25,589 --> 00:15:33,129 do not have a way to identify that something is going to result in an infeasible solution 118 00:15:33,129 --> 00:15:43,860 so we have to evaluate all the solutions and if we have n variables and m equations we 119 00:15:43,860 --> 00:15:58,279 end up creating n c m solutions in this example n is equal to four there are four variables 120 00:15:58,279 --> 00:16:05,769 m is equal to two there are two constraints four c two is equal to six now if we go back 121 00:16:05,769 --> 00:16:17,699 to 122 00:16:17,699 --> 00:16:24,749 the minimization problem now when we solved the minimization problem we also had six solutions 123 00:16:24,749 --> 00:16:31,060 in the algebraic method and three of these solutions were infeasible while three of these 124 00:16:31,060 --> 00:16:36,600 solutions were basic feasible if we go back and look at the graph corresponding 125 00:16:36,600 --> 00:16:58,949 to the minimization problem 126 00:16:58,949 --> 00:17:05,750 now we realize that these are the three solutions that are feasible four comma zero zero comma 127 00:17:05,750 --> 00:17:12,400 five and two by three comma ten by three these were the solutions that are feasible the other 128 00:17:12,400 --> 00:17:19,400 three solutions that the algebraic method evaluated were here zero comma zero two comma 129 00:17:19,400 --> 00:17:27,350 zero and zero comma four it evaluated and these three became infeasible so out of these 130 00:17:27,350 --> 00:17:35,190 six solutions we looked at only three solutions in this and those three solutions are the 131 00:17:35,190 --> 00:17:49,350 three corner points in the feasible region now in summary we observe that the graphical 132 00:17:49,350 --> 00:17:56,289 method can be used only for a two variable problem the algebraic method can evaluate 133 00:17:56,289 --> 00:18:03,730 a large number of solutions and sometimes evaluates infeasible solutions we observed 134 00:18:03,730 --> 00:18:09,690 that for the maximization problem two out of the six were infeasible for the minimization 135 00:18:09,690 --> 00:18:15,180 problem three out of the six were infeasible so that leads to the next question do we have 136 00:18:15,180 --> 00:18:22,370 a method that evaluates only feasible solutions does not evaluate infeasible solutions do 137 00:18:22,370 --> 00:18:30,120 we have a method that progressively evaluates better solutions and do we have a method that 138 00:18:30,120 --> 00:18:37,390 can stop and tell us that the best solution has been obtained even before evaluating all 139 00:18:37,390 --> 00:18:42,900 possible basic solutions so we end this discussion on graphical and 140 00:18:42,900 --> 00:18:48,630 algebraic with this question that do we have a method that can do these three things the 141 00:18:48,630 --> 00:18:52,249 answer to this question we will see in the next class