0% found this document useful (0 votes)
28 views6 pages

Lect7 10

This document describes the standard form of a linear program and methods for solving linear programs including the simplex method, two-phase method, and big-M method. It provides examples of setting up and solving linear programs using these methods.

Uploaded by

Seema Rajput
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views6 pages

Lect7 10

This document describes the standard form of a linear program and methods for solving linear programs including the simplex method, two-phase method, and big-M method. It provides examples of setting up and solving linear programs using these methods.

Uploaded by

Seema Rajput
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Standard Linear Program:

Minimize c1 x1  c2 x2  ....................  cn xn

Subject to

a11 x1  a12 x2  ..................  a1n xn  b1


a21 x1  a22 x2  ..................  a2 n xn  b2
.
.
.
am1 x1  am 2 x2  ..................  amn xn  bm
x1  0, x2  0,....................., xn  0

We assume that each bi ≥ 0.

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.

Free variables can be expressed as the difference of 2 non-negative variables.

Basic solutions: Consider a linear programming problem consisting of n decision variables and m
equality constraints. A solution obtained after making (nm) 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 (nm) variables and solve the m equations for remaining m
variables. These remaining m variables are called basic variables.

An example of Simplex method:

Solve the following LP problem:

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

s1, s2 and s3 are slack variables.

Basic z x1 x2 s1 s2 s3 Solution Ratio


z 1 −2 −1 0 0 0 0
s1 0 4 3 1 0 0 12 3
s2 0 2 1 0 1 0 4 2
s3 0 1 2 0 0 1 6 6

Basic z x1 x2 s1 s2 s3 Solution Ratio


z 1 0 0 0 1 0 4
s1 0 0 1 1 −2 0 4
x1 0 1 1/2 0 1/2 0 2
s3 0 0 3/2 0 −1/2 1 4

The above table is optimum and the solution is

x1  2, x2  0 .

The optimum value of the objective function is z*  4 .

You can obtain other solution too by making x2 basic.

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.

Minimize z  4 x1  x2  MR1  MR2

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

As M is very large, solution of it is likely to make R1 and R2 equal to 0.

Make the simplex table:

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

Afterwards solve in the usual manner to get


x1  2 / 5, x2  9 / 5, x3  1
z  17 / 5

Two Phase method of Simplex

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

Now the problem becomes

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

The above table is optimum and the solution is

x1  2 / 5, x2  9 / 5, x3  1, z  17 / 5.

You might also like