Lect7 10
Lect7 10
Lect7 10
Minimize c1 x1 c2 x2 .................... cn xn
Subject to
In compact form:
Minimize c T x
subject to Ax b, x 0.
Slack and surplus variables may be used for converting inequalities into equalities.
Basic solutions: Consider a linear programming problem consisting of n decision variables and m
equality constraints. A solution obtained after making (nm) variables 0 is called basic solution.
Basic variables: If there are m equality constraints in a linear programming problem having n decision
variables, then we can assign 0 values to (nm) variables and solve the m equations for remaining m
variables. These remaining m variables are called basic variables.
Maximize z 2 x1 x2
Subject to
4 x1 3 x2 12
2 x1 x2 4
x1 2 x2 6
x1 , x2 0
1
Solution:
Minimize z 2 x1 x2
Subject to
4 x1 3x2 s1 12
2 x1 x2 s2 4
x1 2 x2 s3 6
x1 , x2 0
x1 2, x2 0 .
2
An example of big-M method of Simplex:
Minimize z 4 x1 x2
Subject to
3 x1 x2 3
4 x1 3 x2 6
x1 2 x2 4
x1 , x2 0
Introduce two artificial slack variables R1 and R2 and consider a very big number M.
Subject to
3 x1 x2 R1 3
4 x1 3 x2 x3 R2 6
x1 2 x2 x4 4
x1 , x2 , x3 , x4 , R1 , R2 0
Basic x1 x2 x3 R1 R2 x4 Solution
z −4 −1 0 −M −M 0 0
R1 3 1 0 1 0 0 3
R2 4 3 −1 0 1 0 6
x4 1 2 0 0 0 1 4
Make the table consistent by multiplying second and third rows by M and adding in z-row.
Basic x1 x2 x3 R1 R2 x4 Solution
z −4+7M −1+4M M 0 0 0 9M
R1 3 1 0 1 0 0 3
R2 4 3 −1 0 1 0 6
x4 1 2 0 0 0 1 4
Considering x1 as entering variable and R1 as leaving variable, the following simplex table is obtained.
3
Basic x1 x2 x3 R1 R2 x4 Solution
z 0 (1+5M)/3 –M (4–7M)/3 0 0 4+2M
x1 1 1/3 0 1/3 0 0 1
R2 0 5/3 −1 –4/3 1 0 2
x4 0 5/3 0 –1/3 0 1 3
Basic x1 x2 x3 R1 R2 x4 Solution
z 0 0 1/5 (8–5M)/5 (–1–5M)/5 0 18/5
x1 1 0 1/5 3/5 –1/5 0 3/5
x2 0 1 –3/5 –4/5 3/5 0 6/5
x4 0 0 1 1 –1 1 1
Basic x1 x2 x3 R1 R2 x4 Solution
z 0 0 0 (39–25M)/5 –M –1/5 17/5
x1 1 0 0 2/5 0 –1/5 2/5
x2 0 1 0 –1/5 0 3/5 9/5
x3 0 0 1 1 –1 1 1
First phase:
Minimize r=R1+R2
Subject to
3 x1 x2 R1 3
4 x1 3 x2 x3 R2 6
x1 2 x2 x4 4
x1 , x2 , x3 , x4 , R1 , R2 0
4
Basic x1 x2 x3 R1 R2 x4 Solution
r 0 0 0 −1 −1 0 0
R1 3 1 0 1 0 0 3
R2 4 3 −1 0 1 0 6
x4 1 2 0 0 0 1 4
Make the r-row consistent by adding second and third row in r-row. Apply the simplex table, you shall
get the following final table:
Basic x1 x2 x3 R1 R2 x4 Solution
r 0 0 0 −1 −1 0 0
x1 1 0 1/5 3/5 −1/5 0 3/5
x2 0 1 −3/5 −4/5 3/5 0 6/5
x4 0 0 1 1 −1 1 1
The solution is
x1 3 / 5, x2 6 / 5, x4 1
Minimize z 4 x1 x2
Subject to
x1 (1/ 5) x3 3 / 5
x2 (3 / 5) x3 6 / 5
x3 x4 1
x1 , x2 , x3 , x4 0
You can take x1, x2 and x4 as basic variables and solve the problem by simplex to get the same solution as
you got in big-M method.
Basic x1 x2 x3 x4 Solution
z –4 –1 0 0 0
x1 1 0 1/5 0 3/5
x2 0 1 −3/5 0 6/5
x4 0 0 1 1 1
5
Basic x1 x2 x3 x4 Solution
z 0 0 1/5 0 18/5
x1 1 0 1/5 0 3/5
x2 0 1 −3/5 0 6/5
x4 0 0 1 1 1
Considering x3 as entering variable and x4 as leaving variable, the following simplex table is obtained.
Basic x1 x2 x3 x4 Solution
z 0 0 0 0 17/5
x1 1 0 0 –1/5 2/5
x2 0 1 0 3/5 9/5
x3 0 0 1 1 1
x1 2 / 5, x2 9 / 5, x3 1, z 17 / 5.