CHAPTER 2: Solution of LPPs: the graphical methods and the simplex methods# Flashcards

1
Q

Definition 2.1 (The general form of an LPP).

A

We will consider a general LPP with d independent variables:
max(or min) z =
c_1x_1 + c_2x_2 + . . . + c_dx_d

subject to m constraints:
a_{11}x_1 + . . . + a_{1d}x_d ≤ b_1
… .. .. ..
a_{m1}x_1 + . . . + a_{md}x_d ≤ b_m

and x1, x2, . . . xd ≥ 0.

The problem can be written as follows
max(or min) z =
c^Tx
subject to Ax ≤ b, x ≥ 0

where c ∈ R^d
is a constant vector, and
x ∈ R^d

They are vectors with d components:
c = (c1, c2, …, cd)^T and
x = (x1, x2, …, xd)^T
b = (b1, …, bm)^T ∈ R^m

is also a constant vector. A is a constant m × d coefficient matrix whose entries are aij’s.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Definition 2.2. DECISION VARIABLES

A

x1, …, xd are the decision variables,
c is the cost coefficient vector.

b is the resource vector;

bi is the resource of the ith constraint.

c_i is the cost coefficient of decision variable x_i

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Definition 2.3 (Cost function).

A

The function to be minimized or maximized (z in the definition) is called the cost function, or the profit function or the objective function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Definition 2.4 (Feasible region).

A

The set of values for the variables x that satisfy the constraints is called the feasible region (or feasible set) of the problem. In other words, the feasible region is the solution of the
inequalities Ax ≤ b and x ≥ 0. Sometimes we use A to denote the feasible region, i.e.,
A = {x ∈ R^r: Ax ≤ b, x ≥ 0}.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The goal of an LPP is to find an x in the feasible region that maximizes or minimizes z. A few comments about the notations are in order:

A

• x ≥ 0 means xi ≥ 0 for all components i = 1, 2, …, d. Same applies to b ≥ 0 or other similar expressions.

• We have assumed all constraints are ≤ constraints when we write Ax ≤ b.
A ≥ constraint can be converted to a ≤ constraint by multiplying the inequality by −1 . For an = constraint such as LHS = RHS,
we may replace it with two simultaneous constraints LHS ≥ RHS and LHS ≤ RHS.

• We use (Ax)_i
to represent the ith component of the product Ax.

(Ax)i
:= a_{i1}x_1 + a_{i2}x_2 + … + a_{id}x_d

is the left hand side of the ith constraint.

• Vector b is called resource vector because the constraints often represent the limited availability of the
resources in real world examples. In this case, x may represent the production rates of some products,
and

(Ax)_i
is the amount of the ith type of resources consumed by these products.

*prefer less than or equal to constraint

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Graphical Solutions

A

We solve problem with only 2 decision vars x_1, x_2

*For a given value of z, a function like z = c1x1 + c2x2 represents a straight line (contour of the
function z(x1, x2) = c1x1 + c2x2). 

This line will be called a z-line. When we change the z value, we obtain
different z-lines.

There are several simple observations:
• The z-lines are all parallel
• All the points on a z-line give the same z value. eg if 2 points on same line points A And B both give z = z1 = 6, and both points C and D give z = z2 = 18.

• To find where the maximum of
z(x1, x2)

is, we only need to compare the points on different z-lines. For the example given z=2x_1+3x_2 the z-line moves up when z is increased, which means the value of z is larger on the right hand side of a z-line, and smaller on the left.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Example 2.1 (Product-Mix Problem, aka the Reddy-Mikks problem). We will use the graphical method to
solve the problem in Example 1.2.

A

The formulation is as follows: x1 is the amount of paint E produced per day, and x2 is that of paint I. z is the revenue per day. The LPP is:

max z =
3x_1 + 2x_2 (unit £100)

subject to
x1 + 2x2 ≤ 6 
2x1 + x2 ≤ 8 
−x1 + x2 ≤ 1 
x2 ≤ 2 
with x1, x2 ≥ 0

*graph showing constraints giving feasible region
giving irregular hexagonal shape- feasible region is a polygon

  • z-lines for several z values shown 6,9,… : The optimal solution is found on a corner/vertex of the feasible region.
  • A feasible point is optimal in this example if there is no other feasible point on RHS of z-line. So z_max is found at point C as FR only on LHS of z-line passing through this point

solving: x_1 +2x_2=6 and 2x_1+x_2=8
(x_1,x_2) = (10/3, 4/3)
optimal is Z_max= 3(3/10)+2(4/3) = 38/3 ~12.67 (100 pounds unit)

*constraint 1 and 2 2 are binding constraints, whereas 3 and 4 are non-binding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Definition 2.5 (Binding/non-binding constraints).

A

A constraint is binding if the constraint (which in general
is an inequality) becomes an equation at the optimal solution. Otherwise it is non-binding. Graphically, the
boundary of a binding constraint passes through the optimal solution; the optimal solution is found at the intersection of the boundaries of all binding constraints.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

redundant constraint

A

An extreme example of non-binding constraints is a redundant constraint. You can remove a redundant constraint without changing the feasible region.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Definition 2.6 (Slack).

A

Let x be a solution for the LPP, the slack of the ith constraint for the solution is bi − (Ax)i
(recall that the constraints are given by Ax ≤ b).
Remark. The slacks are some of the quantities we may want to calculate in the post-optimality analysis, because they tell us the amount of the resource left from the production of x.

e.g slack was 2-x_2 = 2/3 so if optimal (x_1,x_2) = (10/3, 4/3) from the 4th constraint x_2 ≤ 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Definition 2.8 (Shadow cost).

A

The shadow cost of a constraint is the change in the optimal value of the cost function when the resource for this constraint is increased by 1 unit. More precisely, letting δz_opt denote the change in the optimal cost z_opt when b_i is increased by δb_i , the ith shadow cost is the limit of δz_opt/δb_i when δb_i → 0.

Remark. The shadow cost is also called shadow price, marginal cost or marginal profit.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Example 2.2 (Extensions to the Product-Mix Problem). We consider several extensions to Example 2.1:
1. Referring to Example 2.1, let the price for x1 (paint E) be c1 (in £100), so that the revenue is z = c1x1 + 2x2. How much can we change c1 while the optimal solution for (x1, x2) remains optimal? (i.e., what is
the optimality range for c1?)

  1. Constraint given by Eq. 2.1 is due to the limited availability of raw material A (6 tons/day). Suppose
    the available amount is increased to (6 + δ) tons/day for a small amount δ. What is the optimal strategy
    (x1, x2) and the change in revenue? What is the change for per unit δ? (i.e., what is the shadow cost for
    the constraint?)
  2. If additional material A costs 35£/ton, is it worth buying 1 ton more per day to increase the production?
A

*The optimal sol may not be the point C if c_1 is too large/small e.g if c_1made smaller than 3 the optimal solution is
(smaller x_1, larger x_2)=D

if c_1 made bigger (larger x_1, smaller x_2) = B

solution changes with c_1, slope of the z line decreases with c.

slope of z-line is -c_1/2. Slope BC
(2x_1+x_2=8) is -2 , CD (x_1 +2x_2=6) is -0.5

Thus at these 2 limits c_1=4 and 1 respectively.
*1≤ c_1 ≤ 4 (units 100 pounds/ton)

pounds/ ton range is 100 ≤ c_1 ≤400

(the optimal solution stays until when slopes of Z lines for between those of CD and BC ( -0.5 and -2)

thus slope -2≤ -c_1/2 ≤ -0.5 gives * . optimal range for c, without changing x1, x2.
so if possible we can increase c1 to 4 to increase profits)

2)
for z=3x_1 +2x_2
x_1+2x_2 ≤ 6 becomes
x_1+2x_2 ≤ 6+δ

ie the revenue is increased by δ/3 (100 pounds). Change per unit of δ is 1/3
(unit 100 pounds/ton)`33 pounds

The optimal solution implies new solution at vertex with lower x_1 and larger x_2 than original optimal solution. This does not improve even if we increase δ any further

the optimal solution is still found at the intersection of boundaries of constraints 1 and 2:
thus x_1+2x_2=6+δ

2x1 +x2=8   implies
x_1=(10-δ )/3 
x_2= (4+2δ )/3
implies
z_max= 38/3 + δ/3. The change in z_max is δ/3

ie increasing a by 1 tonne per day increases revenue by £33. Since A costs £35, more than increase in revenue, it’s not worth buying.

shadow cost is 1/3 (unit of z_max/ units of δ )

100/33 ~33 so as shadow cost is smaller than t35 pounds/ton we don’t

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

LPPs with more than two variables: Slack variables

A

Graphical method is useful mostly only for problems with two variables. For problems with more variables,
we need an algebraic method. We introduce the simplex method in this module.

For problems with two decision variables such as the product mix example (Example 2.1), we observe
• that the feasible region is a polygon formed by the intersection of the half-planes defined by the inequality constraints;
• optimal solution is found on a vertex of the polygon.
In general the feasible region is a convex polyhedron (polytope) bounded by hyperplanes; the optimal solution is on a vertex of the polytope.

• How do we know the feasibility of a solution? . For problems with more variables, it is very difficult to visualize the
feasible region

• How do we define a vertex? In two variable problems, the intersection of the boundaries of two constraints
defines a vertex, which can be easily identified visually. How do we know if a point is a vertex without
a graph?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

LPPs with more than two variables: Slack variables 2

A

we need to keep track of the ‘slack’ of a constraint: if the slack is not negative, then
the constraint is satisfied. Thus, we introduce the slack variables to record the ‘slack’ of a constraint at each
step of the calculation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Definition 2.9 (Slack variable).

A

Consider the general LPP defined in Definition 2.1. The slack variable for the
ith constraint is denoted as x_{d+i} , and is defined as follows:
x_{d+i} = b_i − (a_{i1}x_1 + . . . + a_{id}x_d) = b_i − (Ax)_i

where i = 1, 2, …, m corresponding to the m constraints (excluding the conditions x ≥ 0).

Remark. The ‘slack’ defined in the previous section is simply the value of the slack variable for a given solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

FEASIBILITY OF A SOLUTION:

A

A solution is feasible if all variables (both decision and slack variables included) are non-negative.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

CANONICAL FORM notes

A

Using slack variables, the ith constraint becomes an equation:
(Ax)i + x{d+i} = b_i

(i = 1, 2, …, m).

With slight abuse of notations, let 
x = (x_1, x_2, ..., x_d, x_{d+1}, ..., x_{d+m})^T
That is, we now use symbol x to denote the vector including both decision and slack variables.
 The constraints then become [A, I]x = b, where I is
the m × m identity matrix, and [A, I] is a matrix formed by putting A and I side by side. Letting A¯ := [A, I],
the constraints become Ax¯ = b with A¯ being an m × n matrix where n = d + m.
Finally, let c = (c1, c2, ..., cd, cd+1, ..., cd+m)T with cd+1 = cd+2 = ... = cd+m = 0, then the cost function has the
same form as before z = cTx.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Definition 2.10 (Canonical form).

A

The canonical form of the LPP introduced in Definition 2.1 is:
max or min z = c^Tx,

subject to

Ax¯ := [A, I]x = b, x ≥ 0

where, with n = m + d,
x = (x1, x2, …, xd
x_{d+1}, …, xn)^T ∈ R^n

x_{d+1}, …, xn being the slack variables, and
c = (c1, …, cd, c_{d+1}, …, c_n)^T ∈ R^n with
c_{d+1} = c_{d+2} = … = c_n = 0.
b ∈ Rm is the resource vector as in Definition 2.1.

A¯ is an m × n matrix, which is called the extended coefficient matrix.

*we now include slack variables in x but so must make respective c_i’s=0

*canonical form is not
unique. In particular, for problems with = constraints, we may have different canonical forms depending on
how we deal with those constraints. We will normally use the method of artificial variables. In that case, we
do not introduce a slack variable for an = constraint, but introduce an artificial variable instead.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Example 2.3: (Canonical form for the product-mix problem).

The LP problem for Example 2.1 is
max z =3x1 + 2x2, subject to

x1 + 2x2 ≤ 6
2x1 + x2 ≤ 8
−x1 + x2 ≤ 1
x2 ≤ 2
with x1, x2 ≥ 0. Find its canonical form.
A

Solution. The canonical form of the problem is
max z = 3x_1 + 2x_2 + 0x_3 + 0x_4 + 0x_5 + 0x_6

subject to
 x1 + 2x2 + x3                = 6
2x1 + x2 +       x4           = 8
−x1 + x2 +            x5      = 1
         x2 +                 x6 = 2

with x1, x2, . . . , x6 ≥ 0. We have introduced four slack variables x3, x4, x5, and x6.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Example 2.4. Find the canonical form for the following set of constraints:
2x1 + 3x2 ≤ 6
x1 + 7x2 ≥ 4

A

in the canonical form they become:
2x1+3x2 +x3= 6 and
-x1-7x2+x4 = -4

by introducing slack vars x3 and x4

(we must have ≤ to convert to canonical form )

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

geometrical interpretation of slack variables

A

distance from point (x1, x2) to line ax1 + bx2 = c is given by
d =|c − ax1 − bx2|/(√(a^2 + b^2))

Now consider the constraint 2x1 +3x2 ≤ 6 and its canonical form which may be written as x3 = 6−2x1 −3x2.
Therefore, the distance from the point (x1, x2) to the boundary 2x1 + 3x2 = 6 is
|x3|/√13, which gives an
geometrical interpretation of x3. There is a similar relation between other slack variables and the distance
from the solution to the boundary of the corresponding constraints.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

undetermined system

A

we have an undetermined system when more variables than equations

this implies there are infinitely many Solutions i.e. a set of Solutions

( Since a solution is feasible if and only if all the
variables are non-negative)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

d+m vars in m equations

A

d+m vars in m equations we fix d values of the variables to find a unique solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

If we choose d variables and set them to zero, we obtain solutions with a special geometrical interpretation

A

In general, for a problem with d decision variables and m inequality constraints, we have the following observation:

For an LPP with d decision variables, a vertex is a solution to the set of constraints (in its canonical form) with d variables set to zero. These d variables can be either slack or decision variables.

Thus, the vertices of the feasible region of an LPP correspond to certain special types of solutions of the constraints. We have a formal name for this type of solutions. Note that, for an LPP with d decision variables and m constraints, in its canonical form, the constraints Ax¯ = b are a set of m equations with n = m + d variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Example: previous optimal at C solution from graphical methods

A

As we have seen in Example 2.1, the optimal solution is found on vertex C. The coordinates of vertex C is the
solution of the simultaneous equations:
x1 + 2x2 = 6, 2x1 + x2 = 8.
Now, using the canonical form of the problem, the 1st and 2nd constraints are given by
x1 + 2x2 + x3 = 6, 2x1 + x2 + x4 = 8.
Therefore, vertex C is actually the solution of the above equations with the slack variables x3 = x4 = 0.
Similarly, vertex D is the intersection of the boundaries of the 1st and 4th constraints, thus its coordinates are
the solution of the constraints with the slack variables x3 = x6 = 0.
On the other hand, vertex B is the intersection of
x1 + 2x2 = 6, x2 = 0.
Apparently, the first equation is the first constraint with the slack variable x3 = 0. The second equation sets
the decision variable x2 to zero.
Therefore, in Example 2.1 a vertex is the solution of the constraints in the canonical form when two of the
variables (possibly slack or decision variable) are set to zero. This is consistent with the above general statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

Example: previous optimal at C solution from graphical methods

A

As we have seen in Example 2.1, the optimal solution is found on vertex C. The coordinates of vertex C is the
solution of the simultaneous equations:
x1 + 2x2 = 6, 2x1 + x2 = 8.
Now, using the canonical form of the problem, the 1st and 2nd constraints are given by
x1 + 2x2 + x3 = 6, 2x1 + x2 + x4 = 8.
Therefore, vertex C is actually the solution of the above equations with the slack variables x3 = x4 = 0.
Similarly, vertex D is the intersection of the boundaries of the 1st and 4th constraints, thus its coordinates are
the solution of the constraints with the slack variables x3 = x6 = 0.
On the other hand, vertex B is the intersection of
x1 + 2x2 = 6, x2 = 0.
Apparently, the first equation is the first constraint with the slack variable x3 = 0. The second equation sets
the decision variable x2 to zero.
Therefore, in Example 2.1 a vertex is the solution of the constraints in the canonical form when two of the
variables (possibly slack or decision variable) are set to zero. This is consistent with the above general statement.

27
Q

Definition 2.11 (Basic solutions and basic variables).

A

Setting d out of the n variables to zero, we may find a
unique solution to the constraints. This solution is called a basic solution. The d variables that are set as zero are non-basic variables, while the other m variables are called basic variables. The set of basic variables is called the basis.

28
Q

Example:

Feasible region with vertices feasible and infeasible basic Solutions

A

If the basic solution is feasible, it is a basic feasible
solution. Not all basic solutions are feasible, because some of the vertices are formed outside of the feasible region. Graphically, a basic solution is the same as a vertex. Different vertices correspond to different sets of basic/non-basic variables, hence different basis. For example, on vertex A in Fig. 2.6, x1 and x2 are non-basic, x3, x4, x5 and x6 are basic. On vertex B, x2 and x4 are non-basic, whereas the other variables are basic. On vertex F, x1 and x5 are non-basic and the others are basic.

29
Q

feasible and infeasible basic Solutions

Example:
Feasible region with vertices feasible and infeasible basic Solutions

A

diagram shows basic Solutions which are feasible are the intersections of constraints that form the vertices of the feasible region

all other intersections of the constraints and axis ( as given x ≥0 this x1 ≥0 and x2≥0) form infeasible basic Solutions

30
Q

SIMPLEX METHOD

intro:

A

nCd

Since the optimal solution is always found on a vertex, we only need to search through the vertices to find it. However, an exhaustive search is not practical because the number of possible solutions is huge. For a problem with m constraints and d decision variables, there are n = m + d variables and any d variables can be chosen as non-basic. In other words, a vertex can be formed from any d hyperplanes. Thus the number of vertices in
this problem is

n!/[(n − m)!m!]

The efficiency is obtained by, firstly, avoiding the infeasible vertices, secondly, improving the solution at each step of the search. Certain rules have to be followed in order to achieve these two goals. These rules constitute the algorithm of the simplex method.

Since a different vertex corresponds to a different set of basic variables, moving onto a different vertex implies finding a new set of basic variables, with some of the basic variables being replaced by new ones. ie vars ‘entering’ the basis (i.e., the set of basic variables), and some ‘leaving’

31
Q

Simplex method for LPPs with b ≥ 0: the Product-Mix Problem

A

We use the product-mix problem (Example 2.1) to explain the simplex method. The method we introduce in this applies only to problems with b ≥ 0

First tableau-detached coeff form to summarize the canonical form

1) list variables in first row
2) cost function equal zero and coefficients recorded in the Z called reduced costs
3) coefficients of constraints are recorded

Basis|x1 x2 x3 x4 x5 x6| RHS/sol |ratio
    Z  |-3  -2  0  0  0  0 |              0 |
\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
    x3|  1   2   1  0   0  0   | 6 | 6
    x4|  2  1    0  1   0  0   | 8| 4
    x5| -1   1   0  0   1   0   |1  |--
    x6|  0  1   0  0   0  1    |2|--

basic vars (chosen) given in rhs col

choosing entering variable x1:

pivot row chosen as 2 in this column, to choose x1 to enter and x4 to leave

32
Q

ith unit vector

A

Vectors of the form [0, 0, …, 0, 1, 0, …, 0]^T will appear frequently. We call it the ith unit vector if 1 is the ith component.

33
Q

Starting basis: For LPPs with b ≥ 0,

A

*In order to start the iteration, we need to find the starting basic feasible solution, which means we need to choose the first set of basic variables (i.e., the first basis). There is NO restriction to the choice other than that the solution has to be feasible (i.e., have to be non-negative)

Starting basis: For LPPs with b ≥ 0, we can (and will) always choose the slack variables as the starting basic variables and the decision variables as the non-basic variables. In so doing, the first number in the RHS/Sol column becomes the value of the cost function, and the other numbers becomes the solutions to the basic variables. As long as b ≥ 0, the basic solution chosen this way is guaranteed to be feasible

*The reason behind choosing the slack variables x3, …, x6 as the starting basic variables is that the columns for them form an identity matrix. Therefore, letting x1 = x2 = 0, the solutions for x3 to x6 can be read off from the RHS/Sol column, i.e., x3 = 6, x4 = 8, x5 = 1 and x6 = 2, which is feasible

34
Q

SIMPLEX METHOD

continued b ≥ 0,

A

As x1 = x2 = 0, the solution for z has to be 0 since z = 3x1 + 2x2 by definition. This value is correctly given by the number at the intersection of the z-row and the RHS/Sol column in the tableau.

Therefore, the numbers in the RHS/Sol column are the solutions to the basic variables and the corresponding solution for z. More importantly, they remain so if we apply the simplex algorithm correctly. For this reason, we use

‘RHS/Sol’ as the title of the column (rather than RHS). We will simply use ‘Sol’ or ‘Solution’ in the future. To keep track of the basic variables, we write the basic variables x3 to x6 in the first column, each in the row corresponding to its solution. The column is labelled ‘Basis’. Variables not listed in the ‘basis’ column are implicitly considered non-basic

35
Q

entering variable : For LPPs with b ≥ 0,

A

Obviously the solution for z is not yet optimal, so we need to find a better basic solution to improves the cost function. which means we need to find a new set of basic variables (i.e. a new basis).

In the simplex method, we update the basis by replacing only one basic variable in an iteration. Therefore, we choose one of the basic variables to leave the basis, and one of the current non-basic variables to enter. We choose the entering variable first.

The goal is to increase the cost function z. We have the simple fact that, when a variable becomes basic, its value will be increased from zero to a positive number. On the other hand, if a variable becomes non-basic, its value will be set to zero. How z will change depends on the cost coefficients of the variables. For the current problem, we have to choose the entering variable from x1 and x2. z may be increased by increasing either x1 or x2, since z = 3x1 + 2x2 and both cost coefficients are positive. Thus we may choose either one of them to enter. Because the cost coefficient of x1 is larger, we will choose x1 to enter. If we are working on a piece of paper, we usually mark the x1 column with an arrow on the top.

Now note that a positive cost coefficient in the cost function corresponds to a negative reduced cost in the z row in the tableau. Therefore the above argument can be rephrased in terms of the reduced costs, and traditionally it is indeed phrased in terms of the latter.

*so we choose the most negative ie maximum reduced cost

36
Q

Optimality condition:

Pivot column:

A

Optimality condition: For a maximisation problem, as long as some of the reduced costs are negative, the cost can still be improved, by choosing a variable with a negative reduced cost as the enter variable. The solution is optimal if and only if all reduced costs are non-negative. This condition is the optimality condition for a maximisation problem. If more than one reduced costs are negative, we usually choose the one with largest magnitude (the so-called “Dantzig’s rule”). If two reduced costs are the same, either of the two corresponding variables can be chosen, i.e., tie is broken arbitrarily.

Pivot column: The column corresponding to the entering variable is called the pivot column.

37
Q

First tableau: the leaving variable b ≥ 0,

A

The criterion for choosing the leaving variable is to make sure the new basic solution is feasible. The rules to achieve this are less intuitively obvious, therefore we will give the rules first and explain ‘why’ later.

  1. We divide the ‘solutions’ (given in the Sol column) by the coefficients in the pivot column, skipping
    negative or zero coefficients. The results are put in the ‘ratio’ column.
  2. The basic variable corresponding to the smallest ratio is chosen as the leaving variable. Conventionally,
    we mark the row by an arrow.

Here, x4 is the leaving variable.

38
Q

Ratios:

Feasibility condition:

Pivot row:

A

Ratios: the ratios of the basic variables are defined as the solutions divided by the coefficients in the pivot column. We calculate the ratio for a variable only if its coefficient in the pivot column is positive. A variable has no ratio if its coefficient is either zero or negative.

Feasibility condition: The condition that the variable with the smallest ratio enters is called the feasibility condition.

If two variables have the same smallest ratio, either one can be chosen to leave.
Pivot row: The row corresponding to the leaving variable is called the pivot row.
Pivot: The coefficient on the intersection of the pivot column and the pivot row is called the pivot.

39
Q

First tableau: generating new tableau:z-row

A

x2 remains as 0, non basic
(new set of basis x3,x1,x5,x6)
x_4 leaving var
z-row-3 -2

entering variable x_1 is non basic:

Basis| x1 x2 x3 x4 x5 x6 |Sol| Ratio
z| -3 -2 0 0 0 0 |0 | |
x3| 1 2 1 0 0 0 |6 | 6 |
x4| 2 1 0 1 0 0 |8 | 4 |
x5| -1 1 0 0 1 0 |1 | - |
x6| 0 1 0 0 0 1 |2 | - |

Table 2.2: First tableau: updating ratios

*pivot column and pivot row intersection is our pivot, here its 2 (x1 and x4 intersection) we circle the pivot

we start a new tableau with new basic variables in the first column ie replacing x1 by x4
we generate the new tableau by:
* dividing pivot row by the pivot and inputting this new data in x1 row for 2nd tableau (normalization). We ignore the ratio column

  • all other coeffs in the pivot column in the first tablueau to 0 by adding multiples of the new pivot row in 2nd tableau to the rows in the first tableau (pricing out)
  • we put the result into corres rows in new tableau, for all rows including z-row

example:

  • row for pivot / pivot 2
  • pivot column to 0 by multiples of NEW pivot row:

z-row + 3*(x_1-row)
x_3-row - x_1row
x_5-row + x_1row
x_6 +0
Basis| x1 x2 x3 x4 x5 x6 |Sol| Ratio
z| 0 -1/2 0 3/2 0 0 |12 | |
x3| 0 3/2 1 -1/2 0 0 |2 | |
x1| 1 1/2 0 1/2 0 0 |4 | |
x5| 0 3/2 0 1/2 1 0 |5 | |
x6| 0 1 0 0 0 1 |2 | |

The 2nd tableau:
shows that the new basic variables are x3, x1, x5 and x6,
and x2 and x4 are the new non-basic variables.

The coefficients for the basic variables again form an identity matrix. Hence,setting the non-basic variables to zero, we may read off the solutions for the basic variables from the ‘Sol’ column:

x1 = 4, x3 = 2, x5 = 5 and x6 = 2.

The cost function corresponding to this basic solution is 12, also given in the ‘Sol’ column

40
Q

2nd tableau notes:

A

Two observations about the tableaux: • The reduced costs for the basic variables are all zero. • The coefficients for the basic variables in the constraints form an identity matrix.

41
Q

Second tableau: stop or continue?

Is the second tableau already optimal?

Basis| x1 x2 x3 x4 x5 x6 |Sol| Ratio
z| 0 -1/2 0 3/2 0 0 |12 | |
x3| 0 3/2 1 -1/2 0 0 |2 | |
x1| 1 1/2 0 1/2 0 0 |4 | |
x5| 0 3/2 0 1/2 1 0 |5 | |
x6| 0 1 0 0 0 1 |2 | |

A

By the optimality condition, we see that it is not, because the z-row still contains a negative reduced cost (that of x2). Thus, the solution can be improved further

if x2 is chosen to enter as a basic variable. Another iteration is needed.

We follow the same procedure as above:

  1. x2 is chosen as the entering variable because it has a negative reduced cost.
  2. Enter the ratios into the tableau, found by dividing the numbers in the Sol column by those in the x2 column.

Basis| x1 x2 x3 x4 x5 x6 |Sol| Ratio
z| 0 -1/2 0 3/2 0 0 |12 | |
x3| 0 3/2 1 -1/2 0 0 |2 | 4/3 |
x1| 1 1/2 0 1/2 0 0 |4 | 8 |
x5| 0 3/2 0 1/2 1 0 |5 | 10/3 |
x6| 0 1 0 0 0 1 |2 | 2 |

  1. The smallest ratio occurs in the x3 row, so x3 leaves the basis and 3/2 is the pivot.
  2. Create a new tableau (the 3rd tableau)and perform the pivoting step to produce the new solution
    (x2 enters)

pivot circled: 3/2 intersection of x3 row and x2 col in original table
mark entering arrow x2 col
new table:

  • dividing pivot row by pivot
  • making pivot col (x2) 0

z-row + 0.5*(x_2-row)
x_1-row - 0.5x_2row
x_5-row - (3/2) x_2row
x_6 - x2-row

Basis| x1 x2 x3 x4 x5 x6 | Sol | Ratio
z| 0 0 1/3 4/3 0 0 |38/3 | |
x2| 0 1 2/3 -1/3 0 0 |4/3 | |
x1| 1 0 -1/3 2/3 0 0 |10/3 | |
x5| 0 0 -1 1 1 0 | 3 | |
x6| 0 0 -2/3 1/3 0 1 |2/3 | |

In the third tableau, all the reduced costs are either positive or zero, so the solution cannot be improved further, and we have found the optimal solution. The optimal cost is z_max = 38/3 with basic variables x1 = 10/3, x2 = 4/3, x5 = 3, x6 = 2/3, and non-basic variables x3 = x4 = 0.

x3 and x4 are the slack variables for the first two constraints. x3 = x4 = 0 shows that the two constraints are binding. ⇒The optimal solution is at the intersection of the first two constraints

The solution for the decision variables (x1,x2) from the 1st to the 3rd tableaux are (0,0), (4,0), and (10/3,4/3). Comparing with the graphical solution, we can see that the simplex iteration moves from vertex A to B, and then C

42
Q

Comparison with the graphical solution

A

simplex method example:
The solution is the same as what we found before using graphical methods

*if we follow algorithm reduced costs must be 0

43
Q

SUMMARY:

Algorithm 2.1 (Simplex method for maximisation LPPs with b ≥0)

A

The simplex method for a maximisation LPP with b ≥ 0 starts by choosing the decision variables as the first set of non-basic variables (correspondingly, the slack variables as the basic variables). Then, the solution is updated according to the following steps: z-row negative

  1. Choose the variable with a negative reduced cost that has the largest magnitude to enter.
    The corresponding column is called the pivot column.
  2. Calculate the ratios of the solutions of the basic variables to the coefficients in the same row in the pivot column, skipping the negative or zero coefficients.
  3. The basic variable with the smallest ratio leaves. The corresponding row is called the pivot row.
  4. The intersection of the pivot row and column is the pivot element. Using the pivot row and the pivot element to perform Gauss-Jordan elimination to update the tableau.
  5. Repeat the above steps until all reduced costs are non-negative.
44
Q

Simplex method explained in terms of equations

A
  • constraints ¯ Ax = b are a set of under-determined equations with m equations, n = m+d variables
  • So a solution can be written as a function of d variables; we can choose any d variables and solve the other m vars as functs of chosen r vars

in simplex method: non basic vars are these r vars.
The elimination is solving the basic variables in terms of the non-basic ones, and then substituting the basic variables out of the cost function z. So basic vars, cost funct are given as functs of the non basic vars, sols read off when non-basic set to 0.

45
Q

‘Ratio’ further explained

A

The variable with the smallest ratio is chosen to leave because, otherwise, some of the remaining basic variables would become negative, and the solution would be infeasible

Let x_e be entering and x_l leaving, and x_i any var different form x_l. considering selected cols and rows from tableau for numbers a,c,b,d

Basis xe Sol Ratio
xi a b b/a
xl c d d/c

→
Basis xe Sol  
   xi     a    b 
   xe     1  d/c 
→

Basis xe Sol
xi 0 b−a(d/c)
xe 1 d/c

from the first partial tableau , 2nd intermed after pivot row update and third result after x_i updated.

In order to remain feasible : b−a(d/c) ≥0,

if a bigger than 0 then b/a ≥ d/c,
ie for x_l (d/c) must be no bigger than x_i
Since xi isarbitrary,itmeans the ratio for x` must be the smallest

if a ≤ 0, then the new solution for xi will always be feasible, therefore there is no need to consider its ratio

46
Q

More examples for the simplex method Example 2.5. Find the optimal solution for LPP maxz = 5x1 +4x2, subject to x1,x2 ≥0 and 6x1 +4x2 ≤24 x1 +2x2 ≤6 −x1 + x2 ≤1 x2 ≤2

A

Solution. Canonical form with slack variables
x3, x4, x5, x6 is 6x1 +4x2 + x3 = 24,
x1 +2x2 + x4 = 6,−x1 + x2 + x5 = 1,
x2 + x6 = 2.

The simplex calculation is as follows:
Basic x1 x2 x3 x4 x5 x6 Sol Ratio 
z −5 −4 0 0 0 0 0 
x3 6 4 1 0 0 0 24 4 
x4 1 2 0 1 0 0 6 6 
x5 −1 1 0 0 1 0 1 − 
x6 0 1 0 0 0 1 2 --
Basic x1 x2 x3 x4 x5 x6 Sol Ratio 
     z 0 −2/3 5/6 0 0 0 20 
    x1 1 2/3 1/6 0 0 0 4 6 
   x4 0 4/3 −1/6 1 0 0 2 3/2 
   x5 0 5/3 1/6 0 1 0 5 3 
  x6 0 1 0 0 0 1 2 2

Basic x1 x2 x3 x4 x5 x6 Sol Ratio

z 0 0 3/4 1/2 0 0 21 --
x1 1 0 1/4 −1/2 0 0 3 --
x2 0 1 −1/8 3/4 0 0 3/2 --
x5 0 0 3/8 −5/4 1 0 5/2 --
x6 0 0 1/8 −3/4 0 1 1/2 --
47
Q

Simplex algorithm for minimisation problems with b≥0

A

A minimisation problem with b ≥ 0 can be solved using the simplex method with some change to the optimality condition:

  • The starting basic feasible solution is chosen in the same way.
  • Instead of choosing the variable with the most negative reduced cost to enter, we now choose the one with the largest positive reduced cost.
  • Solution is optimal when all reduced costs are either negative or zero.
  • The leaving variable is chosen in the same way as for a maximisation problem. In particular, at any stage, the variable with the smallest ratio leaves.
48
Q
Example 2.6. Minimise z = −5x1−4x2 subject to 
6x1 +4x2 ≤24 
x1 +2x2 ≤6 
−x1 + x2 ≤1 
x2 ≤2 
with x1,x2 ≥0
A

Solution.

Minimise z = −5x1−4x2 subject to

We introduce slack variables x3, x4, x5, x6, and write the constraints as
6x1 +4x2 + x3 = 24
x1 +2x2 + x4 = 6
−x1 + x2 + x5 = 1
x2 + x6 = 2
Then we use the simplex method with above modification. Some calculations in the first tableau are given below. Note that it is not yet optimal

Basis| x1 x2 x3 x4 x5 x6 |Sol| Ratio
z| 5 4 0 0 0 0 |0 | |
x3| 6 4 1 0 0 0 |24 | 4 |
x4| 1 2 0 1 0 0 |6 | 6 |
x5| -1 1 0 0 1 0 |1 | – |
x6| 0 1 0 0 0 1 |2 | – |

choose entering variable: x1, reduced costs largest and choose x3 to leave as the lowest ratio of sol/entering

Basis| x1 x2 x3 x4 x5 x6 |Sol| Ratio
z| 0 2/3 -5/6 0 0 0 |-20 | |
x1| 1 2/3 1/6 0 0 0 | 4 | |
x4| 0 4/3 -1/6 1 0 0 |2 | |
x5| 0 5/3 1/6 0 1 0 |5 | |
x6| 0 1 0 0 0 1 |2 | |

49
Q

LPPs with negative resources or with≥constraints: artificial variables

A

If some components of b are negative, some modifications are needed.

  • The difficulty: no obvious starting solutions.
  • If bi < 0 for the ith constraint, we may multiply the constraint by−1 to turn its right hand side to−bi. Doing so for each of such constraints, we obtain an LPP with only positive resources, but some of its constraints are ≥ inequalities. Therefore what we need then is a way to deal with problems with ≥ constraints and simultaneously positive b. For these problems, if we try to use the canonical form and apply the simplex method in the previous sections, we see immediately that there is a problem: there is no obvious starting basic feasible solution.
50
Q

Example 2.7 (Artificial variables) Consider problem max z = x1 +5x2, subject to
3x1 +4x2 ≤ 6
2x1 +3x2 ≥ 2 (or equivalently −2x1−3x2 ≤−2)

x1,x2 ≥ 0

A

The constraints become:
3x1 +4x2 +x3 = 6
−2x1−3x2 +x4 = −2

after introducing slack vars x2 and x4.

The coefficient matrix contains no unit matrix, hence there is no obvious feasible basic solution to start the calculation. If we proceed as before and choose the decision variables as the non-basic variables, we have x3 = 6 and x4 = −2, which is infeasible.

( ≥ constraint surplus variable, because in this case it represents the ‘surplus’ of the left hand side)

51
Q

Artificial variables:

Example 2.7 (Artificial variables) Consider problem max z = x1 +5x2, subject to
3x1 +4x2 ≤ 6
2x1 +3x2 ≥ 2 (or equivalently −2x1−3x2 ≤−2)

x1,x2 ≥ 0

The constraints become:
3x1 +4x2 +x3 = 6
−2x1−3x2 +x4 = −2

A

The idea is to introduce an artificial variable x5 ≥ 0 for the ≥ constraint, so that the constraints are written as 3x1 +4x2 + x3 = 6
2x1 +3x2 −x4 + x5 = 2

This now (formally) has a starting basic feasible solution (x3,x5) = (6,2), with x1, x2, x4 chosen as the non basic variables.

We then have to modify the previous (basic versions of) the simplex algorithms to eliminate the effects of the artificial variables. To achieve this, we can use either the M-method or the two-phase method. In both methods, the algorithms make sure that the values of the artificial variables are reduced to zero during the iterations, so that the optimal solution for the modified problem is also optimal for the original problem

52
Q

The M-method [Not assessed]
Example2.8(M-method). ForExample2.7,we attach to z a term−M_{x5} where M is a large positive constant ,we thus solve LPP
max z = x1 +5x2−M_{x5},

subject to the constraints prev found
3x1 +4x2 + x3 = 6
2x1 +3x2 −x4 + x5 = 2

A

We then may solve the problem using the simplex method as usual. If M is sufficiently large ,it is obvious that x5 = 0 at the optimal solution. Remark. We need to add an extra term in the cost function for each artificial variable. The M-method is simple, however, the large M may introduce large numerical errors if the solution is done by computer.

53
Q

Two-Phase Method

A

The two-phase method is superior to the M-method because it does not need to introduce large numbers. The two-phase method consists of two phases. Consider a maximisation problem as an example.

In phase 1,
we introduce an auxiliary cost function, w, the sum of all artificial variables,

then minimize w using the standard simplex algorithm, subject to the constraints for the original problem with artificial variables included.

Usually, we will be able to find that the minimum of this auxiliary problem is 0, (obtained when the artificial variables are all zero.)The solution for the other variables then provides the starting basic feasible solution for the original LPP.

In phase 2,
we then solve the original LPP starting from the optimal tableau of phase 1, with the w-row replaced by the z-row.

Remark. In phase 1, we can also solve a maximisation problem if we defined the auxiliary cost function as minus of the sum of the artificial variables.

54
Q
Example 2.9. Find the optimal solution to the following LPP with the two-phase method: 
max  z = x1 +5x2, 
subject to 
3x1 +4x2 ≤6 
−2x1−3x2 ≤−2 
with x1,x2 ≥0.
A

Solution. Introducing slack variables x3 and x4, the canonical form of the constraints become
3x1 +4x2 + x3 = 6
−2x1−3x2 + x4 = −2
We then reverse the direction of the 2nd constraint and introduce an artificial variable x5, and obtain
3x1 +4x2 + x3 = 6
2x1 +3x2 −x4 + x5 = 2

Phase 1: min w = x5. After preprocessing:
We consider an auxiliary LPP min w = x5,subject to the above same constraints. We use the standard simplex method, starting with the following tableau:

Basis| x1 x2 x3 x4 x5 |Sol| Ratio
w| 0 0 0 0 -1 |0 | |
x3| 3 4 1 0 0 |6 | |
x5| 2 3 0 -1 1 |2 | |

The tableau suggests that the starting BFS is x3 = 6 and x5 = 2 with others being zero. However, it means w = x5 = 2 which is different from the solution for w given in the tableau. The inconsistency happens because the numbers in the ‘Sol’ column are actually the ‘right hand sides’ of the equations. The two are not the same in this case, because the reduced cost for x5 is not zero, i.e., we have not substituted x5 out of the cost function as we should have.

For this reason we need a preprocessing step(called pricing out),to eliminate the reduced costs for the basic variables by row operations.

In this case, we add the x5 row to the w row, and obtain

Basis| x1 x2 x3 x4 x5 |Sol| Ratio
w| 2 3 0 -1 0 |2 | |
x3| 3 4 1 0 0 |6 |3/2 |
x5| 2 (3) 0 -1 1 |2 | |

Basis| x1 x2 x3 x4 x5 |Sol| Ratio
w| 0 0 0 0 -1 |0 | |
x3| 1/3 0 1 4/3 -4/3 |10/3| |
x2|2/3 1 0 -1/3 1/3 |2/3 | |

The reduced costs in the last tableau are all non-positive, therefore the solution is already optimal (since it is a minimisation problem). wmin = 0, therefore we can proceed to phase 2. Because x5 is not part of the basis in the optimal tableau of phase 1, we can remove the x5 column (though we do not have to). The tableaux for phase 2 are

(dont forget negstive, max problem)
Basis| x1 x2 x3 x4 |Sol| Ratio
z| -1 -5 0 0 |0 | |
x3| 1/3 0 1 4/3 |10/3 | |
x2| 2/3 1 0 -1/3 |2/3 | |

Basis| x1 x2 x3 x4 |Sol| Ratio
z| 7/3 0 0 -5/3 |10/3 | |
x3| 1/3 0 1 (4/3) |10/3| 5/2|
x2|2/3 1 0 -1/3 |2/3 |– |

Basis| x1 x2 x3 x4 |Sol| Ratio
z| 33/12 0 5/4 0 |15/2 | |
x4| 1/4 0 3/4 1 |5/2 | |
x2|3/4 1 1/4 0 |3/2 | |

(circled)

We had a pre-processing step and the none simplex iteration before finding the last optimal tableau. Therefore the optimal solution is x2 = 3/2 and x4 = 5/2 with x1 = x3 = 0 and the optimal cost is z_{max} = 15/2.

55
Q

Example 2.9. NOTES

A

solution procedure illustrated graphically: feasible region of the original problem is ABCD.

in phase 1 the auxiliary LPP solves region OAD. The first basic solution corresponds to point O.

The optimal solution for phase 1 is vertex D, which is a feasible vertex for the original LPP. In phase 2, we start from vertex D and move on to vertex C, which gives the feasible optimal solution.

drawing:

56
Q

summarize the key points specific to the two-phase method

2-phase method: artificial variable for each constraint.. not assessed

A

• We need to introduce an artificial variable for each one of the following constraints: 1. ‘≤’ constraints with negative resources, i.e., with bi < 0.

  1. ‘≥’ constraints with positive resources bi > 0.
  2. ‘=’ constraints (note that no slack variable is needed for = constraints).
  • The starting tableau for phase 2 is the optimal tableau of phase 1 with the columns for the artificial variables removed, and the w-row replaced by the z-row.
  • We need a pre processing step in both phases ,in which we use the constraints and row operations to turn the reduced costs (i.e., the coefficients in the z-row or w-row) of the basic variables to zero.
57
Q

Example 2.10. Find the optimal solution of LPP min z = 6y1 +8y2 +y3 +2y4
subject to yi ≥0 for all i and
y1 +2y2−y3 ≥3
2y1 +y2 +y3 +y4 ≥2

(IMPORTANT: 2 phase model key thing we need to learn)

A

not covered in lecture but solution and procedure explained, left as exercise:

Solution. With slack and artificial variables introduced, this is a problem with 2 constraints and 8 variables. The constraints become y1 +2y2−y3−y5 +y7 = 3
2y1 +y2 +y3 +y4−y6 +y8 = 2 where y7 and y8 are artificial variables. For phase 1 the objective is minimizing w = y7 +y8. The 1st tableau is

y1 y2 y3 y4 y5 y6 y7 y8 Solution
w 0 0 0 0 0 0 −1 −1 0
y7 1 2 −1 0 −1 0 1 0 3
y8 2 1 1 1 0 −1 0 1 2

The starting BFS is y7 = 3 and y8 = 2 (The coefficients of the two variables form an identity matrix). But the tableauisnotconsistent,becauseifwesubstitutey7 andy8 into the cost function we get w = y7 +y8 = 5instead of 0 in the solution column. The inconsistency happens because the numbers in the ‘solution’ column are actually the ‘right hand sides’ of the equations. The two are not the same in this case. We need a pre-processing step (called pricing out), to eliminate the cost coefficients for the basic variables by row operations, y7 and y8 in this case. It is done by adding the y7 and y8 rows to the w row.

Basic y1 y2 y3 y4 y5 y6 y7 y8 Solution
w y7 1 2 −1 0 −1 0 1 0 3
y8 2 1 1 1 0 −1 0 1 2

The rest of Phase 1 follows the standard simplex method. Note we are seeking the minimum, thus the variable with the largest coefficient on the w-row is the entering variable. Also we stop the iterations when the coefficients in the w row are all negative or zero. The entering variable is y1. The leaving variable is y8. The second tableau is:

Basic y1 y2 y3 y4 y5 y6 y7 y8 Solution 
w 0 3/2 −3/2 −1/2 −1 0.5 0 −3/2 2 
y7 0 3/2 −3/2 −1/2 −1 1/2 1 −1/2 2 
y1 1 1/2 1/2 1/2 0 −1/2 0 1/2 1 
y2 enters, while y7 leaves. The third tableau is: 

Basic y1 y2 y3 y4 y5 y6 y7 y8 Solution
w 0 0 0 0 0 0 −1 −1 0
y2 0 1 −1 −1/3 −2/3 1/3 2/3 −1/3 4/3
y1 1 0 1 2/3 1/3 −2/3 −1/3 2/3 1/3

The minimum is wmin = 0 with y7 = y8 = 0. So we move onto phase 2, where we want to minimize z = 6y1 +8y2 +y4 +2y4.

Phase 2 continues from the optimal tableau of phase 1, with the y7 and y8 columns removed and the w-row replaced by the z-row.

Basic y1 y2 y3 y4 y5 y6 Solution
z −6 −8 −1 −2 0 0 0
y2 0 1 −1 −1/3 −2/3 1/3 4/3
y1 1 0 1 2/3 1/3 −2/3 1/3

We again need a preprossessing step. y1 andy2 are the basic variables. Before starting the simplex iteration , we need to convert the coefficients of y1 and y2 in the z row to zero by row operations. The result is the following tableau:

Basic y1 y2 y3 y4 y5 y6 Solution
z
y2 0 1 −1 −1/3 −2/3 1/3 4/3
y1 1 0 1 2/3 1/3 −2/3 1/3

The tableau is already optimal: zmin = 38/3, with y1 = 1/3, y2 = 4/3 and others zero.

58
Q

REMARK Example 2.10

A

Remark. The removal of the artificial variables at the beginning of phase 2 is actually optional, and it is valid only when all the artificial variables are non-basic. If one or more of the artificial variables are basic ,the following steps have to be taken first:

Step 1 Select a basic artificial variable to leave the basis. Call its row the pivot row. The entering variable can be any non-basic non-artificial variable with a non-zero coefficient on the pivot row. Then perform the Gaussian Jordan row elimination step.

Step 2 Now the artificial variable is no longer basic so the corresponding column can be removed. Repeat the above to remove all the artificial variables then move on to Phase 2.

If the problem is feasible, the artificial variable can remain as basic only when the problem is degenerate. In this case, the solution to the artificial variable is 0. Therefore the Gaussian elimination in Step 1 does not change the optimal solution, which remains zero.

59
Q

Dual simplex algorithm

A

*solve some problems with negative b
*in the sensitivity analysis of LPPs we quite often come across a tableau in the following form
x1 x2 x3 x4 solution
z 0 1/2 1/2 0 3/2
x1 1 1/2 −1/2 0 3/2
x4 0 −3/2 −1/2 1 −3/

The z-row shows that the tableau is formally optimal in the sense that all the reduced costs rj ≥ 0 (assuming it is a maximisation problem). However, the tableau is infeasible: some values in the solution column are negative.

Such a tableau may appear when some of the parameters in the LPP are changed rendering the optimal solution infeasible. To find the feasible solution of the new LPP, the dual simplex method can be used. The method can start from the optimal but infeasible tableau, hence avoids the need to redo the calculation from the beginning.

60
Q

Algorithm 2.2 (Dual simplex method for BOTH maximisation and minimisation problems).

used when

the tableau:
satisfies optimality but solution is infeasible

optimal: reduced costs are non negative / non positive if maximization/minimization

A

If the tableau for a LPP satisfies the optimality condition of the simplex method, but the solution is infeasible, one may find the feasible optimal solution by the following dual simplex algorithm:

  1. Choose an infeasible basic variable to leave the basis. Usually we choose the one whose solution is negative with the largest magnitude. This row is called the pivot row. (we usually choose entering variable but in this algorithm leaving first)
  2. Calculate the ‘ratios’ of the reduced costs for the non-basic variables to the coefficients in the pivot row in the same columns.

Do so only for the non-basic variables with negative coefficients in the pivot row; ignore the positive or zero ones. (Note the definition for ratio is different here. Choosing negative coefficients ensures the entering variable will take positive value hence be feasible. The ratios are thus all negative for a maximisation problem and positive for a minimisation problem.) z element/ pivot row element for non-basic

  1. The column for which the absolute value of the ratio is the smallest is the pivot column. The corresponding variable is the entering variable.
    (Choosing the ratio with smallest magnitude ensures the optimality condition is maintained)
  2. The coefficient on the intersection of the pivot column and the pivot row is the pivot element. Use the pivot element and the pivot row to perform Gauss-Jordan eliminations to update the basis and the tableau.
  3. Repeat the above steps until the solution is feasible.
61
Q

Example 2.11. Use the dual simplex method to recover the feasible solution from the following optimal tableau:

x1     x2    x3  x4  solution  z   0    1/2    1/2  0   3/2  x1  1     1/2 −1/2  0    3/2    x4 0 −3/2 −1/2   1  −3/2
A

Solution. Following the above rules, we find the ratios for x2 and x3, which are −1/3 and −1, respectively. The following new tableau is obtained after one iteration
(x4 leaves and x2 enters):

    x1     x2    x3  x4  solution    z     0     0     1/3  1/3     1    x1    1      0 −2/3  1/3      1      x2   0     1     1/3? -2/3     1   

The tableau is now optimal and also feasible. The optimal solution is x1 = 1, x2 = 1, x3 = x4 = 0 and z = 1.

62
Q
Example 2.12. Use the dual simplex method to find the solution for the following LP problem:
min v = 6y1 +8y2 +y3 +2y4
subject to
y1 +2y2−y3 ≥3 
2y1 +y2 +y3 +y4 ≥2 
yi ≥0, for all i 

change to less than or equal to)

A

Solution. We start from the canonical form:
−y1−2y2 +y3 +y5 = −3
−2y1−y2−y3−y4 +y6 = −2 If we use the two-phase method, we need to write the constraints in the following form
y1 +2y2−y3−y5 = 3
2y1 +y2 +y3 +y4−y6 = 2 and introduce artificial variables, and solve an auxiliary problem in phase 1 to find the starting BFS. However, the dual simplex method does not require the solution to be feasible. So we can start the tableau calculation directly. We may just try to put together the tableau:

we don’t have to use 2 phase

Basis y1 y2 y3 y4 y5 y6 Sol
v −6 −8 −1 −2 0 0 0
y5 −1 −2 1 0 1 0 −3
y6 −2 −1 −1 −1 0 1 −2

Luckily, the tableau is formally optimal ,since the reduced costs are all non-positive (note this is a minimisation problem). Therefore the dual simplex method is applicable. The starting basic solution is then y1 = y2 = y3 = y4 = 0, and y5 = −3, y6 = −2. Therefore y5 leaves. The relevant ratios are 6 and 4 for y1 and y2, respectively. Thus y2 enters. The new tableau is:
Basis y1 y2 y3 y4 y5 y6 Sol
v −2 0 −5 −2 −4 0 12
y2 1/2 1 −1/2 0 −1/2 0 3/2
y6 −3/2 0 −3/2 −1 −1/2 1 −1/2
y6 leaves and y1 enters.

Basis y1 y2 y3 y4 y5 y6 Sol
v 0 0 −3 −2/3 −10/3 −4/3 38/3
y2 0 1 −1 −1/3 −2/3 1/3 4/3
y1 1 0 1 2/3 1/3 −2/3 1/3 which is optimal and feasible.

63
Q

dual simplex algorithm notes:

A

Remark. The name ‘dual simplex’ has to do with the fact that the feasibility of a LPP is the same as the optimality of its dual LPP. Duality will be discussed later.

Calculating only the ratios with negative coefficients in the pivot row means choosing the entering variables from those with negative coefficients. This ensures the entering variable will be feasible. Choosing the variable with the smallest ratio (in magnitude) to enter ensures the optimality condition is maintained.