IE 400  Principles of Engineering Management
Thanks to Niyazi Onur Bakır for the Slides
Fall 2010
Assumptions in LP problems
Three major assumptions are:
1 Proportionality and additivity The contribution of each decision variable to the objective function or to each constraint is proportional to the value of that variable. The
contribution from decision variables are independent from one another and the total contribution is the sum of the individual contributions.
2 Divisibility Each decision variable is allowed to take fractional values.
3 Certainty All input parameters (coeﬃcients of the objective function and of the constraints) are known with certainty.
Other mathematical programming models may constructed relaxing one or more of the assumptions above at the expense of loosing tractability.
Modeling Examples
Transportation Problem There are two power plants generating electricity and three factories that need electricity in their production.
Capacity
Demand
Modeling Examples
Transmission costs per MWatt
F1 
F2 
F3 

PP1 
50 
100 
60 
PP2 
30 
20 
35 
How should we satisfy the demand of each factory from the two power plants with minimum total cost?
The unknown values are the amount of electricity supplied from each power plant to each factory.
Let x _{i}_{j} denote the (unknown) # of MWatts of electricity
transmitted from PP _{i}
to F _{j} , i = 1, 2; j = 1, 2, 3.
Modeling Examples
Then the problem can be formulated as:
min 50x _{1}_{1} + 100x _{1}_{2} + 60x _{1}_{3} + 30x _{2}_{1} + 20x _{2}_{2} + 35x _{2}_{3} s.t. Demand constraints x _{1}_{1} + x _{2}_{1} = 1500 x _{1}_{2} + x _{2}_{2} = 750 x _{1}_{3} + x _{2}_{3} = 750 Capacity constraints x _{1}_{1} + x _{1}_{2} + x _{1}_{3} ≤ 1000 x _{2}_{1} + x _{2}_{2} + x _{2}_{3} ≤ 2000
and
x _{i}_{j} ≥ 0, i = 1, 2; j = 1, 2, 3.
Modeling Examples
Shortterm Investment Planning You have 10, 000 TL at the beginning of 2008 and would like to invest your money. Your goal is to maximize your total amount of money at the beginning of 2011. You have the following options:
Option
Duration (yrs)
Total interest rate
Available at the beginning of
1 2 
26% 
2008, 2009 
2 1 
12% 
2008, 2009, 2010 
3 3 
38% 
2008 
4 2 
27% 
2009 
Modeling Examples
2011
Let x _{t} denote the total amount of money available for reinvestment at the beginning of year t, t = 0, 1, 2, 3.
Let y _{i}_{t} denote the amount of money invested in option i at the beginning of year t, i = 1, 2, 3, 4, t = 0, 1, 2, 3.
Modeling Examples
With this information, the problem can be formulated as:
max x _{3} s.t.
x _{0} = 10, 000,
x _{0} = y _{1}_{0} + y _{2}_{0} + y _{3}_{0} ,
x _{1} = 1.12y _{2}_{0} ,
x _{1} = y _{1}_{1} + y _{2}_{1} + y _{4}_{1} ,
x _{2} = 1.26y _{1}_{0} + 1.12y _{2}_{1} ,
x _{2} = y _{2}_{2} , x _{3} = 1.38y _{3}_{0} + 1.26y _{2}_{1} + 1.27y _{4}_{1} + 1.12y _{2}_{2}
x _{0} , x _{1} , x _{2} , x _{3} ≥ 0
y _{1}_{0} , y _{2}_{0} , y _{3}_{0} , y _{1}_{1} , y _{2}_{1} , y _{4}_{1} , y _{2}_{2} ≥ 0
Modeling Examples
Blending Problem XYZ oil company produces three types of gasoline by blending three types of crude oil:
Gas 
Sales price per barrel 
Crude oil 
Purchase price per barrel 
1 70 
1 45 

2 60 
2 35 

3 50 
3 25 
The company can purchase up to 5000 barrels of each type of crude oil daily. The production requirements are,
Gas
Octane rating
Sulfur content
1 at least 10 
at most 1% 
2 at least 8 
at most 2% 
3 at least 6 
at most 1% 
Modeling Examples
Crude oil speciﬁcations:
Crude oil
Octane rating
Sulfur content
1 12 
0.5% 
2 6 
2.0% 
3 8 
3.0% 
It costs $4 to transform one barrel of crude oil into one barrel of gasoline.
The company can process up to 14, 000 barrels of crude oil daily.
The company has to meet the daily demand as well:
Gas
Demand (barrels)
1 4000
2 5000
3 3000
Modeling Examples
How can the company maximize total proﬁt while satisfying demand and production requirements?
The decision variables are x _{i}_{j} : # of barrels of crude oil i used daily to produce gas j, i = 1, 2, 3, j = 1, 2, 3.
The objective function is more complicated than in previous examples. The objective function has 3 pieces. First, sales,
Sales = 70(x _{1}_{1} + x _{2}_{1} + x _{3}_{1} ) + 60(x _{1}_{2} + x _{2}_{2} + x _{3}_{2} ) +50(x _{1}_{3} + x _{2}_{3} + x _{3}_{3} )
Purchase cost = 45(x _{1}_{1} + x _{1}_{2} + x _{1}_{3} ) + 35(x _{2}_{1} + x _{2}_{2} + x _{2}_{3} ) +25(x _{3}_{1} + x _{3}_{2} + x _{3}_{3} )
Modeling Examples
Process cost = 4(x _{1}_{1} +x _{1}_{2} +x _{1}_{3} +x _{2}_{1} +x _{2}_{2} +x _{2}_{3} +x _{3}_{1} +x _{3}_{2} +x _{3}_{3} )
Hence the objective is:
max 70(x _{1}_{1} + x _{2}_{1} + x _{3}_{1} ) + 60(x _{1}_{2} + x _{2}_{2} + x _{3}_{2} ) +50(x _{1}_{3} + x _{2}_{3} + x _{3}_{3} ) − 45(x _{1}_{1} + x _{1}_{2} + x _{1}_{3} ) −35(x _{2}_{1} + x _{2}_{2} + x _{2}_{3} ) − 25(x _{3}_{1} + x _{3}_{2} + x _{3}_{3} ) −4(x _{1}_{1} + x _{1}_{2} + x _{1}_{3} + x _{2}_{1} + x _{2}_{2} + x _{2}_{3} + x _{3}_{1} + x _{3}_{2} + x _{3}_{3} )
s.t.
Demand constraints
x _{1}_{1} + x _{2}_{1} + x _{3}_{1} = 4000, x _{1}_{2} + x _{2}_{2} + x _{3}_{2} = 5000, x _{1}_{3} + x _{2}_{3} + x _{3}_{3} = 3000,
Modeling Examples
Purchase constraints
x _{1}_{1} + x _{1}_{2} + x _{1}_{3} ≤ 5000, x _{2}_{1} + x _{2}_{2} + x _{2}_{3} ≤ 5000, x _{3}_{1} + x _{3}_{2} + x _{3}_{3} ≤ 5000,
Capacity constraint
x _{1}_{1} + x _{1}_{2} + x _{1}_{3} + x _{2}_{1} + x _{2}_{2} + x _{2}_{3} + x _{3}_{1} + x _{3}_{2} + x _{3}_{3} ≤ 14, 000
Octane requirements
_{G}_{a}_{s} _{1} 12x _{1}_{1} +6x _{2}_{1} +8x _{3}_{1}
x 11 +x 21 +x 31
≥ 10
=⇒
12x _{1}_{1} + 6x _{2}_{1} + 8x _{3}_{1} − 10(x _{1}_{1} + x _{2}_{1} + x _{3}_{1} ) ≥ 0
2x _{1}_{1} − 4x _{2}_{1} − 2x _{3}_{1} ≥ 0
Modeling Examples
Octane requirements (continued) Gas 2 12x _{1}_{2} + 6x _{2}_{2} + 8x _{3}_{2} ≥ 8(x _{1}_{2} + x _{2}_{2} + x _{3}_{1} ) =⇒ 4x _{1}_{2} Gas 3 12x _{1}_{3} + 6x _{2}_{3} + 8x _{3}_{3} ≥ 6(x _{1}_{3} + x _{2}_{3} + x _{3}_{3} )
− 2x _{2}_{2} ≥ 0
=⇒ 6x _{1}_{3} + 2x _{3}_{3} ≥ 0
Sulfur requirements Gas 1 0.005x _{1}_{1} + 0.02x _{2}_{1} + 0.03x _{3}_{1} ≤ 0.01(x _{1}_{1} + x _{2}_{1} + x _{3}_{1} ) =⇒ −0.005x _{1}_{1} + 0.01x _{2}_{1} + 0.02x _{3}_{1} ≤ 0,
Modeling Examples
Sulfur requirements (continued) Gas 2 0.005x _{1}_{2} + 0.02x _{2}_{2} + 0.03x _{3}_{2} ≤ 0.02(x _{1}_{2} + x _{2}_{2} + x _{3}_{2} ) =⇒ −0.015x _{1}_{2} + 0.01x _{3}_{2} ≤ 0, Gas 3 0.005x _{1}_{3} + 0.02x _{2}_{3} + 0.03x _{3}_{3} ≤ 0.01(x _{1}_{3} + x _{2}_{3} + x _{3}_{3} ) =⇒ −0.005x _{1}_{3} + 0.01x _{2}_{3} + 0.02x _{3}_{3} ≤ 0
Modeling Examples
Ex 5: Suppose that milk chocolate is produced with three ingredients. One kg. of milk chocolate contains 0.5 kg. of milk, 0.4 kg of cocoa, and 0.1 kg of sweetener. Each of these three ingredients needs to be processed before they can be used in the production of milk chocolate. The facility has two departments that can process these ingredients. The following table summarizes the processing requirements.
Dept. 1 (hrs./kg.)
Dept. 2 (hrs./kg.)
Milk 
0.4 
0.6 
Cocoa 
0.3 
0.2 
Sweetener 
0.5 
0.6 
The available # of hours per week is 150 for each department. Formulate an LP problem that maximizes the total # of kg.’s of milk chocolate produced in a week.
Modeling Examples
Let x _{i}_{j} denote the # of kg.’s of ingredient i processed in department j, i = 1 (milk), 2 (cocoa), 3 (sweetener), j = 1, 2.
Furthermore, let y : # of kg.’s of milk chocolate produced in a week. y satisﬁes:
y = min { ^{x} ^{1}^{1} ^{+}^{x} ^{1}^{2}
0.5
_{,}
x 21 +x 22
0.4
_{,}
x 31 +x 32
0.1
}
What is the problem here?
Modeling Examples
We need to maximize y , but we cannot use the equality provided in the previous slide.The equation is nonlinear! .
We could apply the common modeling trick below:
max y
s.t.
_{y}
_{y}
_{y}
_{≤} x 11 +x 12
0.5
_{≤} x 21 +x 22
0.4
_{≤} x 31 +x 32
0.1
What other constraints do we have?
Modeling Examples
We also have the following constraints:
Dept. 1 
0.4x _{1}_{1} + 0.3x _{2}_{1} + 0.5x _{3}_{1} ≤ 150 
Dept. 2 
0.6x _{1}_{2} + 0.2x _{2}_{2} + 0.6x _{3}_{2} ≤ 150 
x _{i}_{j} ≥ 0
i = 1, 2, 3
j = 1, 2
With this example completed, we are now in a position to start thinking about solution methodologies. The simplex method is the most popular and oldest approach to solve linear programs. However, before we start discussing the simplex method, we take a look at simpler linear programs that include only two variables and can be solved graphically.
Graphical Solution of 2variable LP Problems
Consider the following LP:
max 3x _{1} + 2x _{2} s.t.
2x _{1} + x _{2} ≤ 100
x _{1} + x _{2} ≤ 80
x _{1} ≤ 40 x _{1} ≥ 0 x _{2} ≥ 0
How do we solve this?
Graphical Solution of 2variable LP Problems
The solution can be obtained very easily drawing the plot below:
Figure:
Graphical solution
Graphical Solution of 2variable LP Problems
Consider 
the 
following 
linear 
program, 
min 50x _{1} + 100x _{2}
s.t.
7x _{1} + 2x _{2} ≥ 28
2x _{1} + 12x _{2} ≥ 24
x _{1} , x _{2} ≥ 0
Graphical Solution of 2variable LP Problems
Now consider yet another problem,
max x _{1} + 3x _{2}
s.t.
x _{1} + x _{2} ≤ 7
−x _{1} + 2x _{2} ≤ 8
x _{1} ≤ 4
x _{1} ≥ 0
x _{2} ≥ 0
The graphical solution to this problem is provided in the classroom, but here is some discussion on how you could obtain the solution.
Graphical Solution of 2variable LP Problems
First, consider the coeﬃcients of x _{1} and x _{2} in the objective function: 1 and 3, respectively. Now let:
c =
1
3
Note that as we move the isoproﬁt line in the direction of c , the total proﬁt increases.
For a maximization problem, the vector given by the coeﬃcients of
x _{1} and x _{2} in the objective function is called the improving direction.
To solve an LP problem in two variables, we should try to push isoproﬁt lines in the improving direction as much as possible while still staying in the feasible region.
Graphical Solution of 2variable LP Problems
In this example, the best feasible point we can achieve in this direction is x ^{∗} (refer to the class notes). Note that x ^{∗} is given by the intersection of the lines:
x _{1} + x _{2} = 7
−1/2x _{1} + x _{2} = 4
Solving this minisystem of linear equalities, we obtain:
x ^{∗} =
2
5
as the optimal solution! Then, the maximum achievable proﬁt is given by:
∗
1
x
∗
2
+ 3x
= 2 + 3 · (5) = 17 TL
In other words, the optimal value of the LP problem is 17.
General Concepts in LP
Some properties and attributes of the feasible region are also important in the later stages of this course where we start discussing how to solve LPs involving more than 2 decision variables.
A set of points S is a convex set if the line segment joining any pair of points in S is wholly contained in S.
For any convex set S, a point P in S is an extreme point if each
line segment that lies completely in S and contains the point P has P as an endpoint of the line segment. Extreme points are sometimes called corner points, because if the set S is a polygon,
the extreme points of S will be the vertices, or corners of the polygon.
Graphical Solution of 2variable LP Problems
A company wishes to increase demand for its product through
advertising. Each minute of radio ad costs 1 units and each minute
of TV ad costs 2 units. Each minute of radio ad increases the daily
demand by 2 units and each minute of TV ad by 7 units. The company would wish to place at least 9 minutes of daily ad in total. It wishes to increase daily demand by at least 28 units. How can the company meet its advertising requirements at minimum total cost?
What are the decision variables?
Graphical Solution of 2variable LP Problems
x _{1} : # of minutes of radio ads purchased. x _{2} : # of minutes of TV ads purchased.
The problem can be formulated as follows:
min x _{1} + 2x _{2} s.t.
2x _{1} + 7x _{2} ≥ 28 x _{1} + x _{2} ≥ 9 x _{1} ≥ 0, x _{2} ≥ 0
The geometric solution is provided in the classroom.
Graphical Solution of 2variable LP problems
Note that the vector given by the coeﬃcients of decision variables in the objective function is
c =
1
2
Note that the total cost increases in this direction. Since we have a minimization problem, this is, hence, not the direction that we want to move. We should move in the opposite direction, i.e. in
the direction of −c = _{}
−1
−2
In other words, for a minimization problem, we go in the opposite direction of c (i.e. in the direction of −c as much as possible while still remaining in the feasible region.
Graphical Solution of 2variable LP problems
The optimal solution is given by the intersection of the following two lines:
2x _{1} + 7x _{2} = 28
x _{1} + x _{2} = 9
Solving for the system of two equations, we obtain x
x
∗ = 7 and
1
2
= 2. Hence, the optimal solution is
∗
x ^{∗} =
^{7}
2
The optimal value is 7 + 2(2) = 11. Therefore, the total minimum cost is 11 units. Also, note that both constraints are binding at the optimum.
Graphical Solution of 2variable LP Problems
Alternate or multiple optimal solutions Suppose in the previous example that it costs 4 units to place a minute of radio ad and 14 units to place a minute of TV ad. Then the formulation could be modiﬁed as:
min 4x _{1} + 14x _{2} s.t.
2x _{1} + 7x _{2} ≥ 28 x _{1} + x _{2} ≥ 9 x _{1} ≥ 0, x _{2} ≥ 0
Again, the graphical solution is provided in the classroom. After plotting the objective function as well as the constraints, one could readily see that any feasible point on the line segment between points A = (x _{1} , x _{2} ) = (7, 2) and B = (x _{1} , x _{2} ) = (14, 0) is an optimal solution with the same optimal value.
Graphical Solution of 2variable LP Problems
At point A, 4(7) + 14(2) = 56
At point B , 4(14) + 14(0) = 56
The optimal value is 56. This is also true for any feasible point between A & B . In this case, we say that LP has multiple or alternate optimal solutions.
Mathematically speaking, we could represent the set of optimum points as the convex combination of A & B , or the line segment [A, B]
{λ ^{7}
2
+ (1 − λ)
^{1}^{4}
0
: λ ∈ [0, 1]}
Graphical Solution of 2variable LP problems
Alternative or Multiple Optimal Solutions An auto company manufactures cars and trucks. Each vehicle must be processed in the paint shop and body assembly shop. If the paint shop were only painting trucks, 40 per day could be painted. If the paint shop were only painting cars, 60 per day could be painted. If the body shop were only producing cars, it could process 50 per day. If the body shop were only producing trucks, it could process 50 per day. Each truck contributes $300 to proﬁt, and each car contributes $200 to proﬁt. Use linear programming to determine daily production schedule that will maximize the company’s proﬁts.
Decision variables?
Graphical Solution of 2variable LP problems
The company must decide how many cars and trucks should be produced daily.
x _{1} : # of trucks produced daily. x _{2} : # of cars produced daily.
The company maximizes proﬁts. In hundreds of dollars, the objective function can be written as 3x _{1} + 2x _{2} .
There are two constraints based on the capacity of the paint and body shops. For both departments, the fraction of day allocated to truck and car production must not exceed 1. Hence the constraints are:
1
40
1
50
^{x} ^{1} ^{+} ^{x} ^{1} ^{+}
1
_{6}_{0}
1
_{5}_{0}
x _{2} ≤ 1 x _{2} ≤ 1
Graphical Solution of 2variable LP problems
Clearly, the LP problem is:
max 3x _{1} + 2x _{2}
s.t.
1
40
1
50
^{x} ^{1} ^{+} ^{x} ^{1} ^{+}
1
_{6}_{0}
1
_{5}_{0}
x _{2} ≤ 1 x _{2} ≤ 1
x _{1} ≥ 0, x _{2} ≥ 0
The plot of the objective function and the feasible region should reveal the fact that the objective function has the same slope with one of the constraints, and it intersects an entire line segment corresponding to the binding constraint.
Graphical Solution of 2variable LP Problems
Unboundedness Consider the following LP problem,
max x _{1} + 3x _{2} s.t.
−x _{1} + 2x _{2} ≤ 8
x _{1} ≥ 0, x _{2} ≥ 0
After plotting the feasible region, one can observe that the objective function can be increased by the moving in the improving direction c as much as we want while still staying in the feasible region. In this case, we say that the LP is unbounded.
For unbounded LP max problems, there is no optimal solution and the optimal value is deﬁned to be +∞. For a min problem, we say that the LP is unbounded if we can decrease the objective function as much as we want while staying in the feasible region. In this case, the optimal value is −∞.
Graphical Solution of 2variable LP problems
Unboundedness Another example of an unbounded feasible region is as follows:
max 2x _{1} − x _{2} s.t.
x _{1} − x _{2} ≤ 
1 
2x _{1} + x _{2} ≥ 
6 
x _{1} ≥ 0, x _{2} ≥ 0
Again, after shifting the plot of the objective function in the feasible region, one can observe that the objective function can be shifted to assume arbitrarily large values.
Graphical Solution of 2variable LP Problems
Infeasible LP problems Consider the following LP
max x _{1} + 3x _{2} s.t.
x _{1} + x _{2} ≤ 6
−x _{1} + 2x _{2} ≤ 8 x _{2} ≥ 6
x _{1} ≥ 0, x _{2} ≥ 0
After plotting the constraints, one can readily observe that a feasible region does not exist. We say that the LP problem is infeasible.
Graphical Solution of 2variable LP Problems
Infeasible LP problems Suppose in the previous auto manufacturing example that auto dealers require that the auto company produce at least 30 trucks and 20 cars. The the problem becomes,
max 3x _{1} + 2x _{2} s.t.
1
40
1
50
^{x} ^{1} ^{+} ^{x} ^{1} ^{+}
1
_{6}_{0}
1
_{5}_{0}
x _{2} ≤ 1 x _{2} ≤ 1
x _{1} ≥ 30
x _{2} ≥ 20
x _{1} ≥ 0, x _{2} ≥ 0
Graphical Solution of 2variable LP variables
The plot should immediately warn us of an infeasible problem. We could also recognize that there is an infeasible solution by immediately checking the paint shop constraint at the point x _{1} = 30 and x _{2} = 20.
LP is infeasible because producing 30 trucks and 20 cars requires more paint shop time than is available.
General Characterization of LP Problems
Every LP problem falls into one of the four cases:
Case 1 The LP problem has a unique optimal solution.
Case 2 The LP problem has alternative or multiple optimal solutions. In this case, there are inﬁnitely many optimal solutions.
Case 3 The LP problem is unbounded. There is no optimal solution in this case.
Case 4 The LP problem is infeasible. There is no feasible solution.
Summary So Far
So far, we have seen the solution of LP problems with only two decision variables.
Such problems can easily be solved graphically.
However, many LP problems include more than two variables. How can we solve them?
We will learn how to solve more complex linear programs using the simplex method. Simplex method is a solution algorithm that searches for the optimal solution checking the extreme points of the feasible region iteratively.
The Simplex Method
Last time, we began to solve linear programs using the graphical method. During our discussion, we observed that the optimal solution, if it exists, is either an extreme point or a linear combination of two extreme points. This characteristic of LP problems provide some analytical convenience in solving more complex LP problems involving more than 2 decision variables.
Simplex method is the ﬁrst method, invented in late 1940s to exploit this characteristic of LP problems. Simplex method can be used to solve very large LPs, involving thousands of constraints and variables.
So far, we have seen simple LP problems with both equality and inequality constraints. The decision variables were allowed to take nonnegative values. However, in general, LP problems can also have variables that are required to be nonpositive or those allowed to be unrestricted in sign.
The Simplex Method
To use the simplex method, we need to convert the problem ﬁrst into the standard form. To convert an LP problem into the standard form, each inequality constraint must be replaced by an equality constraint.
We will illustrate the simplex method step by step, using the example below,
max 5x _{1} + 4x _{2} + 3x _{3}
s.t.
2x _{1} + 3x _{2} + x _{3} ≤ 
5 
4x _{1} + x _{2} + 2x _{3} ≤ 
11 
3x _{1} + 4x _{2} + 2x _{3} ≤ 
8 
x _{1} , x _{2} , x _{3} ≥ 0
The Simplex Method
To convert this problem into its standard form, we need to deﬁne ”slack” variables. For each inequality constraint, we deﬁne a slack variable, as follows:
s _{1} = 
5 − 2x _{1} − 3x _{2} − x _{3} 
s _{2} = 
11 − 4x _{1} − x _{2} − 2x _{3} 
s _{3} = 8 − 3x _{1} − 4x _{2} − 2x _{3}
Clearly, each slack variable corresponds to the diﬀerence between the right hand side (RHS) and the left hand side (LHS) of each of the ﬁrst three constraints. This implies s _{1} , s _{2} , s _{3} ≥ 0 for every feasible solution of the LP problem. In summary, if constraint i of an LP is a ”≤” constraint, we convert it to an equality constraint by adding a slack variable s _{i} to the i ^{t}^{h} constraint and adding the sign restriction s _{i} ≥ 0.
The Simplex Method
Similarly, let us denote the objective function by:
z = 5x _{1} + 4x _{2} + 3x _{3} .
After the necessary conversions, we obtain what we call Dictionary
1:
Row 0 
z 
= 
5x _{1} 
+ 
4x _{2} 
+ 
3x _{3} 

Row 1 
s _{1} 
= 
5 
− 
2x _{1} 
− 
3x _{2} 
− 
x _{3} 
Row 2 
s _{2} 
= 
11 
− 
4x _{1} 
− 
x _{2} 
− 
2x _{3} 
Row 3 
s _{3} 
= 
8 
− 
3x _{1} 
− 
4x _{2} 
− 
2x _{3} 
To begin with, we need an initial feasible solution. How could you obtain one?
The Simplex Method
A simple initial feasible solution can be obtained by setting the original decision variables equal to 0. Hence, the ﬁrst feasible solution is:
x _{1} = 0, x _{2} = 0, x _{3} = 0, s _{1} = 5, s _{2} = 11, s _{3} = 8.
The current value of the objective function is z = 0. Our goal is to look for another feasible solution that yields a larger objective function value (since this is a max. problem). To do so, we consider increasing x _{1} , x _{2} and x _{3} from their current values. This also increases the current z value.
By looking at row 0 above, we the see that increasing x _{1} by 1 increases z by 5. Similarly, increasing x _{2} by 1 and x _{3} by 1 increase z by 4 and 3 respectively.
The Simplex Method
Ratio Test It makes sense to increase the value of x _{1} because it oﬀers the highest amount of increase in z per unit of perturbation. As we increase x _{1} , we keep x _{2} and x _{3} at their initial values of 0. In doing so, we need to pay attention to the constraints as well. We cannot perturb x _{1} in violation of the constraints. So the question is: How much can we increase x _{1} ?
The new solution will still be feasible as long as each of the original and slack variables is still nonnegative. Now, going back to the ﬁrst dictionary,
s _{1} = 
5 − 2x _{1} − 3x _{2} − x _{3} = 5 − 2x _{1} ≥ 0 =⇒ 
x _{1} ≤ 5/2 
s _{2} = 
11 − 4x _{1} − x _{2} − 2x _{3} = 11 − 4x _{1} ≥ 0 
=⇒ x _{1} ≤ 11/4 
s _{3} = 8 − 3x _{1} − 4x _{2} − 2x _{3} = 8 − 3x _{1} ≥ 0 =⇒ x _{1} ≤ 8/3.
The Simplex Method
Of the three bounds, the ﬁrst one is the most restrictive. Therefore, we can increase the value of x _{1} up to 5/2 while keeping x _{2} and x _{3} at 0 to ensure feasibility. Now, we obtain a new feasible solution at x _{1} = 5/2. The second feasible solution is:
x _{1} = 5/2, x _{2} = 0, x _{3} = 0, s _{1} = 0, s _{2} = 1, s _{3} = 1/2.
And the current value of the objective function is:
z = 5 · ( ^{5} ) + 4 · (0) + 3 · (0) = ^{2}^{5}
2
2
^{.}
Note that the second feasible solution has indeed a larger objective function value than the ﬁrst feasible solution.
However, our search for the optimal solution is probably not over!
The Simplex Method
Now, we shall look for an even better solution than the second feasible solution. Note that, in Dictionary 1, each of the variables x _{1} , x _{2} and x _{3} was on the RHS and had a value of 0. As such, the same was true for the objective function.
This enabled us to quickly identify which variables should be increased from their current value of zero to obtain the largest increase in the objective function value.
To do the same, we shall rearrange dictionary 1, so that only the variables which are 0 in the second feasible solution will be on the RHS. In feasible solution #2, x _{2} = 0, x _{3} = 0 and s _{1} = 0.
The Simplex Method
In row 1 of dictionary 1, s _{1} should move from the LHS to the RHS and x _{1} should move from the RHS to the LHS. Mathematically speaking,
s _{1} = 5 − 2x _{1} − 3x _{2} − x _{3}
becomes
x _{1} = 5/2 − 3/2x _{2} − 1/2x _{3} − 1/2s _{1}
(1)
The same should be repeated for other rows as well. Note that, s _{2} and s _{3} are still in the LHS and they should remain so. But x _{1} should no longer be on the RHS of rows 2 and 3. To this end, we could substitute (??) in rows 2 and 3 of dictionary #1. In the end, only x _{2} , x _{3} and s _{1} will appear on the LHS of rows 2 and 3.
The Simplex Method
Substituting,
s _{2} =
11 − 4x _{1} − x _{2} − 2x _{3}
= 11 − 4( ^{5} 2 ^{−} 3 _{2} x _{2} −
= 1 + 5x _{2} + 2s _{1}
1 
1 
_{2} x _{3} − 
_{2} s _{1} ) − x _{2} − 2x _{3} 
and
s _{3} =
8 − 3x _{1} − 4x _{2} − 2x _{3}
The Simplex Method
As a result,
z = 5x _{1} + 4x _{2} + 3x _{3}
= 5( ^{5} _{2} − ^{3} x _{2} − ^{1}
_{=} 25
1
_{2} x _{3} − _{2} s _{1} ) + 4x _{2} + 3x _{3}
_{2} x _{3} − ^{5}
_{2} s _{1} .
_{2}
^{7} x _{2} + ^{1}
2
−
2
We are now ready to form the new dictionary (Dictionary #2):
Row 0 
^{2}^{5} 
^{7} 
+ 
^{1} _{2} x _{3} 
^{5} 

z 
= 
2 
− 
2 x _{2} 
− 
2 
^{s} 
^{1} 

Row 1 
^{5} _{2} 
^{3} x _{2} 
^{1} _{2} x _{3} 
1 

x _{1} 
= 
− 
− 
− 
^{s} 

2 
2 
^{1} 

Row 2 
s _{2} 
= 
1 
+ 
5x _{2} 
+ 
2s _{1} 

^{1} _{2} 
1 
^{1} _{2} x _{3} 
^{3} 

Row 3 
s _{3} 
= 
+ 
_{2} x _{2} 
− 
+ 
2 
s 
1 
The Simplex Method
Recall feasible solution #2:
x _{1} = 5/2, x _{2} = 0, x _{3} = 0, s _{1} = 0, s _{2} = 1, s _{3} = 1/2, z = ^{2}^{5}
2
^{.}
Observe that in dictionary #2, only variables with zero values are on the RHS of each of the four rows.
By looking at row 0, we see that only increasing x _{3} from 0 yields an even larger objective function value. This is not the case for the other variables. As in the previous case, we ﬁrst decide how much x _{3} can be increased while keeping x _{2} and s _{1} at 0.
The Simplex Method
To see this,
x _{1} = ^{5}
2
2 ^{−} ^{3}
1
x _{2} − _{2} x _{3} −
1
_{2} s _{1} =
s _{2} = 1 + 5x _{2} + 2s _{1} = 1 ≥ 0
^{5}
2 ^{−}
1
_{2} x _{3} ≥ 0
=⇒
x _{3} ≤ 5.
=⇒ No restriction!
s _{3} = ^{1} _{2} + _{2} x _{2} −
Note that row #2 imposes no restriction on how much x _{3} can be increased. Clearly, the most restrictive bound is given by row 3. It says that you can increase x _{3} at most by 1 without violating feasibility. With this in mind, the third feasible solution is:
^{−} ^{1}
1
1
_{2} x _{3} + ^{3}
2
s _{1} =
1 2 _{2} x _{3} ≥ 0 =⇒ x _{3} ≤ 1
x _{1} = 2, x _{2} = 0, x _{3} = 1, s _{1} = 0, s _{2} = 1, s _{3} = 0,
with an objective function value of z = ^{2}^{5} + ^{1} _{2} x _{3} = 13. This is an improvement!
2
The Simplex Method
We still need to continue because we can still observe an improvement. Note that, as we increased x _{3} to 1, we forced s _{3} down to 0. This suggests that we need to interchange the roles of s _{3} and x _{3} , i.e.,
s _{3} =
1
2 ^{+}
1
_{2} x _{2} −
1
_{2} x _{3} + ^{3}
2
s 1
=⇒
x _{3} = 1 + x _{2} + 3s _{1} − 2s _{3} .
(2)
Substituting (??) in rows 1, 2 and 0, we get:
Row 1 =⇒
The Simplex Method
Row 2 =⇒
Row 0 =⇒
s _{2} = 1 + 5x _{2} + 2s _{1} (x _{3} does not appear, hence no change!)
z = ^{2}^{5}
2
25
1
_{2} ^{7} x _{2} + _{2} x _{3} − ^{5}
1
−
2 ^{s} ^{1}
− _{2} x _{2} + _{2} (1 + x _{2} + 3s _{1} − 2s _{3} ) − ^{5}
^{7}
2 ^{s} ^{1}
_{=}
=
2
13 − 3x _{2} − s _{1} − s _{3} .
After all these arrangements, we end up with the following dictionary (Dictionary #3):
Row 0 
z 
= 
13 
− 
3x _{2} 
− 
s _{1} 
− 
s _{3} 

Row 1 
x _{1} 
= 
2 
− 
2x _{2} 
− 
2s 
_{1} 
+ 
s _{3} 
Row 2 
s _{2} 
= 
1 
+ 
5x _{2} 
+ 
2s 
_{1} 

Row 3 
x _{3} 
= 
1 
+ 
x _{2} 
+ 
3s 
_{1} 
− 
2s _{3} 
The Simplex Method
Now, with x _{2} = 0, s _{1} = 0 and s _{3} = 0 we have a feasible solution that yields an objective function value of 13. Checking row 0, we immediately see that if we try to increase the values of any of these variables, we decrease the objective function value.
Therefore, we can no longer increase the objective function value among all feasible solutions. Hence, the third feasible solution obtained in this process is actually an optimal value, i.e.,
x
s
∗
1
∗
1
=
=
∗
2
∗
2, x
0, s
2
∗
3
= 0, x = 1, s
∗
3
= 1,
= 0.
Again, the optimal value z ^{∗} = 13.
The Simplex Method
In the previous example, we observe the following,
With the exception of z, the variables that appear on the LHS of a dictionary are called basic variables. For example, in dictionary #3, x _{1} , s _{2} , and x _{3} are basic variables.
All other variables that appear on the RHS of a dictionary are called nonbasic variables. Note that nonbasic variables necessarily have a value of 0 in a feasible solution corresponding to a dictionary. For example, in dictionary #3, x _{2} , s _{1} , and s _{3} are nonbasic variables and x _{2} = s _{1} = s _{3} = 0.
Each of the three feasible solutions obtained above is called a basic feasible solution (bfs). Therefore, a bfs has the property that each nonbasic variable has a value of 0. Moreover, two consecutive bfs’s share all but one basic variable, and as such they are called neighboring bfs’s.
The Simplex Method
The simplex method works only with bfs’s and ignores all other feasible solutions.
Note that, a basic feasible solution ≡ corner point.
The Simplex Method
More formally, let’s consider an LP with n variables in its standard form:
max c _{1} x _{1} + c _{2} x _{2} +
s.t.
+ c _{n} x _{n}
= b _{1}
a _{2}_{1} x _{1} +a _{2}_{2} x _{2} ··· +a _{2}_{n} x _{n} = b _{2}
a _{1}_{1} x _{1} +a _{1}_{2} x _{2} ···
+a _{1}_{n} x _{n}
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
a _{m}_{1} x _{1} +a _{m}_{2} x _{2} ··· +a _{m}_{n} x _{n} = b _{m} ···
x _{1} ,
x _{2} ,
x _{n}
≥ 0
The Simplex Method
Deﬁne,
A =
and,
a
a
.
11
21
.
.
.
a m1
.
a
a
.
12
22
.
.
.
a m2
.
···
···
.
.
.
.
···
.
.
a
a
.
1n
2n
.
.
a mn
_{}
c = ^{} c _{1}
x =
c _{2}
···
x
1
x
.
.
.
x
2
n
c _{n}
_{}
Molto più che documenti.
Scopri tutto ciò che Scribd ha da offrire, inclusi libri e audiolibri dei maggiori editori.
Annulla in qualsiasi momento.