LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING...

49
LINEAR PROGRAMMING Notes prepared for: MATH 2602 Linear and Discrete Mathematics Fall 2000 1

Transcript of LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING...

Page 1: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

LINEAR PROGRAMMING

Notes prepared for:

MATH 2602 Linear and Discrete

Mathematics

Fall 2000

1

Page 2: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

Table of Contents

1. Background 12. Introduction to Linear Programming 2

2.1 Basic Forms 22.2 Modeling 4

3. Solving Linear Programs 73.1 Geometry and Basic Notions 8

3.1.1 The Feasible Region of Linear Programs 103.1.2 Extreme Points 123.1.3 Basic Solutions 13

3.2 The Simplex Algorithm 184. Generalizations 25

4.1 Artificial Variables 254.1.1 Big-M 274.1.2 Two-Phase Method 29

4.2 Empty Solution Space 324.3 Alternative Optima 344.4 Unbounded Solution Spaces 364.5 Degeneracy 37

5. Final Comments 416. Exercises 437. References 49

2

Page 3: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

LINEAR PROGRAMMING

1 Background

In this document, we will look at a class of optimization problems that arequite well-solved in the sense that especially powerful mathematical and com-putational machinery exists for dealing with them. Before we begin, however,let us examine what we mean by a mathematical optimization problem in gen-eral. We can state this in the following way:

For a given function z(x1, x2, . . . , xn) find values for the variables x1, x2, . . . , xnsuch that z is maximized (minimized) and where the determined values sat-isfy all of a given (possibly empty) set of constraints.2

Put more formally we have:

P : max(min) z(x1, x2, . . . , xn)

subject to: gi(x1, x2, . . . , xn) ≤ bi, for i = 1, 2, . . . ,m.

In P , the function z is referred to as the objective function and the con-straints are given by the functions gi. An example is given below:

min z = (x1 − x22)3 + x1x2x3 + x

323

s.t. x1x2x3 ≤ 10

x1 + x22 + x3

2≤ 12.

Another example might require integrality restrictions on some or all ofthe variables:

1

Page 4: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

max z = x31 + x2x3x4 + x2

2 − x3(x2 − x4)2

s.t. x1 + x2 + x3 + x4 = 7

x1, x3 ≥ 0 and x2, x4 nonnegative integers.

Of course, these are just randomly generated mathematical expressionsthat demonstrate the complexion of an optimization formulation. For any ofthis to have practical relevance, the idea would obviously be to examine somerealistic setting and from same, build or create its mathematical representa-tion. This is rather like what is done in your first algebra class with thosedreaded “story problems.” The entire exercise of creating and solving thesemathematical models of real-world settings is, by and large, what constitutesthe field of operations research.

2 Introduction to Linear Programming

2.1 Basic Forms

If all of the functions in our problem are linear and if all of the variables arecontinuous, we have a linear programming (LP) problem. Stating this in aformal way produces the following model. Note that for simplicity, we willadopt only the “maximize” format:

PC : max z = c1x1 + c2x2 + . . .+ cnxn

s.t. a11x1 + a12x2 + . . .+ a1nxn ≤ b1

a21x1 + a22x2 + . . .+ a2nxn ≤ b2

...

am1x1 + am2 + . . .+ amnxn ≤ bm

x1, x2, . . . , xn ≥ 0.

2

Page 5: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

The last, nonnegativity constraints require that all variables take on valuesno less than 0; the cj , aij, and bj parameters are problem coefficients. Of-ten the bj values are called the right-hand-sides of the formulation. Notealso that the model indicated by PC is referred to as canonical form, i.e.,objective function of “maximize” form, less-than-or-equal inequalities, andnonnegativity restrictions on all of the variables. Readers may want to taketime to convince themselves that every linear program can be expressed incanonical form.

Often, it is convenient to consider an LP problem in compact form. ForPC , we can write:

max z = cx

s.t. Ax ≤ b

x ≥ 0

Here, c is a 1 × n vector (c1, c2, . . . , cn); A is an m × n matrix (aij) where1 ≤ i ≤ m and 1 ≤ j ≤ n; b is an m × 1 vector of right-hand-side values;and of course, x is an n× 1 vector of the variables, (x1, x2, . . . , xn).

Now, an alternative way to express LP’s, and one that we will employextensively in this treatise, is in standard form:

PS : max (min) z = cx

s.t. Ax = b

x ≥ 0.

Required now are: (i) equality constraints, (ii) nonegative right-hand-sidevalues, and (iii) nonnegativity restrictions on all variables.

Conversions between canonical and standard forms are easy. For exam-ple, a constraint of the form ax ≤ b can be converted to an equality bysimply adding a nonnegative slack variable s in order to produce ax+ s = b.Alternately, an equation of the form ax = b can obviously be replaced by apair of inequalities given by ax ≤ b and ax ≥ b. If variables xj in a “real”problem are allowed to be unrestricted or free (i.e., not required to be noneg-

3

Page 6: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

ative), then we can replace xj everywhere by the difference between two newvariables x′j and x

′′

j where the latter are required to be nonnegative. A usefulexercise is to work through a few conversions between these two forms.

2.2 Modeling

As indicated earlier, the basic trick in operations research is to grapple witha physical problem setting or system description and create ultimately, aformulation or mathematical model that captures the requirements of thereal setting. Especially helpful, is to create a model that qualifies as a linearprogram for as we will see subsequently, this constitutes a major step in thedirection of ultimately solving the problem. Following, we go through someeasy illustrations of the model-building activity.

Example 1: An oil refinery can buy two types of oil: light crude and heavycrude. The cost per barrel is 11 and 9 dollars respectively. The portion ofgasoline, kerosene, and jet fuel produced per barrel of each type of crude isgiven below:

Gasoline Kerosene Jet Fuel

Light 0.40 0.20 0.35Heavy 0.32 0.40 0.20

Observe that the proportions do not add to 1.00 because there is some loss inthe refining process itself, i.e., 5 % in the case of light crude oil and 8 % forheavy. Now, the refinery must deliver 1,000,000 barrels of gasoline, 400,000barrels of kerosene, and 250,000 barrels of jet fuel. How can they meet thisproduction requirement at least total cost?

Solution: Our approach begins with a specification of the decision variables(unknowns) for the problem. Accordingly, let us define xL to be the numberof barrels of light crude to purchase and let xH to be the relevant numberof barrels of heavy crude. Obviously, for any assignment of values to xL andxH , our total cost is z = 11xL + 9xH . Now, what are the constraints thatwe have to be mindful of relative to fixing values for the variables? Obvi-ously, we have to produce certain minimum amounts of gasoline, kerosene,

4

Page 7: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

and jet fuel and we know how much of each, relatively speaking, we canextract from each type of crude through the refining process. For example,if we consider the production of gasoline, then we know that whatever ouramount of light and heavy crude oil, the amount of gasoline possible uponrefinement will be 0.4xL + 0.32xH and this total must be at least 1,000,000barrels, i.e., 0.4xL + 0.32xH ≥ 1, 000, 000. The other constraints (relative tokerosene and jet fuel) are handled in the same fashion. Finally, it makes nosense to purchase a negative amount of crude oil which suggests nonnegativ-ity restrictions on the variables and we are thus led to an LP model of thestated problem:

min z = 11xL + 9xH

s.t. 0.40xL + 0.32xH ≥ 1, 000, 000

0.20xL + 0.40xH ≥ 400, 000

0.35xL + 0.20xH ≥ 250, 000

xL, xH ≥ 0.

2

Example 2: A company in South America processes beans into coffee at itsm different production facilities. The coffee is then shipped to n warehousesfor retail distribution and exportation. A unit shipping cost (i.e., cost perton) from plant i to warehouse j is specified by cij . The production capacityat plant i is ai and the demand called for at warehouse j is denoted by bj .What is the least total cost production-shipping strategy for the company inorder that production capacity not be exceeded while satisfying the demandsat all of the warehouses?

Solution: This is an example of what is commonly known as a transporta-tion problem. Let xij be a decision variable denoting the amount of coffeeshipped from plant i to warehouse j. Now, for a given i, the total amountshipped from the relevant plant cannot exceed the plant’s capacity given byai. Similarly, the total amount demanded at a warehouse j, shipped from

5

Page 8: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

any source, needs to be at least bj . Finally, the total cost of a shipping de-cision xij is obviously cijxij . Combining all of this produces the followingformulation:

min z = c11x11 + c12x12 + . . .+ cmnxmn

s.t x11 + x12 + . . .+ x1n ≤ a1

x21 + x22 + . . .+ x2n ≤ a2

...xm1 + xm2 + . . .+ xmn ≤ am

x11 + x21 + . . .+ xm1 ≥ b1

x12 + x22 + . . .+ xm2 ≥ b2

...x1n + x2n + . . .+ xmn ≥ bn

xij ≥ 0 for all i and j.

2

Example 3: Find the largest integer in the list a1, a2, . . . , an.

Solution: This is not an interesting example in any practical sense; clearly,there are better ways to sort through a list of values and select the largest(or smallest). Rather, we employ the illustration simply to exhibit th themodeling exercise even in somewhat nonstandard contexts. In this regard,let z be a largest integer value. Then it should be clear that solving thefollowing LP formulation will produce the value of the largest integer in ourlist:

6

Page 9: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

min z

s.t. z ≥ a1

z ≥ a2...

z ≥ an.

2

In fact, there is little “science” involved in modeling optimization prob-lems, including linear programming formulations; there are no algorithmsthat specify a precise step-by-step receipt. That said, one usually gainsmuch from experience; very often apparently diverse problem settings in thereal world can be modeled correctly by exploiting similar tricks that haveproven successful in other recognizable settings. Indeed, effective modelingis a bit of an art. Still, a reasonable general tactic to pursue when beginning,is to reflect on what the problem is asking. In doing this, one usually is ableto specify the variables in the problem. Next, ask what it is in the problemthat restricts or constrains values that are assignable to the variables. Inprogressing through this exercise, one is often very close to being able toquantify the functional contraints in the formulation. To reiterate, there isno magic key to formulating what can be very complicated story problemsbut by progressing deliberately through the execise indicated, beginning stu-dents are often surprised at how close they can get to creating complete andvalid formulations.

3 Solving Linear Programs

The basic notions that provide the underpinning for the actual solution oflinear programs is not so complicated to appreciate. To be sure, there aresome details that require arguments that are, in fact, quite delicate and someof the proofs that are needed to assure correctness are hard; however,thefundamental machinery that makes linear programs among the most well-solved of optimization problems is fairly easy to understand. In fact, we canmotivate a great deal by simple geometric means.

7

Page 10: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

3.1 Geometry and Basic Notions

Let us consider a simple LP instance:

max z = 3x1 + 2x2

s.t. 2x1 + 3x2 ≤ 6 (1)

4x1 + 2x2 ≤ 8 (2)

x1, x2 ≥ 0. (3), (4)

Note that we have numbered the constraints for purposes of subsequent ref-erence. Now, since our problem possesses only two variables, we are affordedthe luxury of creating a graphical depiction. To this end, consider Figure1. Obviously, the nonnegativity constraints ((3) and (4)) require that oursearch be restricted to the first orthant of the 2-dimensional space indicated.Similarly, we can plot the other two constraints given by inequalities (1) and(2) as shown. Obviously, if there is any nonempty space contained in the in-tersection of the half-spaces described by these four inequalities then we haveat least one feasible solution for our problem. This solution set is referredto as the feasible region; in Figure 1, it it is indicated by the shaded area.The good news is that for the example used, we have a nonempty feasiblesolution set. The bad news is that there are infinitely many feasible solutionspresent; how then do we locate an optimal one?

Here’s an idea. Suppose we examine the objective function: z = 3x1+2x2.This is just a line with slope - 3

2and intercept z

2. Now, for some fixed value

of z, there are in infinite number of possibilities for x1 and x2, i.e., everypoint on the line. So if we vary values for z, this has the effect, graphicallyspeaking, of simply moving the line parallel to itself. Decreasing the value forz moves the line towards the origin; larger values move it away. Since largevalues for z are good (we are maximizing), we would want z to be as large aspossible so long as there were values for x1 and x2 that remained feasible, i.e.,that intersected with the feasible region. But this means that we need onlyshift (through the setting for z) the objective function line in the directionof the gradient 5z = (3, 2), continuing until we reach the edge of the feasibleregion. Since we have assumed all functions to be linear, there will be no

8

Page 11: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

“surprises” in proclaiming the last point or points that are touched to beoptimal. In Figure 1, this movement is indicated by the dotted lines andaccordingly, the last “point of contact” with the feasible region is the singlepoint c corresponding to the values x1 = 3

2and x2 = 1. We thus claim this is

the unique optimal solution; its value is z = 6.5. It is perhaps instructive toexhibit the 3-dimensional representation of this sample problem by includingthe axis corresponding to z. This is shown in Figure 2.

Now, our claim is that the simple approach made graphical by this ele-mentary illustration, is enough, i.e., that it is extendable to the solution ofgeneral linear programs. That is, we will simply pass the objective functionplane (i.e., hyperplane in arbitrary dimensions) through the feasible regiongenerated by the problem constraints, and observe the last admissible point(or points) that intersect(s) with the plane accordingly. Of course, this is notsomething that can be done graphically but if we can make the process alge-braic then we might (if our claim is true) be close to producing an algorithmfor solving LPs.

9

Page 12: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

3.1.1 The Feasible Region of Linear Programs

Consider the LP in standard form again; in fact, let us state it in the follow-ing, rather formal way:

max(min) {cx | x ∈ S}

where S = {x | Ax = b,x ≥ 0}. Now, let us examine the structure of thecontraint set. In general, a set C is convex if given any two points in C sayx1 and x2, then any point x3 = λx1 + (1 − λ)x2 is also in C where λ is ascaler bounded by 0 and 1, i.e., 0 ≤ λ ≤ 1. Sometimes we say that x3 isexpressed as a linear combination of x1 and x2. Some convex and nonconvexsets are displayed in Figure 3.

Now, we claim that the set S formed as per the standard form above isa convex set (which is an important property if true). But it turns out thatthis claim is easy to justify. To see this, simply pick any two points in S,say x1 and x2 and then for an arbitrary value of λ in the interval 0 ≤ λ ≤ 1,form x3 = λx1 +(1−λ)x2. Then multiplying both sides by the LP constraintmatrix A yields Ax3 = λAx1 + (1 − λ)Ax2 = λb + (1 − λ)b = b. Also, it

10

Page 13: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

must be that x3 ≥ 0 since λ is nonegative and bounded by 1 and hence wehave arrived at the desired outcome that x3 ∈ S and thus the set S is convex.Of course, we have assumed that the set S is nonempty and as we will seelater, for cases where in fact, there is no feasible solution to a problem, i.e.,where S = ∅, we will need an unambiguous way to decide this.

3.1.2 Extreme Points

A point x is called an extreme point of the feasible region of an LP if x can-not be represented as a strict linear combination of two distinct points in theregion. We can illustrate the notion by considering various points in the setshown in Figure 4. Note that in our example, there are four extreme points:a, b, c and d. But in fact, that we had any extreme points at all is guaranteedfollowing a particularly modest requirement:

Property 1: If the convex set S = {x | Ax = b,x ≥ 0} is nonempty, it hasat least one extreme point.2

But why are extreme points relevant? The next property provides someinsight:

11

Page 14: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

Property 2: If a finite optima exists for an LP, then there is an optimalextreme point.2

Of course, there may be optimal solutions to an LP that are not extremepoints, but Property 2 indicates that if this is the case, then there has to alsobe an optimal solution that does, in fact, correspond to an extreme point.So then, in searching for an optimal solution, it is the case that we need onlysearch among the extreme points of feasible region. Of course, there couldexist more than one optimal extreme point but in this case, we know thatour LP would have an entire family of optimal solutions:

Property 3: If an LP has at least two distinct optimal extreme points thenthere exists an infinite number of optimal solutions.2

This property is also easy to justify. For a distinct pair of optimal extremepoints, say x1 and x2 then any point x3 formed as x3 = λx1 + (1 − λ)x2 isalso optimal where λ ∈ (0, 1). That is, any point on the line connecting x1

and x2 is optimal and, of course, there are infinitely many of these.What this means geometrically is that the last portion of the feasible

region to be “cut off” by the progression of the objective hyperplane throughthe region, is not a single (extreme) point but is rather, a face of the region.In our 2-dimensional example problem earlier, had our objective function

12

Page 15: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

been parallel to say constraint 2, then the last part of the feasible regionshown that would have been touched by the objective function would be theline segment between and including points b and c. Any of the infinitelymany points on this line segment would have been optimal.

3.1.3 Basic Solutions

Let A be the constraint matrix of the LP in standard form; assume A tobe of dimension m × n, i.e., m rows and n columns. Each column of Acorresponds to a variable in the LP, including any which have been added toconvert the LP to standard form. Now, let B be any m×m submatrix of Athat consists of m linearly independent columns. Accordingly, B is an m×minvertible submatrix of A. We will denote the variables that are identifiedwith the columns of B by xB; the columns in B are said to form a basis.

Now, suppose we solve the system BxB = b. Then, the solution xB =B−1b is called a basic solution of the system Ax = b; if xB ≥ 0, the solutionis a basic feasible solution and the corresponding variables are said to be ba-sic. If any variable in xB has value 0, the basic solution is called degenerate(nondegenerate otherwise). Variables not in xB are called nonbasic and au-tomatically have their value set to 0. As we shall see later, degeneracy cancause some computational problems in the solution of linear programs butfortunately, there are ways to guard against these.

Example 4: Suppose we consider the small two-variable LP used earlier.In this regard, let us convert the original model to standard form. Addingnonnegative slack varibales to each inequality produces the pair of equationsgiven below:

2x1 + 3x2 + S1 = 6

4x1 + 2x2 + S2 = 8

x1, x2, S1, S2 ≥ 0.

Observe that slack variables for each constraint are denoted by S1 and S2

respectively. Now, relative to the matrix representation of this standard formconstruction, the matrix A appears as

13

Page 16: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

A =

(x1 x2 S1 S2

2 3 1 04 2 0 1

).

We have indicated, across the top of the array, the variables identified withthe corresponding columns. The vector representing the right-hand sides of

the system is given by b =

(68

). Now, suppose we consider the submatrix

of A formed by the columns corresponding to variables x1 and x2. Callingthis B1 we have:

B1 =

(x1 x2

2 34 2

).

The basic variables are given by xB = (x1, x2) which then implies that thenonbasic variables (all of the others) result as xN = (S1, S2). By definitionthen, we have S1 = S2 = 0. Now, matrix B1 is invertible and we obtainaccordingly:

B−11 =

(−1

438

12−1

4

)

whereupon we can solve for xB as B−11 b =

(32

1

). That is, x1 = 3

2and x2 =

1. Since all of the variables (including the slack variables) are nonnegative,we have produced a basic feasible solution. Suppose we repeat this processby forming another submatrix say B2 defined by the variables x1 and S1, i.e.,

B2 =

(x1 S2

2 14 0

).

14

Page 17: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

Of course, what we are trying to do is solve the system given by

2x1 + S1 = 6

4x1 = 8.

Again, we could form B2−1 and post-multiply this by b to obtain the solution

for variables in xB = (x1, S1); however, the simplicity of the system allowsus to find a solution directly. Accordingly, we find that x1 = 2 and S1 = 2.The nonbasic variables are x2 and S2 and they (by virtue of their nonbasicstatus) are set to 0. Again, since all four variables are nonegative, we haveanother basic feasible solution.

We could proceed with this; there are four more combinations of pairs ofcolumns from A that are linearly independent and hence form bases. We willnot take space nor time to create and actually solve all of these but below, welist the basic variable sets followed by the values that result upon solution,including those for the nonbasic variables which are of course known oncethe basic variables are indicated.

Basis xB (x1, x2, S1, S2)

B3 (x1, S2) (3, 0, 0,−4)

B4 (x2, S1) (0, 4,−6, 0)

B5 (x2, S2) (0, 2, 0, 4)

B6 (S1, S2) (0, 0, 6, 8)

The first two of these (given by B3 and B4) are not basic feasible solutionssince at least one of the variables takes on a negative value. Of course somereaders may wonder why this is relevant if the offending variables are onlyslack variables. The answer is easy and is evident by simply examiningwhat the corresponding solution represents geometrically. Indeed, in Figure5, we indicate precisely what each basis Bi corresponds to in the graphical

15

Page 18: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

depiction of this sample problem instance. In the cases of B3 and B4, whatwe have actually located are solutions that correspond to the intersectionof certain problem constraints but unfortunately, not ones that define anextreme point of the problem’s feasible region.

So, the four basic feasible solutions identified by B1,B2,B5 and B6 cor-respond to the four points of the feasible region indicated. Of these, weknow that B1 is optimal. Of course, how we would decide this algebraicallyis critical and subsequently, we will formulate a method. Important at thispoint, however, is to observe that the correspondence between the four ex-treme points indicated and the four basic feasible solutions in this case ismore than a casual outcome. We have:

Property 4: The collection of extreme points of a linear program corre-sponds to the collection of basic feasible solutions.

16

Page 19: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

2

In fact, the establishment of this “equivalence” property is one of the fun-damental underpinnings in the theory of linear programming; the previousproperties that were stated actually derive as corollaries of Property 4.

Since we saw that basic solutions were determined by forming invertiblem × m submatrices of the constraint matrix A, it follows that the totalnumber of basic feasible solutions for an n-variable problem is bounded from

above by

(nm

). Observe that n and m are defined by the LP stated in

standard form. In addition, the implied inequality follows since many candi-date m ×m submatrices will not contain linearly independent columns andin addition, many that do, will not produce basic feasible solutions.

So, in theory we could solve an LP by simply examining its finitely manybasic feasible solutions and then pick the best. Unfortunately, such a strategywould be tedious at best since for even small instances (e.g., n = 100,m =25), this enumeration would be very time-consuming. But beyond this, thereare other, not so subtle, matters with which to be concerned. What if anLP has no solution space? What if its solution space is not bounded? Whatabout multiple solutions? And what are those degenerate solutions that weredefined previously; can they be an issue? Clearly, we need some formal wayof addressing these matters.

3.2 The Simplex Algorithm

Assume that we are given an initial basic feasible solution (correspondingto a starting extreme point). Then suppose we were able to replace thissolution with another one that was better (or at least no worse), repeatingthe process until we reached a point whereupon we could establsh that anoptimal solution had been found. That is, suppose we could start at someextreme point of our feasible region, move succesively through alternativeones that, if not strictly improving in terms of the objective function value,are at least no worse, stopping at a final extreme point with a proof thatour search was finished, i.e., that we had found an optimum. Happily, it isexactly this sort of “controlled search” through extreme points, vis-a-vis thealgebraic manipulation of basic feasible solutions, that constitutes the fun-damental machinery of the simplex algorithm. Developed by George Dantzig

17

Page 20: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

during the second world war, work leading to the ultimate development ofthe simplex algorithm stands as one of the celebrated success stories in op-erations research (George Dantzig is often referred to as the father of linearprogramming).

In concept, the simplex algorithm is essentially a bookkeeping strategyfor basic solution manipulation which, in turn, guides our search througha sequence of adjacent extreme points of an LP’s feasible region. We needthree things:

• a starting basic feasible solution

• a stopping criterion

• a method for moving from one extreme point to another

Rather than state the simplex algorithm in a formal way (which we willdo later), it should be instructive to motivate the basic notions called forabove. To this end, let us continue with the sample problem that has beenused thus far. For ease, the original (standard form) system is presentedagain below:

z = 3x1 + 2x2

2x1 + 3x2 + S1 = 6

4x1 + 2x2 + S2 = 8

Observe that the slack variables take on coefficients of 0 and hence do not ap-pear in the objective function equation. Although not stated as such, readersshould be clear that all variables are required to be nonnegative in the sys-tem shown. Now, let us take as an initial basis the submatrix correspondingto variables xB = (S1, S2). For obvious reasons this is called the “all-slack”basis. Certainly, this may not yield a very good initial solution but at least itis feasible. Accordingly, let us solve for the slack variables in their respectiveequations as follows:

S1 = 6− 2x1 − 3x2 = 6

18

Page 21: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

S2 = 8− 4x1 − 2x2 = 8.

Now, since x1 and x2 are nonbasic, they are set to 0 and we produce thesolution S1 = 6 and S2 = 8 which we (trivially) expected; its value is z = 0.Obviously, the all slack solution corresponds to the origin (point a) in our2-dimensional depiction of the feasible region.

Now, we observe that if the value of either x1 or x2 is elevated above 0,we will improve upon the current (all slack) solution value. Since c1 = 3 >2 = c2, let us select variable x1 to make basic. Acting in a “greedy” fashion,we would want to make x1 as large as is feasibly possible. But this is easyto decide by simply evaluating the limit on how large x1 can be by examin-ing the two current constraint equations above. From the first of these, wesee that x1 can be no greater than 3 while from the second equation, x1 isbounded from above by 2. The smaller of these values defines the maximumvalue that the variable can take on and still satisfy all contraints. So, let ournew basis consist of variables x1 and S1, i.e., variable x1 has replaced slackvariable S2 from the previous basis. Solving for x1 in the second equationyields:

x1 = 2− x2

2− S2

4,

and substituting x1 into the first equation, produces

2x2 −S2

2+ S1 = 2.

Obviously since variables x2 and S2 are now nonbasic and hence take on value0, the new basic variables x1 and S1 both solve with value 2 accordingly. Ge-ometrically, this means that we have moved from the basis associated withthe origin along the x1 axis, stopping at the extreme point b. Finally, if wealso substitute for x1 into our objective function, we obtain:

z = 6 + x2

2− 3

4S2

This is also consistent; that is, setting nonbasic variables x2 and S2 to 0yields z = 6. In any event, we can now replace our original, standard formrepresentation of the problem by the following, equivalent system:

19

Page 22: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

z = 6 + x2

2− 3

4S2

2x2 −S2

2+ S1 = 2

x1 + x2

2+ S2

4= 2.

This new system is identical to the original one since all that has occurredis a manipulation of equations, i.e., solutions feasible for one system arepreserved in the creation of the new system.

Now, in lookng at this new extreme point and the algebraic representationgiven above, we can see that the corresponding basis can be improved since acurrent nonbasic variable (x2) possesses a positive coefficient in the updatedobjective function; the modified value of c2 is now 1

2.

So, our intent is to bring into the basis, the improving variable x2. Notethat had more than one nonbasic variable had a positive coefficient, we couldhave used the previous rule-of-thumb selection policy of picking the variablehaving the greatest such value. In any event, and owing to linearity, wewould seek to make x2 as large as possible and this means examining bothof the current constraint equations. Accordingly, from the first, we see thatthe value of x2 can be no larger than 1 and from the second, no larger than4. We are again bound by the smaller of these quantities and this resultsfrom the solution in the first equation. That is, x2 will replace S1 from theprevious basis and solving as before yields:

x2 = 1 + S2

4− S1

2.

Substituing this expression into the current objective and second constraintequations produces the new, equivalent system shown below:

z = 612− S1

4− 5

8S2

x2 + S1

2− S2

4= 1

x1 −S1

4+ 3

8S2 = 3

2.

It is comforting to see, since S1 and S2 by virtue of their nonbasic status

20

Page 23: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

and hence, assignment of value 0, that we have produced the basic feasiblesolution x1 = 3

2and x2 = 1 with z = 61

2.

This new basis corresponds to extreme point c. Moreover, the currentsolution is optimal since we need only examine our equivalent system where-upon we see that the modified objective row coefficients for nonbasic variables(the only ones that could improve our current solution value) are nonposi-tive, i.e., their introduction into a basis at any feasible, positive value couldonly reduce the objective function value in hand. Therefore, we are preparedto conclude that our sequence of moves from the initial extreme point (theorigin in this case) to the current one can stop with a claim that we havefound an optimal solution.

Now, the simplex algorithm (stated crudely of course) simply performsthe calculations just demonstrated in an organized way making use of tabularrepresentations. Hence, the initial simplex tableau would appear as follows:

x1 x2 S1 S2

−3 − 0 0 0S1 2 3 1 0 6S2 4 2 0 1 8

.

The columns of the tableau are labeled by the variables; these labels neverchange. The rows relate to the objective function (treated as an equationbeginning as z - cx = 0) and the constraints. The constraint rows are labeledby the current basic variables, one per equation. As the initial tableau aboveindicates, the starting basis consists of slack variables S1 and S2, i.e., in anybasic tableau, the columns corresponding to the basic variables will be unitvectors.

Now, we saw earlier that an improvement of our current (initial) solutioncould be achieved by bringing into our basis the variable x1 as a replacementfor S2. We solved for x1 in the second constraint equation and substitutedthe outcome into the other constraint and the objective function. But this isequivalent to performing elementary row operations on the original system(first tableau) whereby a unit vector is created with the value 1 in the tableaucell corresponding to the intersection of the entering and departing variablesrespectively. This cell is referred to as the pivot cell of the tableau and the

21

Page 24: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

algebraic manipulation is referred to as pivoting. If we do this, we obtain thesecond tableau shown below:

x1 x2 S1 S2

0 −1/2 0 3/4 6S1 0 2 1 −1/2 2x1 1 1/2 0 1/4 2

.

The anxious reader may want to examine this tableau and compare the in-formation captured accordingly, with that derived in the previous system ofequations after the first basis exchange. Obviously, the value of this basicfeasible solution is 6; the value is always read in the upper right-hand cell ofeach tableau.

Upon examining the second tableau, the analogous test of optimality rel-ative to potential improvement of our current objective function value wouldnow have us examining the objective function row and in particular, those(updated) row coefficients of nonbasic variables to see if any existed at anegative value. If so, then bringing one of these into a basis and throwingsomething out would possibly produce another basis and if so, one that wasstrictly better than our prevous one. Do not forget: looking for negativeobjective coefficients here corresponds to our search for positive ones earliersince in our tabular format, we have rewritten the objective function. In anyevent, we observe that the coefficient of nonbasic x2 is -1/2 and so we willbring it into the basis. The decision of which variable it will replace, is deter-mined by a ratio test that, as we observed, simply allows us to make the newvariable as large as possible while satisfying the problem constraints. Thisis a check that asks only that we examine the ratio of a tableau’s currentright-hand-side value to the entering variable row coefficient and pick thesmallest (negative values are not considered). In this case, our comparisonis between the ratios 2

2and 2

1/2suggesting that x2 will replace S1 in the first

constraint equation. We pivot on the relevant cell of the last tableau creatingthe third one as displayed below:

22

Page 25: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

x1 x2 S1 S2

0 0 1/4 5/8 612

x2 0 1 1/2 −1/4 1x1 1 0 −1/4 3/8 3/2

.

All of the coefficients in the modified objective function row are now nonnega-tive which is our stopping signal. The solution in this last tableau correspondsto the basis consisting of x1 and x2 with values 3/2 and 1 respectively whichis consistent with our expectation given both our graphical and algebraicsolutions provided earlier. Again, skeptical readers might derive some com-fort in examining the final tableau above and verifying for themselves thatthe coefficients in the tableau are exactly those in the final set of equationsproduced previously. Indeed, any interim simplex tableau simply reflectsthe system of equations that would have been derived had our manipulationproceeded in the routine fashion demonstrated initially.....no more, no less.

Of course, we are not ready to claim, in a precise sense, that we can solveall linear programs. To be sure, there are a host of issues that have been leftrather vague to this point, i.e., how to determine if an LP has no solution,has no finite solution value, etc.. Naturally, we will look at how one respondsto these issues; however, we have at least exposed the key notions that willprovide the underpinning for the resolution of any linear program and priorto proceeding, we provide a high level statement of the fundamental process.

A Basic Summary of the Simplex Algorithm

Step 0: Start with any basic feasible solution.

Step 1: Determine an entering variable as one having a most negative coef-ficient in the objective row of the current tableau (if the original objective isof the “minimization” form, then look for a most positive coefficient). If allsuch coefficients are nonnegative (resp., nonpositive for minimization), stop;the current tableau represents an optimal solution.

Step 2: Let xj∗ denote the selected, entering variable selected in Step 1.Determine (if possible) a departing variable say xi∗ such that bi∗

ai∗j∗≤ bi

aij∗for

23

Page 26: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

all i for which aij∗ > 0. Pivot on cell (i∗j∗) and return to Step 1.2

We emphasize again that the statement above, while sufficient to exposethe basic computation of the simplex algorithm, leaves rather substantialgaps in how one might deal with what are practical, indeed very real-world,requirements for negotiating general linear programming problems. Amongthese are the following questions:

• Will the algorithm converge, i.e., will it always stop?

• What if there is no departing variable, i.e., what if the Step 2 test is notsatisfied?

• What if Step 0 cannot be implemented, i.e., what if the solution space isempty?

• Can ties in the minimum ratio test lead to problems?

• How can we detect when a problem has no finite optima; when it has mul-tiple optima?

In the following section, we will provide machinery that allows us to respondto these questions.

4 Generalizations

Our approach will continue to be an informal one, relying largely on illustra-tions. In this regard, readers are advised to create their own instances andto replicate the phenomena captured in the following examples. Accordingly,it will be instructive to employ the graphical context afforded by small in-stances in order to fully appreciate the relationships between the algebraicand geometric interpretations of the various outcomes. First, we have to adda final piece to our basic methodology: the notion of artificial variables.

24

Page 27: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

4.1 Artificial Variables

Suppose we were given the problem instance below:

max z = 2x1 + 3x2 − 5x3

s.t. x1 + x2 + x3 = 7

2x1 − 5x2 + x3 ≥ 10

x1, x2, x3 ≥ 0.

In standard form, the constraints would be written as follows:

x1 + x2 + x3 = 7

2x1 − 5x2 + x3 − S1 = 10

x1, x2, x3, S1 ≥ 0.

The first constraint in the original formulation is an equation and is thereforealready in standard form format. The second, an inequality of the greater-than-or-equal-to variety, requires the subtraction of a nonnegative surplusvariable.

Now, it is apparent that there is no “readily available” starting (feasible)basis; certainly, there is no so-called, all-slack basis as before. Of course, wecould search for some combination of columns in the constraint matrix thatprovided a feasible basis but this exercise would take too long (to appreciatethis, the reader should think in terms of a general problem having manyrows (constraints) and columns (variables)). More importantly, however, itis conceivable that such a search could be exhaustive in that the probleminstance at hand might not have feasible solutions at all. There must be abetter way to deal with the matter.

Suppose we add to each equation above, an artificial variable. The use ofthe adjective, “artificial”, follows since these variables are indeed “fake” inthe sense that they are not part of the real problem formulation. Still, theirrole will be one of facilitation; that is, these artificial variables will allow us

25

Page 28: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

to create a quick, albeit synthetic, starting basis without the overhead of anycomputational effort. Denoting these variables as R1 and R2, and requiringthese to also be nonnegative, the new system of constraints becomes:

s.t. x1 + x2 + x3 +R1 = 7

2x1 − 5x2 + x3 − S1 +R2 = 10

x1, x2, x3, S1, R1, R2 ≥ 0.

Now, in this new system we have an obvious starting basis consisting of R1

and R2 (obviously this is not feasible per the original instance). The artificialconstraint matrix, say A is given by

A =

(x1 x2 x3 S1 R1 R2

1 1 1 0 1 02 −5 1 −1 0 1

).

Then, the scheme is to simply apply the simplex algorithm and hope thatupon its application, we will ultimately eliminate the artificial variables sincethey are, by definition, not really part of the true formulation. There are twowell-known approaches for dealing with artificial variables:

• big-M method;

• two-phase method.

4.1.1 Big-M

The big-M method of handling instances with artificial variables is the “common-sense” approach. Essentially, the notion is to make the artificial variables,through their coefficients in the objective function, so costly or unprofitablethat any feasible solution to the real problem would be preferred....unlessthe original instance possessed no feasible solutions at all. But this means

26

Page 29: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

that we need to assign, in the objective function, coefficients to the artificialvariables that are either very small (maximization problem) or very large(minimization problem); whatever this value, let us call it big M. In fact,this notion is an old trick in optimization in general; we simply associate apenalty value with variables that we do not want to be part of an ultimatesolution (unless such an outcome is unavoidable). Indeed, the penalty is socostly that unless any of the respective variables’ inclusion are warrantedalgorithmically, such variables will never be part of any feasible solution.

So, the objective function for this example, upon the addition of the ar-tificial variables, would appear as follows:

max z = 2x1 + 3x2 − 5x3 −MR1 −MR2.

Obviously, any nonzero (recall that all variables are required to be nonneg-ative) value for R1 or R2 would occur in a final solution if and only if therewere no alternatives involving the other, real variables.

Now, placing the formulation in tableau form, and employing only artifi-cial variables in the starting basis, we have:

x1 x2 x3 S1 R1 R2

−2 −3 5 0 M M 0R1 1 1 1 0 1 0 7R2 2 −5 1 −1 0 1 10

.

Making this tableau “basic” produces (remember that we need unit vectorsunder the R1 and R2 columns):

x1 x2 x3 S1 R1 R2

−2− 3M −3 + 4M 5− 2M M 0 0 −17MR1 1 1 1 0 1 0 7R2 2 −5 1 −1 0 1 10

.

27

Page 30: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

At this point we know what to do. Applying the simplex algorithm, wecan bring into the basis, variable x1 and drive out (per the ratio check) arti-ficial variable R2 yielding:

x1 x2 x3 S1 R1 R2

0 −8− 72M 6− 1

2M −1− 1

2M 0 1 + 3

2M 10− 2M

R1 0 72

12

12

1 −12

2x1 1 −5

212

−12

0 12

5

.

Pivoting in x2 next and removing R1 produces:

x1 x2 x3 S1 R1 R2

0 0 507

17

167

+M −17

+M 1027

x2 0 1 17

17

27

−17

47

x1 1 0 67−1

757

17

457

.

Now, at this point there are no nonpositive coefficients in the objective rowof the current tableau (remember that M is a very large value) which isour sign that we are done. The final and hence optimal solution is x1 = 45

7

and x2 = 47. All other variables, by virtue of their being nonbasis, take on

value 0. Particularly meaningful (“nonbasic-ness” aside), is that the artificialvariables have now disappeared. As we intimated earlier, if we are to solve thereal problem, this disappearance is not just important; in fact, it is essential.

4.1.2 Two-phase method

The two-phase method derives its name in an obvious way. Essentially, thenotion is to formulate a problem instance with an objective function thatseeks to minimize a sum of only artificial variables. The simplex algorithmis applied in the standard way with the intent that at stopping, the artificialvariables will have value zero (and hence so will the objective function).That is, at the end of so-called phase-I, the artificial variables will have beenremoved; if this is not the case, then the original problem instance, as we

28

Page 31: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

shall see in the next section, must possess no feasible solution space. For thepresent, however, let us assume the former outcome. Then, we would removethe artificial variable columns from the final tableau of phase-I and enterphase-II with an admissible basis (the one produced at the end of phase-I).We then reapply the simplex at this point and continue in the normal fashion.An illustration should make the approach plain.

Consider the previous instance with the new objective function, consistingof only artificial variables, as indicated. That is, our phase-I instance wouldbe:

min z = R1 +R2

s.t. x1 + x2 + x3 +R1 = 7

2x1 − 5x2 + x3 − S1 +R2 = 10

x1, x2, x3, S1, R1, R2 ≥ 0.

Now, the initial tableau for phase-I (after having been made basic) ap-pears as follows:

x1 x2 x3 S1 R1 R2

3 −4 2 −1 0 0 17R1 1 1 1 0 1 0 7R2 2 −5 1 −1 0 1 10

.

The first pivot brings in x1 and replaces R2 producing the following:

x1 x2 x3 S1 R1 R2

0 72

12

12

0 −32

2R1 0 7

212

12

1 −12

2x1 1 −5

212−1

20 1

25

.

29

Page 32: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

Next, we pivot in x2 and R1 departs. We have:

x1 x2 x3 S1 R1 R2

0 0 0 0 −1 −1 0x2 0 1 1

717

27−1

747

x1 1 0 67−1

757

17

457

.

But this is a final tableau (nonpositive objective row coefficients for minimiza-tion) and so we have concluded phase-I. More importantly, we have drivenout the artificial variables (observe that the tableau objective function rowvalue of 0 is consistent with this outcome). So, we can proceed to phase-IIwhere operationally, we extract the relevant part of the above (phase-I final)tableau and strip off the first row replacing it with the original objectivefunction, yielding the following:

x1 x2 x3 S1

−2 −3 5 0 0x2 0 1 1

717

47

x1 1 0 67−1

7457

.

Updating the first row in order to create a basic tableau produces

x1 x2 x3 S1

0 0 507

17

1027

x2 0 1 17

17

47

x1 1 0 67−1

7457

which is the starting tableau for phase-II. Interestingly, however, this tableauis optimal. Of course, readers should be clear that for real instances thisphenomenon will not typically occur; further pivoting will be required onthe initial phase-II tableau. In any event, it is instructive to examine thephase-II tableau above and compare it with the corresponding “subtableau”

30

Page 33: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

produced earlier by the big-M method; as we would expect, they are thesame.

Obviously, appending artificial variables to a problem is only a “trick”that serves to allow the simplex calculations to at least commence. Fromthe simplex algorithm’s perspective, its application is routine; in the realproblem context, however, we are pivoting through artificial bases with theintended effect of ultimately “hooking up” with real bases (extreme pointsfor the oiginal problem) if possible. Geometrically, the process is capturedin Figure 6.

4.2 Empty Solution Space

A linear program may be constrained in such a way that there are no pointsat all that are admissible. Unfortunately, for real problem instances, thiscondition is not something that is easy to recognize by inspection and so analgebraic method is needed. Suppose we have the formulation below:

max z = 2x1 + x2

31

Page 34: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

s.t. x1 + x2 ≤ 3

2x1 + 3x2 ≥ 12

x1, x2 ≥ 0.

Employing the big-M approach, the standard form representation is given by

max z = 2x1 + x2 −MR1

s.t. x1 + x2 + S1 = 3

2x1 + 3x2 − S2 +R1 = 12

x1, x2, S1, S2, R1 ≥ 0.

Now, beginning with an initial basis that includes S1 and R1, we would pro-ceed until stopping occurs with the tableau below (the computation is left asan exercise for the reader):

x1 x2 S1 S2 R1

−1 +M 0 1 + 3M M 0 3− 3Mx2 1 1 1 0 0 3R1 −1 0 −3 −1 1 3

.

Unfortunately the final solution exhibits an artificial variable at a strictlypositive value. But this must mean that there is no admissible solution to theoriginal, “real” problem instance for otherwise, it would necessarily have beenpreferred to the one found above; if we have applied the simplex algorithmcorrectly, any better (i.e., feasible) solution would have been produced.

Now, if “seeing is believing,” it might be comforting to examine the graph-ical depiction of the original example. Shown in Figure 7, it is clear that thereis no nonempty intersection of all constraints and hence there is no feasiblesolution space for the stated problem instance. On a side note, interestedreaders are encouraged to apply the two-phase method to this problem in

32

Page 35: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

order to see if the outcome of phase-I’s feasibility test is consistent with theconclusion drawn above.

4.3 Alternative Optima

Consider the following linear program:

max z = 2x1 + 3x2

s.t. 4x1 + 6x2 ≤ 12

x1 + 2x2 ≤ 6

x1, x2 ≥ 0.

The instance is plotted in Figure 8; obviously, there is a nonempty solutionspace. Now, adopting our elementary, graphical approach of moving the

33

Page 36: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

objective function through this space, in the improving direction, it is evidentthat the last point of contact is the line segment indicated in bold. Thus,every point on this line segment is an optimal solution. But this occurs sincethe objective function is parallel to the first constraint in the instance wherethe latter is binding in the sense that it defines a portion of the feasible regionspecifying an optimal extreme point (obviously, the second constraint in theoriginal instance is redundant).

But since we don’t solve real-world linear programs graphically, what thenis the “signal” vis-a-vis simplex computations, that would indicate multipleoptima? Following is the final tableau that results upon a correct applicationof the simplex algorithm to this example:

x1 x2 S1 S2

0 0 12

0 6x2

23

1 16

0 2S2 −1

30 −1

31 2

.

34

Page 37: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

The basic variables are x2 and S2 which corresponds to the actual pointx1 = 0 and x2 = 2. But observe that there is an objective row coefficientof 0 under the nonbasic variable x1 (in the final tableau) . This indicatesthat there may be another optimal basis. Indeed, if we pivot in variable x1

(on this tableau) to replace x2, another basis, consisting of variables x1 andS2, results with values of 3 and 0 respectively. The latter corresponds tothe extreme point given (graphically) by x1 = 3 and x2 = 0. But this isto be expected because we just argued that the line segment between thesetwo extreme points of the feasible region (say x1 and x2) defined an entirefamily of optimal solutions for the given instance, i.e., any point on this linesegment is optimal. Put more formally, every solution x′ = λx1 + (1− λ)x2

for all 0 ≤ λ ≤ 1 is an optimal solution to the indicated instance. The readeris invited to test this claim by picking any such λ value and checking if theoutcome for x′ yields a value for z of 6. Of course, for any λ ∈ (0, 1), theresulting x′ is a nonbasic solution.

4.4 Unbounded Solutions Spaces

In some crude sense, the opposite notion of that arising in the case of emptysolution spaces, is the phenomenon of unbounded optima. Note that thisis not synonomous with the concept of an unbounded solution space. Thelatter would occur if say our feasible region was the first orthant (i.e., theonly constraints were the nonnegativity restrictions) and we sought to mini-mize a linear function with all variables having strictly positive coefficients;obviously, the origin would be the optimal extreme point. That is, the spaceover which we are searching is unbounded but we still have a bounded optima,i.e., the direction of unboundedness is irrelevant. Returning, nonetheless, toour case of unbounded optima, suppose we have the instance below:

max z = 3x1 + 2x2

s.t. x1 − 2x2 ≤ 10

2x1 − x2 ≤ 10

x1, x2 ≥ 0.

35

Page 38: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

Starting with the all-slack basis, we would ultimately reach the followingtableau:

x1 x2 S1 S2

0 −12

0 32

15S1 0 −3

21 −1

25

x1 1 −12

0 12

5

.

From this tableau, we observe that there is an entering variable, x2. However,in scanning the corresponding column, all coefficients are nonpositive whichmeans that nothing can depart the current basis. But this is precisely whatsignals an unbounded optima. In fact, what this suggests in the specificinstance shown, is that variable x2 can be increased without bound whilestill maintaining problem feasibility. Geometrically, this effect is depicted inFigure 9.

36

Page 39: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

4.5 Degeneracy

Our final property relates to degeneracy. Recall that a degenerate basis is onein which at least one basic variable has value 0. Essentially, degeneracy is a“non-issue” in solving practical linear programs, but only if certain safeguardsare in place; absent such safeguards, degeneracy can be a substantial problem.Consider the following instance:

max z = 2x1 + x2

s.t. x1 + x2 ≤ 10

x1 + 3x2 ≤ 10

x1, x2 ≥ 0.

Starting with the all-slack initial basis, the first tableau appears as follows:

x1 x2 S1 S2

−2 −1 0 0 0S1 1 1 1 0 10S2 1 3 0 1 10

.

Now, we can pivot in variable x1 to replace either S1 or S2; let us arbi-trarily choose S1. The new tableau then appears as follows:

x1 x2 S1 S2

0 1 2 0 20x1 1 1 1 0 10S2 0 2 −1 1 0

.

This is a final tableau; the optimal solution is given by the final basis con-sisting of x1 and S2 accordingly. But the final basis is degenerate sincea basic variable exists at a value of 0. What does this mean graphically?Essentially, what a degenerate solution implies is that an extreme point is

37

Page 40: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

“over-specified.” That is, the extreme point is represented by more than onebasis. Figure 10 helps to make the point clear. Here, the final extreme pointis represented by the intersection of three constraints when two would suffice.

So what is the issue with degeneracy? Well, suppose we consider anotherinstance:

min z = −34x4 + 20x5 −

12x6 + 6x7

s.t. x1 + 14x4 − 8x5 − x6 + 9x7 = 0

x2 + 12x4 − 12x5 −

12x6 + 3x7 = 0

x3 + x6 = 1

x1, x2, x3, x4, x5, x6, x7 ≥ 0.

If we start with (or at least reach) basis B1 = (x1, x2, x3) = (0, 0, 1) withz-value of 0, then it is possible that a legal sequence of simplex pivots will

38

Page 41: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

produce the following succession of bases (after B1):

B2 = (x4, x2, x3) with z = 0

B3 = (x4, x5, x3) with z = 0

B4 = (x6, x5, x3) with z = 0

B5 = (x6, x7, x3) with z = 0

B6 = (x1, x7, x3) with z = 0

B7 = (x1, x2, x3) with z = 0

But B7 = B1 and we have cycled. That is, any automatic continuation ofthe simplex algorithm will simply not converge. Indeed, for this example,the optimum solution is given by the tuple ( 3

4, 0, 0, 1, 0, 1, 0) having value

z = −1.25.Now, it is a true state of affairs in linear programming that many real-

world instances do give rise to degenerate bases which in turn suggests thatcycling could be a fairly legitimate issue about which to be concerned. Hap-pily, however, the cycling problem that is possible under degeneracy can bedealt with, indeed avoided by various anti-cycling techniques. In fact, theseprocedures are routinely included in commercial linear programming codes.In any event, we will not take these up here since the procedures involvedetails that are well beyond the scope of our treatise.

5 Final Comments

In concluding this basic coverage of linear programming, it is worth remarkingthat what we have presented here is but an introduction to what amountsto a most powerful and exceptionally rich optimization procedure. As weindicated at the outset, the methodology of linear programming represents avery important tool in the problem-solving arsenal of engineers and appliedmathematicians who are charged with dealing with critical problems thatarise on a daily basis in the world of business and industry.

39

Page 42: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

Still, much of the richness, indeed, much of what is to be appreciatedin linear programming must remain beyond the scope of this presentation.For example, the entire theory of linear programming duality represents anelegant development in its own right but more importantly, provides thebasis for much of what constitutes the real power in the application of linearprogramming to real-world problems. The related concepts of post-optimalityand sensitivity analysis are enormously powerful notions that derive fromduality theory.

In addition, we do not have space to take up the cases of so-called spe-cial LP structures. These are linear programs that exhibit characteristicsin their model formulations that allow shortcuts or stream-lined approaches.Interestingly, the arguments that are used to justify the correctness of theseshortcuts also often stem from notions in duality. In any event, readers in-terested in these and other topics are directed to the various sources in thereference list where a number of excellent, full treatises of linear programmingare cited.

40

Page 43: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

6 Exercises

1. Place each of the formulations below in standard form.

(a)min z = 4x1 + 2x2 − 33x3

s.t. x1 − 4x2 + x3 ≤ 12

9x1 + 6x3 = 15

−5x1 + 9x2 ≥ 3

x1, x2, x3 ≥ 0.

(b)max z = 45x1 + 15x3

s.t. 4x1 − 2x2 + 9x3 = 22

−2x1 + 5x2 − x3 ≥ 1

x1 − x2 ≤ 3

x1, x2, x3 ≥ 0.

(c)min z = 2x1 + x2 − 4x3

s.t. x1 − x2 − 5x3 ≤ 10

3x2 + 9x1 = −6

x1 ≥ 0, x3 ≤ 0, x2 unrestricted in sign.

41

Page 44: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

(d)min z = 3x1 − 3x2 + 7x3

s.t. x1 + x2 + 3x3 ≤ 40

x1 + 9x2 − 7x3 ≥ 50

| 5x2 + 8x3 |≤ 70

x1, x2 ≥ 0, x3 unrestricted in sign.

2. Solve the following problem graphically.

max z = 2x1 + 7x2

s.t. x1 + x2 ≤ 4

4x1 + 3x2 ≤ 12

−x1 + x2 ≥ 1

x1, x2 ≥ 0.

3. Solve graphically:

max z = min{3x1 − 10,−5x1 + 5}

s.t. 0 ≤ x1 ≤ 5.

42

Page 45: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

4. Consider the following instance:

max z = 2x1 − 4x2 + 5x3 − 6x4

s.t. x1 + 4x2 − 2x3 + 8x4 ≤ 2

−x1 + 2x2 + 3x3 + 4x4 ≤ 1

x1, x2, x3, x4 ≥ 0.

Determine:

(a) the maximum number of possible basic solutions;(b) the feasible extreme points;(c) the optimal basic feasible solution.

5. Solve the following linear program using the simplex algorithm.

max z = 2x1 + x2 − 3x3 + 5x4

s.t. x1 + 7x2 + 3x3 + 7x4 ≤ 46

3x1 − x2 + x3 + 2x4 ≤ 8

2x1 + 3x2 − x3 + x4 ≤ 10

x1, x2, x3, x4 ≥ 0.

43

Page 46: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

6. Solve the following minimization problem using the simplex algorithm.

min z = x1 − 3x2 − 2x3

s.t. 3x1 − x2 + 2x3 ≤ 7

−2x1 + 4x2 ≤ 12

−4x1 + 3x2 + 8x3 ≤ 10

x1, x2, x3 ≥ 0.

7. Solve the following instance with the simplex; start with variables x4, x5,and x6 in the initial basis.

max z = 3x1 + x2 + 2x3

s.t. 12x1 + 3x2 + 6x4 = 9

8x1 + x2 − 4x3 + 2x5 = 10

3x1 − x6 = 0

x1, x2, x3, x4, x5, x6 ≥ 0.

8. Solve the following problem by employing both the big-M and the two-phase methods.

max z = 2x1 + 3x2 − 5x3

s.t. x1 + x2 + x+ 3 = 7

2x1 − 5x2 + x3 ≥ 10

x1, x2, x3 ≥ 0.

44

Page 47: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

9. Find all of the alternative optimal basic solutions to the following instanceand then write a general expression for all of the nonbasic solutions.

max z = x1 + 2x2 + 3x3

s.t. x1 + 2x2 + 3x3 ≤ 10

x1 + x2 ≤ 5

x1 ≤ 1

x1, x2, x3 ≥ 0.

10. Solve the following linear program by inspection and then justify theoutcome in terms of the simplex algorithm.

max z = 5x1 − 6x2 + 3x3 − 5x4 + 12x5

s.t. x1 + 3x2 + 5x3 + 6x4 + 3x5 ≤ 90

x1, x2, x3, x4, x5 ≥ 0.

11. Solve the following problem, showing that the optimal solution is degen-erate and that there exist alternative solutions that are all nonbasic.

max z = 3x1 + x2

s.t. x1 + 2x2 ≤ 5

x1 + x2 − x3 ≤ 2

7x1 + 3x2 − 5x3 ≤ 20

x1, x2, x3 ≥ 0.

12. In which direction is the solution space for the problem instance belowunbounded?

45

Page 48: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

max z = 20x1 + 10x2 + x3

s.t. 3x1 − 3x2 + 5x3 ≤ 50

x1 + x3 ≤ 10

x1 − x2 + 4x3 ≤ 20

x1, x2, x3 ≥ 0.

13. Apply the big-M method to the formulation below and conclude, accord-ingly, that there are no feasible solutions.

max z = 3x1 + 2x2 + 3x3

s.t. 2x1 + x2 + x3 ≤ 2

3x1 + 4x2 + 2x3 ≥ 8

x1, x2, x3 ≥ 0.

14. Repeat exercise 13 using the two-phase method for artificial variables.

15. Suppose that at the end of phase-I, there is an artificial variable in thebasis at a value of 0. Is this a problem? What would you do?

46

Page 49: LINEAR PROGRAMMING - gatech.edubelinfan/2602fa07/pdf/lp.pdf · 2007. 8. 15. · LINEAR PROGRAMMING 1 Background In this document, we will look at a class of optimization problems

7 References

There have been many books written on the subject of linear programming.These range from ones at an exceptionally high level (i.e., research mono-graphs), to others that are quite basic and elementary. Following, we give avery short list of references that should be instructive to students pursuingtechnical degrees in fields such as engineering, mathematics, computer sci-ence and the like. Ones marked by bold reference numbers tend to be moreadvanced.

1. Bazaraa, M, J. Jarvis, and H. Sherali (1990), Linear Programming andNetwork Flows, Wiley, New York.

2. Chvatal, V. (1983), Linear Programming, W.H. Freeman, San Fransisco.

3. Rardin, R. L. (1998), Optmization in Operations Research, Prentice-Hall,Upper Saddle River, New jersey.

4. Taha, H. A. (1976), Operations Research, Macmillan, New York.

5. Winston, W. L. (1995), Introduction to Mathematical Programming: Ap-plications and Algorithms, Duxbury Press, Belmont, California.

47