































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A linear program involves optimization (i.e., maximization or minimization) of a linear function subject ... is analogous with our study of linear algebra.
Typology: Slides
1 / 39
This page cannot be seen from the preview
Don't miss anything!
A linear program involves optimization (i.e., maximization or minimization) of a linear function subject to linear constraints. A linear inequality con- straint on a vector x ∈ <N^ takes the form aT^ x ≤ b or a 1 x 1 + a 2 x 2 +... + aN xN ≤ b for some a ∈ <N^ and b ∈ <. If we have a collection of constraints (a^1 )T^ x ≤ b 1 , (a^2 )T^ x ≤ b 2 ,... , (aM^ )T^ x ≤ bM , we can group them together as a single vector inequality Ax ≤ b where
(a^1 )T .. . (aM^ )T
and^ b^ =
b 1 .. . bM
.
When we write that the vector Ax is less than or equal to b, we mean that each component of Ax is less than or equal to the corresponding component of b. That is, for each i, (Ax)i ≤ bi. Sometimes, in a slight abuse of language, we refer to the ith row Ai∗ of the matrix A as the ith constraint, and bi as the value of the constraint. In mathematical notation, a linear program can be expressed as follows: maximize cT^ x subject to Ax ≤ b.
The maximization is over x ∈ <N^. Each component xj is referred to as a decision variable. The matrix A ∈ <M^ ×N^ and vector b ∈ <M^ specify a set of M inequality constraints, one for each row of A. The ith constraint comes from the ith row and is (Ai∗)T^ x ≤ bi. The vector c ∈ <N^ is a vector of values for each decision variable. Each cj represents the benefit of increasing xj by
minimize cT^ x subject to Ax ≤ b,
47
©cBenjamin Van Roy and Kahn Mason 49
production according to
The metal stamping and engine assembly activities also introduce constraints:
4 x 1 + 2. 86 x 2 ≤ 100 and 3 x 1 + 6x 2 ≤ 100.
The set of vectors x ∈ <^2 that satisfy these constraints is illustrated in Figure 3.1(a).
10 20 30 40
10
20
30
(^40) truck assembly engine assembly
metal stamping
car assembly
feasible solutions
trucks produced (thousands)
cars produced (thousands)
10 20 30 40
10
20
30
40
trucks produced (thousands)
cars produced (thousands)
maximal profit
(a) (b)
Figure 3.1: (a) Feasible solutions for production of cars and trucks. (b) Finding the solution that maximizes profit.
The anticipated profit in thousands of dollars associated with production quantities x 1 and x 2 is 3x 1 + 2. 5 x 2. In Figure 3.1(b), each gray line super- imposed on the set of solutions represents a subset for which the associated profit takes on a particular value. In other words, each line represents solu- tions of the equation 3x 1 + 2. 5 x 2 = α for some value of α. The diagram also identifies the feasible solution that maximizes profit, which is given approx- imately by x 1 = 20.4 and x 2 = 6.5. Note that this solution involves making use of the entire capacity available for metal stamping and engine assembly, but does not maximize use of capacity to assemble either cars or trucks. The optimal profit is over $77.3 million per month, which exceeds by about $ million the profit associated with producing only cars.
Suppose that two basic types of food are supplied to soldiers in an army: meats and potatoes. Each pound of meats costs $1, while each pound of potatoes costs $0.25. To minimize expenses, army officials consider serving only potatoes. However, there are some basic nutritional requirements that call for meats in a soldier’s diet. In particular, each soldier should get at least 400 grams of carbohydrates, 40 grams of dietary fiber, and 200 grams of protein in their daily diet. Nutrients offered per pound of each of the two types of food, as well as the daily requirements, are provided in the following table: Nutrient Meats Potatoes Daily Requirement carbohydrates 40 grams 200 grams 400 grams dietary fiber 5 grams 40 grams 40 grams protein 100 grams 20 grams 200 grams Consider the problem of finding a minimal cost diet comprised of meats and potatoes that satisfies the nutritional requirements. Let x 1 and x 2 denote the number of pounds of meat and potatoes to be consumed daily. These quantities cannot be negative, so we have a constraint x ≥ 0. The nutritional requirements impose further constraints:
40 x 1 + 200 x 2 ≥ 400 (carbohydrates) 5 x 1 + 40 x 2 ≥ 40 (dietary fiber) 100 x 1 + 20 x 2 ≥ 200 (protein).
The set of feasible solutions is illustrated in Figure 3.2(a). In Figure 3.2(b), superimposed lines identify sets that lead to particular daily costs. Unlike the automobile manufacturing problem we considered in the previous section, we are now minimizing cost rather than maximizing profit. The optimal solution involves a diet that includes both meats and potatoes, and is given approximately by x 1 = 1.67 and x 2 = 1.67. The asso- ciated daily cost per soldier is about $2.08. Note that the constraint brought about by dietary fiber requirements does not affect the feasible region. This is because – based on our data – any serving of potatoes that offers sufficient carbohydrates will also offer sufficient dietary fibers.
There are some interesting observations that one can make from the preceding examples and generalize to more complex linear programs. In each case, the set of feasible solutions forms a polygon. By this we mean that the boundary of each is made up of a finite number of straight segments, forming corners
The set of vectors x ∈ <N^ that satisfies constraints of the form Ax ≤ b is called a polyhedron. In three dimensions, the boundaries of the set are formed by “flat faces.” In two dimensions, the boundaries are formed by line segments, and a polyhedron is a polygon. Note that the feasible region of a linear program is a polyhedron. Hence, a linear program involves optimization of a linear objective function over a polyhedral feasible region. One way to view a polyhedron is as the intersec- tion of a collection of half-spaces. A half-space is a set of points that satisfy a single inequality constraint. Hence, each constraint (Ai∗)T^ x ≤ bi defines a half-space, and the polyhedron characterized by Ax ≤ b is the intersection of M such half-spaces. As an example, consider the problem of producing cars and trucks de- scribed in Section 3.1.1. Each constraint restricts feasible solutions to the half-space on one side of a line. For instance, the constraint that the number of cars produced must be nonnegative restricts the feasible region to vectors in the half-space on the right side of the horizontal axis in Figure 3.1(a). Note that, though this constraint was represented with a greater-than sign (x 1 ≥ 0), it can also be represented with a less-than sign (−x 1 ≤ 0) to be consistent with the form of Ax ≤ b. The constraint introduced by the ca- pacity to assemble engines also restricts solutions to a half-space – the set of points below a diagonal line. The intersection of half-spaces associated with the six constraints produces the polyhedron of feasible solutions. In this section, we develop some understanding of the structure of poly- hedra. We will later build on these ideas to establish useful properties of optimal solutions.
Given two vectors x and y in <N^ , a vector z ∈ <N^ is said to be a convex combination of x and y if there exists a scalar α ∈ [0, 1] such that z = αx + (1 − α)y. Intuitively, a convex combination of two vectors is in between the vectors, meaning it lies directly on the line segment joining the two vectors. In fact, the line segment connecting two vectors is the set of all convex combinations of the two vectors. We generalize this to more than two vectors by saying y is a convex combination of x^1 , x^2 ,... , xM^ if there are some α 1 , α 2 ,... , αM ≥ 0 such that y = α 1 x^1 + α 2 x^2 +... + αM xM^ and α 1 + α 2 +... + αM = 1.
©cBenjamin Van Roy and Kahn Mason 53
A set U ⊆ <N^ is said to be convex if any convex combination of any two elements of U is in U. In other words, if we take two arbitrary points in U , the line segment connecting those points should stay inside U. Figure 3. illustrates three subsets of <^2. The first is convex. The others are not.
(a) (b) (c)
Figure 3.3: (a) A convex set in <^2. (b and c) Nonconvex sets in <^2 – in each case, a segment connecting points in the set includes points outside the set.
Given a set of vectors x^1 ,... , xK^ ∈ <N^ , their convex hull is the smallest convex set containing x^1 ,... , xK^ ∈ <N^. Because any intersection of convex sets is convex, there is no ambiguity in this definition. In particular, the convex hull can be thought of as the intersection of all convex sets containing x^1 ,... , xK^ ∈ <N^. Convex sets are very important in many areas of optimization, and linear programming is no exception. In particular, polyhedra are convex. To see why this is so, consider a polyhedron U = {x ∈ <N^ |Ax ≤ b}. If z = αx + (1 − α)y for some α ∈ [0, 1] and x, y ∈ U then
Az = A(αx + (1 − α)y) = αAx + (1 − α)Ay ≤ αb + (1 − α)b = b
so that z is an element of U.
Let U ⊆ <N^ be a polyhedron. We say x ∈ U is a vertex of U if x is not a convex combination of two other points in U. Vertices are what we think of as “corners.” Suppose U = {x ∈ <N^ |Ax ≤ b} is the feasible region for a linear program and that y ∈ U. If (Ai∗)T^ y = bi then we say the ith constraint is binding or active at y. If we think of a polyhedron as a collection of half spaces, then for a constraint to be active, the point in question lies on the hyperplane forming the border of the half space. In three dimensions, it must lie on the face associated with the constraint, and in two dimensions, it must lie on the edge associated with the constraint. If a collection of constraints
©cBenjamin Van Roy and Kahn Mason 55
Conversely, suppose x is not a basic feasible solution. We let C be the matrix of all the active constraints at x. Because C has less than N linearly independent rows, it has a non-empty null space. Let d be a non zero vector in N (C). Then for small , we have that x ± d is still feasible (C(x ± d) = Cx = c and for small , non-active constraints will still be non-active). But x = 12 (x + d) + 12 (x − d), so that x is a convex combination of two other vectors in U. So, x is not a vertex. If the feasible region of a linear program is {x ∈ <N^ |Ax ≤ b} then any N linearly independent active constraints identify a unique basic solution x ∈ <N^. To see why, consider a square matrix B ∈ <N^ ×N^ whose rows are N linearly independent active constraints. Any vector x ∈ <N^ for which these constraints are active must satisfy Bx = b. Since its rows of B are linearly independent, B has full rank and therefore a unique inverse B−^1. Hence, B−^1 b is the unique point at which the N constraints are active. Let us capture the concept in a theorem.
Theorem 3.2.2. Given a polyhedron {x ∈ <N^ |Ax ≤ b} for some A ∈ <M^ ×N and b ∈ <M^ , any set of N linearly independent active constraints identifies a unique basic solution.
Each basic solution corresponds to N selected constraints. There are M constraints to choose from and only finitely many ways to choose N from M. This implies the following theorem.
Theorem 3.2.3. There are a finite number of basic solutions and a finite number of basic feasible solutions.
Note that not every combination of N constraints corresponds to a basic solution. The constraints are required to be linearly independent.
A polyhedron U ⊆ <N^ is said to be bounded if there is a scalar α such that, for each x ∈ U and each j, −α ≤ xj ≤ α. In other words, each component of a vector in U is restricted to a bounded interval, or U is contained in a “hyper-cube.” The following theorem presents an alternative way to represent bounded polyhedra.
Theorem 3.2.4. If U is a bounded polyhedron, it is the convex hull of its vertices.
Proof: Let U = {x ∈ <N^ |Ax ≤ b}, and let H be the convex hull of the vertices of U. Each vertex of U is in U and U is convex. Hence, H ⊆ U.
We now have to show U ⊆ H. We will do this by showing that any x ∈ U is a convex combination of the vertices of U , and hence is in H. We will do this by backwards induction on the number of linearly independent active constraints at x. If the number of linearly independent active constraints is N , then x is a basic feasible solution, and so a vertex. A vertex is a convex combination of itself, and hence is in U. Thus all points with N linearly independent active constraints are in H. Suppose all points with K + 1 or more linearly independent active con- straints are in H, and that x has K linearly independent active constraints. Let C be a matrix whose rows are the active constraints at x, and let c be the vector whose components are the corresponding constraint values. Because C has rank K < N , we know that its null space is non-empty. Take any non-zero vector n ∈ N (C) and consider the line x + αn for different α. For small α, the points on the line are inside U , but because U is bounded, for sufficiently large positive and negative values of α, the points on the line will not be in U. Take the most positive and negative values of α such that x+αn is in U , and let the corresponding points be y and z. Note Cy = c = Cz so that all the constraints active for x are still active for y and z. However each one of them much also have an additional active constraint because n is in the null space of C and so changing α will not change C(x + αn). Thus each of y and z must have at least K +1 linearly independent active constraints. x lies on the line segment connecting y and z and so is a convex combination of them. By the inductive hypothesis, each of y and z are convex combinations of vertices, and hence so is x. Hence all points with K linearly independent active constraints are in H. By induction, each x ∈ U is also in H, so U ⊆ H.
Consider the linear program
maximize cT^ x subject to Ax ≤ b.
If x^1 , x^2 ,... , xK^ are the vertices of the feasible region, we say that xk^ is an optimal basic feasible solution if cT^ xk^ ≥ cT^ x^ for every
. That is xk^ is the vertex with the largest objective value among vertices. Note that the optimal basic feasible solution need not be unique. An optimal solution is a feasible solution x such that cT^ x ≥ cT^ y for every other feasible solution y. As discussed in Section 3.1, in two dimen-
of linearly independent active constraints. Let the number of linearly inde- pendent active constraints be K. If K = N then x is a vertex, and we are done. Suppose that K < N , the consider the line L = {x + αd|α ∈ <} for some d that is perpendicular to the constraints active at x. d must exist because the matrix whose rows are the constraints active at x is not full rank, and hence has a non-zero null space. All the points in L satisfy the K constraints at x. Because L cannot be contained in U , there must be some α for which an additional constraint is active. The point x + αd has K + 1 linearly independent active constraints contradicting the fact that K was the maximum attainable. Proof of theorem: Note that the fact that the linear program has a basic solution means that is can contain no lines. Let x be an optimal solution with the largest number of linearly independent active constraints, and the number of linearly independent active constraints at x be K. If K = N then x is a vertex satisfying the conclusion of the theorem. Suppose K < N , then take d orthogonal to the constraints active at x. The same reasoning as given in Theorem ?? shows that all points of the form x + αd have all the same constraints active as x, and also that for some α∗, an additional constraint is satisfied. But, for sufficiently small α, x ± αd is still feasible. Because cT^ (x + αd) = cT^ x + αcT^ d can be no larger than cT^ x, we have that cT^ d = 0 and that cT^ (x + αd) = cT^ x for all α. But this means x + α∗d is an optimal solution with more than K linearly independent active constraints, contradicting the maximality of K.
For any linear program, there are a finite number of basic feasible solutions, and one of them is optimal if the linear program has an optimum. This mo- tivates a procedure for solving linear programs: enumerate all basic feasible solutions and select the one with the largest objective value. Unfortunately, such a procedure is not effective for large problems that arise in practice be- cause there are usually far too many basic feasible solutions. As mentioned earlier, the number of basic solutions is the number of ways of choosing N linearly independent constraints from the entire collection of M constraints. There are M !/(N !(M −N )!) choices. This is an enormous number – if N = 20 and M = 100, the number of choices M !/(N !(M − N )!) exceeds half a billion trillion. Though many of these choices will not be linearly independent or feasible, the number of them that are basic feasible solutions is usually still enormous.
©cBenjamin Van Roy and Kahn Mason 59
In Chapter ??, we will study the simplex method, which is a popular linear programming algorithm that searches through basic feasible solutions for an optimal one. It does not enumerate all possibilities but instead intelli- gently traverses a sequence of improving basic feasible solutions in a way that arrives quickly at an optimum. We will also study interior point methods, another very efficient approach that employs a different strategy. Instead of considering basic feasible solutions, interior point methods generate a se- quence of improving solutions in the interior of the feasible region, converging on an optimum.
We have focused until now on less-than constraints, each taking the form aT^ x ≤ b for some a ∈ <N^ and b ∈ <. Two other forms of constraints com- monly used to describe polyhedra are greater-than and equality constraints. Greater-than constraints take the form aT^ x ≥ b, while equality constraints take the form aT^ x = b. Both greater-than and equality constraints can be replaced by equivalent less-than constraints. A greater than constraint aT^ x ≥ b is equivalent to (−a)T^ x ≤ −b, whereas an equality constraint aT^ x = b is equivalent to a pair of less-than constraints: aT^ x ≤ b and (−a)T^ x ≥ −b. Hence, any set of constraints that includes less-than, greater-than, and equality constraints is equivalent to a set of less-than constraints and therefore represents a poly- hedron. In matrix notation, we can define a polyhedron involving all types of constraints by
S = {x ∈ <N^ |A^1 x ≤ b, A^2 x ≥ b^2 , A^3 x = b^3 }.
This is the same polyhedron as one characterized by Ax ≤ b, where
and b =
b^1 −b^2 b^3 −b^3
.
The vertices of a polyhedron do not change if we change the way it is represented. This is because the notion of a vertex is geometric; that is, it only depends on which vectors are inside or outside the set. Our definition of basic feasible solutions, on the other hand, does rely on the algebraic representation. In particular, our definition determines whether a solution is
©cBenjamin Van Roy and Kahn Mason 61
Since A^3 x = b^3 , all rows of A associated with A^3 and −A^3 correspond to active constraints. Only 2N 3 of these correspond to equality constraints in I, and among these 2N 3 constraints, only only N 3 of them can be linearly in- dependent (since each row of −A 3 is linearly dependent on the corresponding row of A 3 ).
Another N 1 + N 2 constraints in I lead to linearly independent active constraints in rows of A associated with A^1 and −A^2. This makes for a total of N linearly independent constraints. Therefore, any basic feasible solution of A^1 x ≤ b^1 , A^2 x ≥ b^2 , A^3 x = b^3 is also a basic feasible solution of Ax = b and therefore a vertex of S. The converse – that a basic feasible solution of Ax = b is a basic feasible solution of A^1 x ≤ b^1 , A^2 x ≥ b^2 , A^3 x = b^3 – can be shown by reversing preceding steps. It follows that basic feasible solutions of A^1 x ≤ b^1 , A^2 x ≥ b^2 , A^3 x = b^3 are equivalent to vertices of S.
We now shift gears to explore a few of the many application domains of linear programming. A prime application of linear programming is to the allocation of limited resources among production activities that can be carried out at a firm. In this context, linear programming is used to determine the degree to which the firm should carry out each activity, in the face of resource constraints. In this section, we discuss several types of production problems that can be modeled and solved as linear programs.
In a single stage production problem, there is stock in M types of resources and N activities, each of which transforms resources into a type of product. The available stock in each ith resource is denoted by bi, which is a compo- nent of a vector b ∈ <M^. The level to which activity j is carried out is a decision variable xj , which a component of a vector x ∈ <N^. This quantity xj represents the number of units of product type j generated by the activity.
In producing each unit of product j, Aij units of each ith resource are consumed. This gives us a matrix A ∈ <M^ ×N^. The activity levels are con- strained to be nonnegative (xj ≥ 0), and in aggregate, they cannot consume more resources than available (Ax ≤ b). Each unit of product j generates a profit of cj , which is a component of a vector c ∈ <N^. The objective is to
maximize profit. This gives rise to a linear program:
maximize cT^ x subject to Ax ≤ b x ≥ 0.
Let us revisit the petroleum production problem of Chapter 1, which is an example of a single-stage production problem.
Example 3.5.1. Crude petroleum extracted from a well contains a complex mixture of component hydrocarbons, each with a different boiling point. A refinery separates these component hydrocarbons using a distillation column. The resulting components are then used to manufacture consumer products such as low, medium, and high octane gasoline, diesel fuel, aviation fuel, and heating oil. Suppose we are managing a company that manufactures N petroleum products and have to decide on the number of liters xj , j ∈ { 1 ,... , n} of each product to manufacture next month. We have M types of resources in the form of component hydrocarbons. A vector b ∈ <M^ represents the quantity in liters of each ith resource to be available to us next month. Each petroleum product is manufactured through a separate activity. The jth activity con- sumes Aij liters of the ith resource per unit of the jth product manufactured. Our objective is to maximize next month’s profit. Each jth product gar- ners cj dollars per liter. Hence, the activity levels that maximize profit solve the following linear program:
maximize cT^ x subject to Ax ≤ b x ≥ 0.
There are typically many possible activities that can be carried out to produce a wide variety of products. In this event, the number of activities N may far exceed the number M of resource types. Is it advantageous to carry out so many activities in parallel? Remarkably, the following theorem establishes that it is not:
Theorem 3.5.1. If a single-stage production problem with M resource types and N activities has an optimal solution, then there is an optimal solution that involves use of no more than M activities.
This result follows from Theorem 3.3.2, as we will now explain. Consider a basic feasible solution x ∈ <N^. At x, there must be N linearly independent binding constraints. Up to M of these constraints can be associated with
Note that the capacity constraints play a role entirely analogous to the con- straints imposed by limitations in stock of component hydrocarbons. The ca- pacity at each factory is just a resource that leads to an additional constraint.
Manufacturing of sophisticated products typically entails multiple stages of production activity. For example, in manufacturing a computer, chips are fabricated, then they are connected on a printed circuit board, and finally, printed circuit boards, casing, and other components are assembled to cre- ate a finished product. In such a process, not all activities deliver finished products. Some activities generate materials that serve as resources for other activities. Multi-stage production activities of this sort can still be formu- lated as linear programs. Let us illustrate this with an example.
Example 3.5.3. Consider a computer manufacturer with two CPU chip fab- rication facilities and one computer assembly plant. Components such as key- boards, monitors, casing, mice, disk drives, and other chips such as SRAM and DRAM are purchased from other companies. There are three grades of CPU chips manufactured by the company, and they are used to produce three models of computers. Fabrication facility 1 can produce chips of grades 1 and 2, while fabrication facility 2 can produce chips of grade 2 and 3. Com- pleted chips are transported to the assembly plant where they are combined with other components to produce finished products. The only relevant con- straints on manufacturing are capacities of the two fabrication facilities and the manufacturing plant. Consider the decision of how to allocate resources and conduct manufac- turing activities over the next month of operation. To formulate the problem as a linear program, we introduce the following decision variables:
x 1 quantity of model 1 produced x 2 quantity of model 2 produced x 3 quantity of model 3 produced x 4 quantity of grade 1 chip produced at factory 1 x 5 quantity of grade 2 chip produced at factory 1 x 6 quantity of grade 2 chip produced at factory 2 x 7 quantity of grade 3 chip produced at factory 2
There are 6 types of resources to consider: (1) capacity at fabrication facility 1; (2) capacity at fabrication facility 2;
©cBenjamin Van Roy and Kahn Mason 65
(3) capacity at the assembly plant; (4) grade 1 chips; (5) grade 2 chips; (6) grade 3 chips. Let the quantities available next month be denoted by a vector b ∈ <^6. For each jth activity and ith resource, let Aij denote the amount of the ith resource consumed or produced per unit of activity j. If Aij > 0 , this represents an amount consumed. If Aij < 0 , this represents an amount produced. Consider, as an example, the constraint associated with capacity at the assembly plant:
A 31 x 1 + A 32 x 2 + A 33 x 3 + A 34 x 4 + A 35 x 5 + A 36 x 6 + A 37 x 7 ≤ b 3.
The coefficients A 34 , A 35 , A 36 , and A 37 are all equal to zero, since capacity at the assembly plant is not used in manufacturing chips. On the other hand, producing the three models of computers does require assembly, so A 31 , A 32 , and A 33 are positive. Let us now consider, as a second example, the constraint associated with stock in grade 2 chips, which is an endogenously produced resource:
A 51 x 1 + A 52 x 2 + A 53 x 3 + A 54 x 4 + A 55 x 5 + A 56 x 6 + A 57 x 7 ≤ b 5.
The coefficients A 51 , A 52 , and A 53 are zero or positive, depending on how many grade 2 chips are used in manufacturing units of each model. The coefficients A 54 and A 57 are zero, because manufacturing of grade 1 and grade 3 chips does not affect our stock in grade 2 chips. Finally, A 55 = − 1 and A 56 = − 1 , because each unit of activities 5 and 6 involves production of one grade 2 chip. The value of b 5 represents the number of chips available in the absence of any manufacturing. These could be chips acquired from an exogenous source or left over from the previous month. If b 5 = 0, all chips used to produce computers next month must be manufactured during the month. The profit per unit associated with each of the three models is given by a vector c ∈ <^7 , for which only the first three components are nonzero. With an objective of maximizing profit, we have a linear program:
maximize cT^ x subject to Ax ≤ b x ≥ 0.
Note that the basic difference between linear programs arising from multi- stage – as opposed to single-stage – production problems is that elements of