Professional Documents
Culture Documents
Surplus variable
It is a variable subtracted from the left-hand side of a greater than or equal to type constraint
to convert the constraint into an equality. It is also known as negative slack variable. In
economic terms, surplus variables represent overfulfillment of the requirement.
Specifically:
ai1x1 + ai2x2 + ai3x3 + .........+ ainxn bi can be written as
ai1x1 + ai2x2 + ai3x3 + .........+ ainxn - si = bi Where i = 1, 2, ..., m
Artificial variable
It is a non negative variable introduced to facilitate the computation of an initial basic
feasible solution. In other words, a variable added to the left-hand side of a greater than or
equal to type constraint to convert the constraint into an equality is called an artificial
variable.
cBi
cj
c1
Basic
variables
x1
c2
c3
---
cn
0 ---
x2
x3
---
xn
s1
s2
s3 ---
sm
Solution
values
b (=XB)
B
0
s1
a11
a12
a13
---
a1n
0 ---
b1
0
0
--0
s2
s3
----sm
a21
a31
---am1
a22
a32
---am2
a23
a33
----am3
---------
a2n
a3n
---amn
0
0
0
1
b2
b3
----bm
zj-cj
-c1
-c2
-c3
---
-cn
Z=0
0 ---
Where:
cj = coefficients of the variables (m + n) in the objective function.
cBi = coefficients of the current basic variables in the objective function.
zj = aijcBi where i = 1,2..m; for each j= 1,2..n+m
B = basic variables in the basis.
XB = solution values of the basic variables.
zj-cj = index row. Or Relative Cost factor
The rules used for the construction of the initial simplex table are same in
both the maximization and the minimization problems.
Simplex Algorithm
Unquestionably, the simplex technique has proved to be the most effective in solving
linear programming problems. In the simplex method, we first find an initial basic
solution (extreme point). Then, we proceed to an adjacent extreme point. We continue this
process until we reach an optimal solution
Calculate the initial basic feasible solution by assigning zero value to the decision variables. This
solution is shown in the initial simplex table.
Divide the values under XB column by the corresponding positive coefficient (aij) in the key column, and
compare the ratios. The row that indicates the minimum ratio is called the key row. However, division
by zero or negative coefficients in the key column is not allowed. In the case of a tie, break the tie
arbitrarily.
The number that lies at the intersection of the key column and key row of a given table is called the key
element. It is always a non-zero positive number.
The numbers in the replacing row may be obtained by dividing the key row elements by the pivot
element. The numbers in the remaining rows may be calculated by using the following formula:
New
number=
old number-
Go to step 3 and repeat the procedure until all the values of zj cj are either zero or positive.
For the time being we assume that a feasible solution exists and the optimal value
of the objective function is finite. Later in the chapter, we will remove these
restrictive assumptions and consider several special cases like unbounded
solution, multiple optimum solution, no feasible solution, and degeneracy.
Example 1
Example 2
Now, open the door and windows of your mind and concentrate on the following example.
cB
0
0
0
zj-cj
cj
Basic variables
B
x3
x4
x5
x1
x2
x3
x4
x5
-1
3
1
-3
2
2
-1
-2
1
0
0
0
0
1
0
0
0
0
1
0
Solution values
b (=XB)
4
14
3
Z=0
cB
0
0
3
zj-cj
x3
x4
x1
0
0
1
0
x1
x2
x3
x4
x5
1
5
-1
-5
1
0
0
0
0
1
0
0
1
-3
1
3
Solution values
b (= XB)
7
5
3
z4 c4 = (0 X 0 + 0 X 1 + 3 X 0) - 0 = 0
z5 c5 = (0 X 1 + 0 X (-3) + 3 X 1) 0 = 3
Key column = x2 column
Minimum (7/1, 5/5) = 1
Key row = x4 row
Pivot element = 5
x4 departs and x2 enters.
Calculating values for table 3
x3 row
a11 = 0 0 X (1/5) = 0
a12 = 1 5 X (1/5) = 0
a13 = 1 0 X (1/5) = 1
a14 = 0 1 X (1/5) = -1/5
a15 = 1 (-3) X (1/5) = 8/5
b1 = 7 5 X (1/5) = 6
x2 row
a21 = 0/5 = 0
a22 = 5/5 = 1
a23 = 0/5 = 0
a24 = 1/5
a25 = -3/5
b2 = 5/5 = 1
x1 row
a31 = 1 0 X (-1/5) = 1
a32 = -1 5 X (-1/5) = 0
a33 = 0 0 X (-1/5) = 0
a34 = 0 1 X (-1/5) = 1/5
a35 = 1 (-3) X (-1/5) = 2/5
b3 = 3 5 X (-1/5) = 4
Don't convert the fractions into decimals, because many
fractions cancel out during the process while the conversion
into decimals will cause unnecessary complications.
cB
0
2
3
zj-cj
cj
Basic variables
B
x3
x2
x1
x1
x2
x3
x4
x5
-1/5
1/5
1/5
1
8/5
-3/5
2/5
0
0
0
1
0
0
1
0
0
1
0
0
0
Solution values
b (= XB)
6
1
4
Since all the values of zj cj are positive, this is the optimal solution.
x1 = 4, x2 = 1
z = 3 X 4 + 2 X 1 = 14.
The largest profit of Rs.14 is obtained, when 1 unit of x2 and 4 units of x1 are produced. The
above solution also indicates that 6 units are still unutilized, as shown by the slack variable x3
in the XB column.
Real life complex applications usually involve hundreds of constraints and
thousands of variables. So virtually these problems can not be solved
manually. For solving such problems, you will have to rely on employing an
electronic computer
A
B
C
Available
100 77
Time
80
cB
0
0
0
zj-cj
cj
12
Basic variables
x1
B
x4
10
x5
7
x6
2
-12
x2
x3
x4
x5
x6
2
3
4
-3
1
2
1
-1
1
0
0
0
0
1
0
0
0
0
1
0
Solution values
b (=XB)
100
77
80
cB
12
0
0
zj-cj
x1
x5
x6
12
x1
x2
x3
x4
x5
x6
1
0
0
0
1/5
8/5
18/5
-3/5
1/10 1/10
13/10 -7/10
4/5 -1/5
1/5 6/5
0
1
0
0
0
0
1
0
Solution values
b (= XB)
10
7
60
cB
12
3
0
zj-cj
x1
x2
x6
12
0
Solution values
x1
1
0
0
0
x2
0
1
0
0
x3
-1/16
13/16
-17/8
11/16
x4
3/16
-7/16
11/8
15/16
x5
-1/8
5/8
-9/4
3/8
x6
0
0
1
0
b (= XB)
73/8
35/8
177/4