In the SectionΒ 2.1, we saw many different type of problems that fall into linear optimization. Many of these problems had a lot of variables and as we will see in this course is it easy to get tens or hundreds of variables.
In this case, we use the techniques from SubsectionΒ 1.1.2 to graph each of the following inequalities. If we write the equation \(x_1 + x_2 = 7\) in intercept form as
which has the intercepts \((6,0)\) and \((0,9)\text{.}\) Returning to the inequalities, the origin is within the feasible side of these lines so we cross out the other (northeast) side.
Figure2.3.5.A graph of the feasible set of the above problem. For each inequality, the side of the line not in the feasible set is crossed out. The set of points left is the feasible set for the inequalities and labelled \(\boldsymbol{F}\text{.}\)
Examining the feasible set in FigureΒ 2.3.5, notice that it is a polygon. The possible solutions to the problem is this set of points. So if weβre trying to find a solution, we limit the possible points to those in the feasible set. But thatβs still a lot!!
One way to try to determine a solution, recall that we are trying to maximize the function \(z = 4x_1 + 5x_2\text{.}\) If we take any point in the feasible set, then increasing in the direction \(\langle 4, 5 \rangle\) will increase the most of any direction.β1β
Recall that if there is a function \(f(x,y)\text{,}\) then the direction of increase in the most is \(\langle \partial f/\partial x, \partial f/\partial y \rangle\) and in the case of a linear function, this is the coefficients of the function.
A plot of the feasible set with the randomly selected point \((2,1)\) and a line going in the direction \(\langle 4, 5 \rangle\) can be seen in the following plot:
Figure2.3.6.A feasible set in the first quadrant together with a line segment with one end in the feasible set pointing in the direction of maximum increase of the objective function.
The maximum that the function \(z=4x_1+5x_2\) within the feasible set reaches on this line would be where the line crosses the boundary (on the open circle). In the example above, repeating this argument, any random point selected, the line segment will be parallel to the one above and the maximum value will be on the north-east boundary of the feasible set.
A similar argument can be made with any point in \(F\text{.}\) If a line segment in the direction \(\langle 4, 5 \rangle\text{,}\) then it can be maximized along the upper right boundary of \(F\text{.}\)
Notice that in this case, since the coefficients of the variables in the objective function are both positive, the optimal function would be along the upper right side of the feasible set. Objective functions with other signs may result in the optimal point along other edges.
Continuing along this rationale, letβs pick a point along the boundary of the feasible set. For example, \((6,1)\text{.}\) This boundary is the line \(x_1+x_2=7\) or if we solve for \(x_2\text{,}\)\(x_2 = 7 - x_1\text{.}\) The objective function along this line is \(z=4x_1 + 5x_2 = 4x_1 + 5(7-x_1) = 35-x_1\text{.}\) The objective function increases as \(x_1\) decreases. This is true up to the point on the boundary a the corner \((3,4)\text{.}\)
If we look at the other boundary side of the feasible set, the function is \(2x_1+3x_2=18\) or solving for \(x_2\text{,}\)\(x_2 = 6-2x_1/3\text{.}\) Substituting this into the objective:
Notice with this argument, we saw that along the two edges that we checked, the objective either increased or decreased along the edge. It might be the case that the objective is constant along the edge. Thus the two vertices of the side would have the same value of the objective.
Using the techniques from SectionΒ 1.1, we put each line from the constraint in intercept form and plot the line, crossing out the false side. The result is the feasible set in FigureΒ 2.3.10.
The relevant vertices are found by finding the intersections of pairs of the boundary lines. These are \((0,55), (35,5), (15,25)\) and \((0, 47.5)\text{.}\)
Subsection2.3.2Solving LOPs β Possible Algorithm
So it seems that finding the optimal point of a linear optimization problem is straight forward. If we find all of the vertices of a feasible set, and evaluate the objective at these points, then we will find the optimal solution.
This would work, however, finding all of the vertices may be tricky, even if we have objectives and constraints of only two variables. With more variables, it is even more complex and many real-world problems may have hundreds or thousands of variables with hundreds or thousands of constraints. This would results in possibly millions of vertices.
We will see in the next chapter a more reasonable solution. This will start with a vertex (or possible vertex), and move to another vertex that increases (for a maximum problem) the objective and continue until the optimal value is reached.
Letβs say that we have an algorithm that walks around vertices. Letβs say that the algorithm is at the point \((7,1)\) and it is noted that the objective at this point is \(z = 2(7) + 5(1) = 19\text{.}\) We also note that if we go the vertex at \((4,4)\text{,}\) then the objective is now \(z = 28\text{,}\) so it has increased. The algorithm now checks if any any adjacent vertices have a larger objective value. At the point \((2,2)\text{,}\) the objective is \(z=14\)therefore you may conclude that the maximum must be 28 at \((4,4)\) because it is larger than at any adjacent vertex.
However, note that at the vertex \((1,8)\text{,}\) the objective is \(z=42\text{,}\) so larger than \(z=14\) and this would in fact be maximum for this problem.
This situation cannot happen because feasible sets from Linear Optimization Problems are convex. As noted in SubsectionΒ 1.1.2, a single linear inequality cuts the \(xy\)-plane into two regions in the plane. As noted in SectionΒ 2.1, Linear Optimization Problems (LOPs) have a set of linear inequalities which lead to the following. In sort, any LOP has a convex feasible set and as we will see in ChapterΒ 3 how this will be exploited.