Master Problem
Master Problem
1 Systems of
linear inequalities in two
variables.
we proceed as follows:
Step 1. Graph each inequality on the same axes. The solution is
the set of points whose coordinates satisfy all the inequalities of
the system. In other words, the solution is the intersection of
the regions determined by each separate inequality.
Graph of example 5
The graph is the region
which is colored both blue
and yellow. The graph of
the first inequality consists
of the region shaded yellow
and lies below the dotted
line determined by the
inequality −1
y< x+2
2
The blue shaded region is
determined by the graph of
the inequality x − 4 ≤ y
x≥0
y≥0
x ≤ 15
8 x + 8 y ≤ 160
4 x + 12 y ≤ 180
Application
Before we graph this system of linear inequalities, we will
present an application problem. Suppose a manufacturer
makes two types of skis: a trick ski and a slalom ski. Suppose
each trick ski requires 8 hours of design work and 4 hours of
finishing. Each slalom ski 8 hours of design and 12 hours of
finishing. Furthermore, the total number of hours allocated for
design work is 160 and the total available hours for finishing
work is 180 hours. Finally, the number of trick skis produced
must be less than or equal to 15. How many trick skis and how
many slalom skis can be made under these conditions? How
many possible answers? Construct a set of linear inequalities
that can be used for this problem.
Application
Remarks:
Let x represent the number of trick
skis and y represent the number o x≥0 x and y must both be
slalom skis. Then the following positive
system of linear inequalities y≥0 Number of trick skis has to
describes our problem be less than or equal to 15
mathematically. The graph of this x ≤ 15 Constraint on the total
region gives the set of ordered pairs
8 x + 8 y ≤ 160 Constraint on the
number of design hours
8 x + 8 y ≤ 160
4 x + 12 y ≤ 180
x ≥ 0; y ≥ 0
Slack Variable
To use the simplex method of the next section, the constraint
inequalities must be converted to a system of linear equations
by using what are called slack variables. In particular, consider
the two constraint inequalities 8 x + 8 y ≤ 160 To make this into a
4 x + 12 y ≤ 180
a system of two equations, two unknowns, we use the slack variables,
z = 5 x + 10 y
8 x + 8 y ≤ 160
4 x + 12 y ≤ 180
x ≥ 0; y ≥ 0
Basic Solutions and the Feasible
Region
We will start with our linear equations containing the two slack
variables. We will systematically assign two of these variables a zero
(non-basic variables) value and then solve for the remaining two
variables (basic variables). The result is displayed in a table. To
illustrate how the table is constructed, study the example: Assign x = 0
and y = 0 as our non-basic variables. Then 8(0) + 8(0) + s1 = 160 so
s1 = 160. Substitute x = 0 and y = 0 in the second equation to obtain
4(0) + 12(0) + s2 = 180 . This implies that s2 = 180
x y s1 s2 point feasible?
0 0 160 180 (0,0) yes
There are six different rows of the table corresponding to six
different ways you can 2 variables a value of zero out of four
possible variables. The rest of the table is displayed in the next
slide. 8 x + 8 y + s = 160
1
4 x + 12 y + s2 = 180
Table: Basic Solutions
x y s1 s2 Point Feasible
?
0 20 0 -60 (0,20) No
0 15 40 0 (0,15) Yes
45 0 -200 0 (45,0) no
Basic variables are selected arbitrarily with the restriction that there are
as many basic variables as there are equations. The remaining
variables are called non-basic variables.
P = 5 x + 10 y
8 x + 8 y ≤ 160
4 x + 12 y ≤ 180
x ≥ 0; y ≥ 0
Introduce slack variables; rewrite
objective function
First step is to rewrite the system without the inequality
s
symbols and introduce the slack variables, 1 and s 2
8 x + 8 y + s1 = 160
4 x + 12 y + s2 = 180
−5 x − 10 y + P = 0
x, y, s1 , s2 ≥ 0
Represent linear system using
matrix
The variable y was replaced the
x
variable 2
x1 x2 s1 s2 P
s1 8 8 1 0 0 160
s2 4 12 0 1 0 180
P −5 −10 0 0 1 0
Determine the pivot element
x1 x2 s1 s2 P
s1 8 8 1 0 0 160
s2 4 12 0 1 0 180
P −5 −10 0 0 1 0
x1 x2 s1 s2 P
−1
s
3
x1 1 0 0 7.5
16 8
−1 1
x2 0 1 0 12.5
16 8
5 5 275
P 0 0 1
16 8 2
Find the solution
Since the last row of the matrix contains no negative numbers, we can
stop the procedure and find the solution. IF the slack variables are
assigned a value of zero, then we have x= 7.5 and y = x2=12.5. This
is the same solution we obtained geometrically.
x1 x2 s1 s2 P
3 −1
x1 1 0 0 7.5
16 8
−1 1
x2 0 1 0 12.5
16 8
5 5 275
P 0 0 1
16 8 2
5.5 Dual problem: minimization with
problem constraints of the form ≥
Associated with each minimization problem with ≥ constraints is
a maximization problem called the dual problem. The dual problem
will be illustrated through an example. Read the textbook carefully
to learn the details of this method. We wish to minimize the
objective function subject to certain constraints:
C = 16 x1 + 9 x2 + 21x3
x1 + x2 + 3 x3 ≥ 12
2 x1 + x2 + x3 ≥ 16
x1 , x2 , x3 ≥ 0
Initial matrix
We start with an initial matrix , A, corresponds to the problem constraints:
⎡ 1 1 3 12 ⎤
⎢ 2 1 1 16 ⎥
A=⎢ ⎥
⎢16 9 21 1 ⎥
⎢ ⎥
⎣ ⎦
Transpose of matrix A
To find the transpose of matrix A, interchange the rows and columns
so that the first row of A is now the first column of A transpose.
⎡ 1 2 16 ⎤
A =T ⎢1 1 9 ⎥
⎢ ⎥
⎢ 3 1 21 ⎥
⎢ ⎥
⎣12 16 1 ⎦
Dual of the minimization problem is
the following maximization
problem:
Maximize P under the following constraints.
P = 12 y1 + 16 y2
y1 + 2 y2 ≤ 16
y1 + y2 ≤ 9
3 y1 + y2 ≤ 21
y1 , y2 ≥ 0
Theorem 1: Fundamental principle
of Duality
A minimization problem has a solution if
and only if its dual problem has a solution.
If a solution exists, then the optimal value
of the minimization problem is the same
as the optimum value of the dual problem.
Forming the Dual problem with
slack variables x1, x x 2, 3
result:
y1 + 2 y2 + x1 = 16
y1 + y2 + x2 =9
3 y1 + y2 + x3 = 21
−12 y1 − 16 y2 + p = 0
Form the simplex tableau for the
dual problem and determine the
pivot element
The first pivot element is 2 (in red) because it is located in the column with
the smallest negative number at the bottom(-16) and when divided into the
rightmost constants, yields the smallest quotient (16 divided by 2 is 8)
y1 y2 x1 x2 x3 P
x1 1 2 1 0 0 16
x2 1 1 0 1 0 9
x3 3 1 0 0 1 21
P − 12 − 16 0 0 0 0
Divide row 1 by the pivot element
(2) and change the exiting variable
to y2 (in red)
Result:
y1 y2 x1 x2 x3 P
y2 .5 1 .5 0 0 8
x2 1 1 0 1 0 9
x3 3 1 0 0 1 21
P −12 −16 0 0 0 0
Perform row operations to get zeros in the column containing the pivot
element. Identify the next pivot element (0.5) (in red)
-1*row 1 + R2=R2
-1*row1+r3 =r3 y1 y2 x1 x2 x3 P
16*r1+r4 = r4
y2 .5 1 .5 0 0 8
x2 .5 0 −.5 1 0 1
x3 2.5 0 −.5 0 1 13
P −4 0
New pivot element
8 0 0 128
Pivot element
located in this
column
Variable y1 becomes new entering variable
y1 y2 x1 x2 x3 P
y2 .5 1 .5 0 0 8
y1 1 0 −1 2 0 2
x3 2.5 0 −.5 0 1 13
P −4 0 8 0 0 128
More row operations
-0.5*row2 + row1=Row1
-2.5*row 2 + row3=row3
4*row2+row4=row4
y1 y2 x1 x2 x3 P
y2 0 1 1 −1 0 8
y1 1 0 −1 2 0 2
x3 0 0 2 −5 1 8
P 0 0 4 8 0 136
Solution: An optimal solution to a minimization problem can always be
obtained from the bottom row of the final simplex tableau for the dual
problem.
y1 y2 x1 x2 x3 P
y2 0 1 1 −1 0 8
y1 1 0 −1 2 0 2
x3 0 0 2 −5 1 8
P 0 0 4 8 0 136
5.6 Maximization and
Minimization with Mixed
Problem Constraints
Introduction to the Big M
Method
In this section, a generalized version of
the simplex method that will solve both
maximization and minimization
problems with any combination of
≤ ≥ = constraints will be
presented.
Definition: Initial Simplex
Tableau
For a system tableau to be considered an initial
simplex tableau, it must satisfy the following two
requirements:
z 1. A variable can be selected as a basic variable only
if it corresponds to a column in the tableau that has
exactly one nonzero element and the nonzero
element in the column is not in the same row as the
nonzero element in the column of another basic
variable.
z 2. The remaining variables are then selected as non-
basic variables to be set equal to zero in determining
a basic solution.
z 3. The basic solution found by setting the non-basic
variables equal to zero is feasible.
Key Steps of the big M
method
Big M Method: Introducing slack, surplus, and artificial
variables to form the modified problem
z 1. If any problem constraints have negative constants on the
right side, multiply both sides by -1 to obtain a constraint with
a nonnegative constant. (remember to reverse the direction of
the inequality if the constraint is an inequality).
z 2. Introduce a slack variable for each constraint of the form
z
≤
3. Introduce a surplus variable and an artificial variable in
each
≥ constraint.
Maximize P = 3 x1 − 2 x2 + x3
subject to :
x1 − 2 x2 + x3 ≥ 5
− x1 − 3 x2 + 4 x3 ≤ −10
2 x1 + 4 x2 + 5 x3 ≤ 20
3 x1 − x2 − x3 = −15
x1, x2 , x3 ≥ 0
Solution:
1) Notice that the second constraint has a
negative number on the right hand
side. To make that number positive,
multiply both sides by -1 and reverse
the direction of the inequality:
x1 + 3 x2 − 4 x3 ≥ 10
2. The fourth constraint has a negative number
on the right hand side so multiply both sides
of this equation by -1 to change the sign of -
5 to + 15:
−3 x1 + x2 + x3 = 15
Solution continued:
x1 − 2 x2 + x3 ≥ 5 →
x1 − 2 x2 + x3 − s1 + a1 = 5
Solution continued:
4) Do the same procedure for the other
constraint:≥
x1 + 3 x2 − 4 x3 − s2 + a2 = 10
5) Introduce surplus variable for less
than or equal to constraint:
2 x1 + 4 x2 + 5 x3 + s3 = 20
Solution continued:
6) Introduce the third artificial variable for the
equation constraint:
−3 x1 + x2 + x3 + a3 = 15
x1 − 2 x2 + x3 − s1 + a1 = 5
x1 + 3 x2 − 4 x3 − s2 + a2 = 10
2 x1 + 4 x2 + 5 x3 + s3 = 20
−3 x1 + x2 + x3 + a3 = 15
Key steps for solving a problem
using the big M method
Now that we have learned the procedure
for finding the modified problem for a linear
programming problem, we will turn our
attention to the procedure for actually
solving such problems. The procedure is
called the Big M Method.
Big M Method: solving the
problem
1. Form the preliminary simplex tableau for
the modified problem.
2. Use row operations to eliminate the M’s
in the bottom row of the preliminary
simplex tableau in the columns
corresponding to the artificial variables.
The resulting tableau is the initial simplex
tableau.
3. Solve the modified problem by applying
the simplex method to the initial simplex
tableau found in the second step.
Big M method: continued:
P = x1 + 4 x 2 + 2 x 3
Subject to
x 2 + x3 ≤ 4
x1 − x 3 = 6
x1 − x 2 − x 3 ≥ 1
Solution:
Form the preliminary simplex tableau for the
modified problem: Introduce slack variables,
.
artificial variables and variable M
x2 + x3 + s1 = 4
x1 − x3 + a1 = 6
x1 − x2 − x3 − s 2 + a 2 = 1
− x1 − 4 x2 − 2 x3 + Ma1 + Ma2 + P = 0
Solution:
.
x1 x2 x3 s1 a1 s2 a2 P
0 1 1 1 0 0 0 0 4
1 0 −1 0 1 0 0 0 6
0 −1 0 0 −1 −1 1 0 − 5
0 0 1 4 ( M +1) 0 M 1 22
Solution:
x2 = 4
x1 = 6
P = 22
x3 = 0