Use the simplex algorithm to solve the following LP max z 2
Use the simplex algorithm to solve the following LP:
max z = 2x1+x2
s.t. 3x1+x2 <= 6
x1+x2<= 4
x1>= 0 , x2 urs
Solution
its written as in table form:
x1 x2 s1 s2 s3 s4 z
-----------------------------------------------------------
3 1 1 0 0 0 0 6
1 1 0 1 0 0 0 4
1 0 0 0 -1 0 0 0
0 1 0 0 0 -1 0 0
-2 -1 0 0 0 0 1 0
x1 x2 s1 s2 s3 s4 z
-----------------------------------------------------------
3 1 1 0 0 0 0 6
1 1 0 1 0 0 0 4
-1 0 0 0 1 0 0 0
0 1 0 0 0 -1 0 0
-2 -1 0 0 0 0 1 0
x1 x2 s1 s2 s3 s4 z
-----------------------------------------------------------
3 1 1 0 0 0 0 6
1 1 0 1 0 0 0 4
-1 0 0 0 1 0 0 0
0 -1 0 0 0 1 0 0
-2 -1 0 0 0 0 1 0
x1 x2 s1 s2 s3 s4 z
-----------------------------------------------------------------------------------..
1 0.33 0.33 0 0 0 0 2
0 0.66 -0.33 1 0 0 0 2
0 0.33 0.33 0 1 0 0 2
0 -1 0 0 0 1 0 0
0 -0.33 0.67 0 0 0 1 4
x1 x2 s1 s2 s3 s4 z
-----------------------------------------------------------------------------------..
1 0 0.5 -0.5 0 0 0 1
0 1 -0.5 1.5 0 0 0 3
0 0 0.5 -0.5 1 0 0 1
0 0 -0.5 1.5 0 1 0 3
0 0 0.5 0.5 0 0 1 5
then answer is:
z = 5; x1 = 1, x2 = 3
