ch3 Linear-Programming
ch3 Linear-Programming
Step 1: Formulate the linear model of the real world problem, i.e., obtain a
mathematical representation of the problem’s objective function and
constraints.
a11x1+a12x2+…..+a1nxn+s1=b1
a21x1+a22x2+…..+a2nxn+s2=b2
.
.
am1x1+am2x2+…..+amnxn+sm=bm
Where x1, x2……xn and s1, s2 ……sm are non-negative. Note that the slack
variables have been assigned zero coefficients in the objective function. The
reason is that these variables typically contribute nothing to the value of
the objective function.
Step 3: Design the initial feasible solution. An initial basic feasible solution
is obtained by setting:
Cj - Zj C1-Z1 C1-Z1…Cn-Zn 0 0
……….0
The Zj row entries will all be equal to zero in the initial simplex tableau.
The Zj entry under the “solution or quantity column” give the current
value of the objective function. The other Z j entries represent the
decrease in the value of objective function that would result if one of the
variables not included in the solution were bought into the solution.
Remark: The entries in Cj-Zj now represent the net contribution to the
objective function that results by introducing one unit of each of the
respective column variables. A plus value indicate that a greater
contribution can be made by bringing the variable for that column into the
solution. A negative value indicates the amount by which contribution
would decrease if one unit of the variable for that column were bought into
the solution. Index row elements are also known as the shadow price (or
accounting price).
Step-5: We test if the current solution is optimum or not. If all the elements
or entries in the Cj-Zj row (i.e the index row) are negative or zero , then the
current solution is optimum. If there exists some positive number, the
current solution can be further improved by removing one basic variable
from the basis and replacing it by some non-basic one.
(i) We now determine the variable to enter into the solution mix
next. One way of doing this is by identifying the column with
largest positive value in the Cj-Zj row of the simplex table. The
column with largest positive entry in the Cj –Zj is called the key
or pivot column. The non-basic at the top of the key column is
the entering variable that will replace a basic variable.
(ii) Next we determine the departing variable to be replaced
in the basis solution. This is accomplished by dividing each
number in the quantity (XB ) by the corresponding number in
the key column selected in step 6(i). We compute the ratio by
b1/aij, b2/m2j……bm/amj. The row corresponding to the
minimum of these ratios is the key row or pivot row. The
corresponding variable in the key row known as the departing
variable will leave the basis.
(iii) We identify the key or pivot element. This is the number
that lies at the intersection of the key column and key row of
the given simplex table.
a) New values of the key row are computed by simply dividing every
element of the key row by key element.
b) The new values of the elements of the remaining rows for the new
simplex table can be obtained by performing elementary row
operations on all rows so that all elements except the key element in
the key column are zero.
In other words, for each row other than the kew row, we use the
formula:
New row numbers= (Number in old rows)-{[Corresponding number
above or below key element]*[Corresponding number in the row
replaced in (a)]}.
c) New entries in the CB column and XB column are entered in the new
table of the current solution.
d) Compute Zj and Cj-Zj rows. If all the elements in Cj-Zj row are either
negative or zero, an optimum solution has been obtained.
Step-1:
4X1+5X2+ S1=100
5X1+2X2+ S2= 80
X1≥0, X2≥0, S1≥0,S2≥0
Step-3:
Cj 10 5 0 0
0 S1 4 5 1 0 100 25
0 S2 5 2 0 1 80 16←
Zj 0 0 0 0 0
Cj-Zj 10↑ 5 0 0
Cj 10 5 0 0
CB Basic X1 X2 S1 S2 Solution Ratio
Variables
0 S1 0 17/5 1 -4/5 36 36
17/5
10 X1 1 2/5 0 1/5 16 16
2/ 5
Zj 10 4 0 2
Cj-Zj 0 ↑1 0 -2
# Compute new values for key row: For this we have to divide each
number in the key row by key number.
Cj 10 5 0 0
Step 3: Next, an initial solution is set up. Just to initiate the solution
procedure, the initial basic feasible solution is obtained by assigning zero
value to decision variables. This solution is now summarized in the initial
simplex table. Complete the initial simplex table by adding two final rows
Zj and Cj – Zj . These two rows help us to know whether the current
solution is optimum or not.
Step-4: We test if the current solution is optimum or not. If all the elements
or entries in the Cj-Zj row (i.e the index row) are positive , then the current
solution is optimum. If there exists some negative number, the current
solution can be further improved by removing one basic variable from the
basis and replacing it by some non-basic one.
Step-6: We update the new solution now. We evaluate the entries for the
next simplex table in exactly the same manner as was discussed earlier in
the maximization case.
### The artificial variables are introduced for the limited purpose of
obtaining an initial solution and are required for the constraints of ≥
type or the constraints with ‘=’ sign. It is not relevant whether the
objective function is of the maximization or minimization type.
Obviously, since artificial variables do not represent any quantity
relating to the decision problem, they must be driven out of the system
and must not remain in the final solution (and if at all they do, it
represent a situation of infeasibility). This can be ensured by assigning
an extremely high cost to them. Generally, a value M is assigned to each
artificial variable, where M represent a number higher than any finite
number. For this reason, the method of solving the problems where
artificial variables are involved is termed as the ‘Big M Method’. When
the problem is of the minimization nature, we assign in the objective
function a coefficient of +M to each of the artificial variables. On the
other hand, for the problems with the objective function of
maximization type, each of the artificial variables introduced has a
coefficient –M.
Example:
Minimize Z = 4X1 + X2
Subject to constrains
3x1 +4x2≥20
-x1-5x2≤-15
x1,x2 ≥0
Minimize Z=4X1+X2
Subject to the constraints:
3X1+4X2≥20
X1+5X2≥15
X1,X2≥0
Introducing artificial and surplus variables in the objective function
we get,
Minimize Z = 4X1+X2 +0S1+0S2+MA1+MA2
3X1+4X2-S1+A1=20
X1+5X2-S2 +A2=15
Cj 4 1 0 0 M M
M A1 3 4 -1 0 1 0 20 5
M A2 1 5 0 -1 0 1 15 3←
Zj 4M 9M -M -M M M 0
# Compute new values for key row: For this we have to divide each
number in the key row by key number.
M A1 11/5 0 -1 4/5 1 8 8
5/11
←
1 X2 1/5 1 0 -1/5 0 3 3
1/5
Zj 11M/5 1 - (4M/5) - M
+1/5 M (1/5)
Cj 4 1 0 0 M M
Zj 4 1 -
19/11 13/11
Cj 4 1 0 0 M M
0 S1 11/4 0 -5/4 1 10
1 X2 3/4 1 -1/4 0 5
Zj 3/4 1 -1/4 0
Hence the optimum solution is: X1=0, X2=5, with minimum Z=5.
Minimize Z=600X1+500X2
Subject to the constraints:
2X1+X2≥80
X1+2X2≥60
X1,X2≥0
Maximize Z=7X1+15X2+20X3
Subject to the constraints:
2X1+4X2+6X3≥24
3X1+9X2+6X3≥30
X1,X2,X3≥0
Maximize Z=2X1+3X2+4X3
Subject to the constraints:
3X1+X2+4X3≤600
2X1+4X2+2X3≥480
2X1+3X2+3X3 =540
X1,X2,X3≥0
Maximize Z=X1+4X2+5X3
Subject to the constraints:
3X1+3X3≤22
X1+2X2+3X3≤14
3X1+2X2 ≤14
X1, X2, X3≥0