0% found this document useful (0 votes)
2 views43 pages

LPP_I

The document explains linear programming (LP) as a method for finding optimal solutions to problems involving decision variables, objective functions, and constraints. It details the graphical method for solving LP problems, including examples of maximizing and minimizing objectives under given constraints. Additionally, it introduces the simplex method for solving multivariable LP problems that cannot be addressed graphically.

Uploaded by

phantomvenom1331
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)
2 views43 pages

LPP_I

The document explains linear programming (LP) as a method for finding optimal solutions to problems involving decision variables, objective functions, and constraints. It details the graphical method for solving LP problems, including examples of maximizing and minimizing objectives under given constraints. Additionally, it introduces the simplex method for solving multivariable LP problems that cannot be addressed graphically.

Uploaded by

phantomvenom1331
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/ 43

• Linear programming is a method that enables us to identify the optimal solution for a given

problem.
• An optimal solution represents the best possible outcome for a specific problem, such as
least cost, highest margin, or least time.
• Example: Manufacturing issues involve determining the optimal number of units to
produce or sell, aiming to maximize profits. This challenge arises when each product
requires a fixed amount of manpower, machine hours, and raw materials.
• Formation of linear programming problem, involves identifying:
• Decision Variables:
Variables such as x and y that determine the outcome of the linear programming
problem, representing the final solution.
• Objective Function:
Typically denoted as Z, it is a linear function that needs optimization based on given
conditions to achieve the final solution. Coefficients of the decision variables in the
objective function are also called as costs.
• Constraints:
Restrictions imposed on decision variables, limiting their values and influencing the
feasible solutions.
• Non-Negative Restrictions:
Imposed conditions that ensure decision variables (like x and y) are non-negative,
reflecting real-world limitations.
Note: A feasible solution of an LPP satisfies all the constraints, while an optimal solution is a special
case of a feasible solution that either maximizes or minimizes the objective function.
The general form of a linear programming problem is expressed as:
Objective Function: 𝑍 = 𝑎𝑥 + 𝑏𝑦
Constraints: 𝑐𝑥 + 𝑑𝑦 ≥ 𝑒, 𝑝𝑥 + 𝑞𝑦 ≤ 𝑟
Non-Negative Restrictions: 𝑥 ≥ 0, 𝑦 ≥ 0
Here, 𝑥 and 𝑦 serve as the decision variables in the given conditions.
Linear Programming Graphical Method
• In the process of solving linear programming problems (LPP), we begin by graphically plotting all
the inequalities corresponding to the constraints on an 𝑋𝑌 graph.
• The common region formed by the intersection of these plotted inequalities called as feasible
region (optimal region/ convex region).
• To determine the optimum solution, we calculate the objective function's value at each corner
point within this feasible region.
• By comparing these values, we can identify and establish the optimal solution for the given LPP,
because
• “Extreme values occur at the vertices of a concave, bounded, feasible region”
• Problem 01:
Maximize: 3𝑥 + 4𝑦
Subjected to constraints: 4𝑥 + 2𝑦 ≤ 80, 2𝑥 + 5𝑦 ≤ 180, 𝑥, 𝑦 ≥ 0 using graphical
method.
Solution:
Given constraints 4𝑥 + 2𝑦 ≤ 80 2𝑥 + 5𝑦 ≤ 180
⇒ 2𝑥 + 𝑦 ≤ 40
Replace inequality by equality ⇒ 2𝑥 + 𝑦 = 40 2𝑥 + 5𝑦 = 180
Find the 𝑥-intercept by taking 𝑦 = 0 𝑦 = 0 ⇒ x = 10 𝑦 = 0 ⇒ x = 90
𝑦-intercept by taking 𝑥 = 0 x = 0 ⇒ y = 40 x = 0 ⇒ y = 36
Draw the lines joining points 10,0 & 0,40 90,0 & 0,36
Shade the region of inequality by 4 0 + 2 0 ≤ 80 2 0 + 5 0 ≤ 180
checking (0,0) lies within the region. ⇒ 0 ≤ 80 ⇒ 0 ≤ 180
i.e., put 0,0 into the inequality; if it Satisfied Satisfied
satisfies the inequality then the Hence mark toward Hence mark toward
region will be toward the origin else 0,0 0,0
it will be on other side
Objective Function : z=3𝑥 + 4𝑦

Calculate 𝑧 value at each vertices and find the minimum and maximum value of 𝑧
𝐾(0,36) 𝑧(0,36) = 144
𝐿(2.5,3.5) 𝑧(2.5,35) = 147.5 𝑧 is maximum
𝑀(20,0) 𝑧(20,0) = 60
𝑂(0,0) 𝑧(0,0) = 0 𝑧 is minimum
• Problem 02:
Maximize: 8𝑥 + 5𝑦
Subjected to constraints: 2𝑥 + 𝑦 ≤ 500, 𝑥 ≤ 150, 𝑦 ≤ 250, 𝑥, 𝑦 ≥ 0 using
graphical method.
Solution:
Given constraints 2𝑥 + 𝑦 ≤ 500 𝑥 ≤ 150 𝑦 ≤ 250

Replace inequality by equality 2𝑥 + 𝑦 = 500 𝑥 = 150 𝑦 = 250


Find the 𝑥-intercept by taking 𝑦 = 0 𝑦 = 0 ⇒ 𝑥 = 500 𝑦 = 0 ⇒ 𝑥 = 250 𝑥 = 0 ⇒ 𝑦 = 250
𝑦-intercept by taking 𝑥 = 0 𝑥 = 0 ⇒ 𝑦 = 500 No 𝑦-intercept No 𝑥-intercept
Draw the lines joining points 250,0 & 0,500 250,0 0,250
Shade the region of inequality by 2(0) + (0) ≤ 500 0 ≤ 150 0 ≤ 250
checking (0,0) lies within the ⇒ 0 ≤ 500 Satisfied Satisfied
region. i.e., put 0,0 into the Satisfied Hence mark toward Hence mark toward
inequality; if it satisfies the Hence mark toward 0,0 0,0
inequality then the region will be 0,0
toward the origin else it will be on
other side
Objective Function : z=8𝑥 + 5𝑦

Calculate 𝑧 value at each vertices and find the minimum and maximum value of 𝑧
𝐼(0,250) 𝑧(0,250) = 1250
𝐻(125,250) 𝑧(125,250) = 2250 𝑧 is maximum
𝐺(150,200) 𝑧(150,200) = 2200
𝐽(150,0) 𝑧(150,0) = 1200
• Problem 03:
Minimize: 3𝑥 + 2𝑦
Subjected to constraints: 𝑥 − 𝑦 ≤ 1, 𝑥 + 𝑦 ≥ 3, 𝑥, 𝑦 ≥ 0 using graphical method.
Solution:

Given constraints 𝑥−𝑦 ≤1 𝑥+𝑦≥3

Replace inequality by equality x−𝑦 =1 𝑥+𝑦=3


Find the 𝑥-intercept by taking 𝑦 = 0 𝑦=0⇒𝑥=1 𝑦=0⇒𝑥=3
𝑦-intercept by taking 𝑥 = 0 𝑥 = 0 ⇒ 𝑦 = −1 𝑥=0⇒𝑦=3
Draw the lines joining points 1,0 & 0, −1 3,0 & 0,3
Shade the region of inequality by 0 − 0 ≤1 0 + 0 ≥3
checking (0,0) lies within the ⇒0≤1 Not satisfied
region. i.e., put 0,0 into the Satisfied Hence mark other
inequality; if it satisfies the Hence mark toward side of 0,0
inequality then the region will be 0,0
toward the origin else it will be on
other side
Objective Function : z=3𝑥 + 2𝑦

Calculate 𝑧 value at each vertices and find the minimum and maximum value of 𝑧
𝐴(2,1) 𝑧(2,1) = 8
𝐻(0,3) 𝑧(0,3) = 6 𝑧 is minimum

• If this problem is of Maximization, since the feasible region is unbounded, no solution


for the problem Max 𝑧
• Problem 04:
Minimize: 100𝑥 + 40𝑦
Subjected to constraints: 5𝑥 + 2𝑦 ≤ 1000, 3𝑥 + 2𝑦 ≤ 900, 𝑥 + 2𝑦 ≤ 500, 𝑥, 𝑦 ≥ 0 using
graphical method.
Solution:

𝐴(0,250) 𝑧(0,250) = 10000


𝐵(125,187.5) 𝑧(125,187.5) = 20000
𝐶(200,0) 𝑧(200,0) = 20000

Since 𝑧 is maximum at two points


𝐵 and 𝐶, optimal solution exists
at all the points on the line
joining points 𝐵 and 𝐶.
• Problem 05:
Maximize: 𝑥 + 𝑦
Subjected to constraints: 𝑥 + 𝑦 ≤ 1, −3𝑥 + 𝑦 ≥ 3, 𝑥, 𝑦 ≥ 0 using graphical method.

Solution: Since there is no common region


which satisfies all the constraint, given LPP
has no optimal solution.
A manufacturing company makes two types of television sets; one is black and
white and the other is color. The company has resources to make at most 300 sets
a week. It takes Rs 1800 to make a black and white set and Rs 2700 to make a
coloured set. The company can spend no more than Rs 648000 a week to make
television sets. If it makes a profit of Rs 510 per black and white set and Rs 675
per coloured set, how many sets of each type should be produced so that the
company has a maximum profit? Formulate this problem as a LPP given that the
objective is to maximize the profit
Hint: 𝑥 – Number of black and white TVs
𝑦 – Number of color TVs
The company has resources to make at most 300 sets a week.
⇒ 𝒙 + 𝒚 ≤ 𝟑𝟎𝟎
It takes Rs 1800 to make a black and white set and Rs 2700 to make a coloured set.
⇒ 𝟏𝟖𝟎𝟎𝒙 + 𝟐𝟕𝟎𝟎𝒚 → Cost to make both black and white TVs and colord TVs
The company can spend no more than Rs 648000 a week to make television sets.
⇒ 𝟏𝟖𝟎𝟎𝒙 + 𝟐𝟕𝟎𝟎𝒚 ≤ 𝟔𝟒𝟖𝟎𝟎𝟎
If it makes a profit of Rs 510 per black and white set and Rs 675 per coloured set,
Profit = 𝑧 = 510𝑥 + 675𝑦 is to be maximized
⇒ Max :𝑧 = 510𝑥 + 675𝑦
Subjected to :𝑥 + 𝑦 ≤ 300
1800𝑥 + 2700𝑦 ≤ 648000
𝑥, 𝑦 ≥ 0
Solve the above LPP using graphical method
• Any LPP can have
• A unique optimal solution (Problem 01)
• An unbounded solutions(Problem 03)
• An infinite number of solutions (Problem 04)
• No solution (Problem 05)

• LPP can be classified as follows:


• Standard form of LPP:
• Objective function should be of type Maximization
• All constraints are expressed as equations
• RHS of the each constraint should be non-negative
• All variables are non-negative
• Canonical form of LPP
• Objective function should be of type Maximization
• All constraints are of ≤ type except non-negative constraints
• All variables are non-negative
Note:
• If the problem is not in canonical or standard form then we can bring the given LPP into
these forms by performing following steps:
• Minimize 𝑧 can be taken as −Maximize (−𝑧)
• Example: Minimize 𝑧 = 𝑥 − 2𝑦 + 3𝑧 ≈ −Maximize (−𝑧) = 𝑧 ∗ = −𝑥 + 2𝑦 − 3𝑧
• Inequalities can be converted to equalities by introducing new variables called as
slack variable and surplus variable
• The variables added to the constraints of type ≤ are called as slack variable
• Example: 𝑥 + 𝑦 ≤ 20 → 𝑥 + 𝑦 + 𝑠1 = 20, here 𝑠1 is the slack variable
• The variables subtracted to the constraints of type ≥ are called as surplus
variable
• Example: 𝑥 + 𝑦 ≥ 20 → 𝑥 + 𝑦 − 𝑠1 = 20, here 𝑠1 is the surplus variable
Simplex method
• It is not possible to solve multivariable LPP using graphical method, hence we have a
new method called as Simplex method.
• Simplex method is an iterative algorithm to find the optimal value of the multivariable
objective function
Steps to solve LPP using simplex method:
• Standard form: Convert given LPP into standard form
LPP Std. LPP
Min: 𝑧 = 𝑧1 𝑥1 − 𝑧2 𝑥2 + ⋯ −𝑀𝑎𝑥 −𝑧 = 𝑧 ∗ = −𝑧1 𝑥1 + 𝑧2 𝑥2 − ⋯
• Introducing slack variables: Determine the slack variable and convert given inequalities into equalities
LPP Std. LPP
𝑧 = −𝑧1 𝑥1 + 𝑧2 𝑥2 − ⋯ 𝑧 = −𝑧1 𝑥1 + 𝑧2 𝑥2 + ⋯ − 0𝑠1 − 0𝑠2 −. .
𝑎1 𝑥1 + 𝑎2 𝑥2 + ⋯ ≤ 𝑏1 𝑎1 𝑥1 + 𝑎2 𝑥2 + ⋯ + 𝑠1 + 0𝑠2 +. . = 𝑏1
⋮ ⋮
• Creating the table: Construct a simplex table to perform row operations on the linear programming model as well as to
check a solution for optimality. The table consists of the coefficient corresponding to the linear constraint variables and
the coefficients of the objective function in the bottom row.
• Basis: Given a system of 𝑚 linear equations with 𝑛 variables 𝑚 < 𝑛 any solutions which is obtained by solving 𝑚
variables keeping 𝑛 − 𝑚 variables 0 called as basic solution and such 𝑚 variables are called as basic variables (basis) and
(𝑛 − 𝑚) variables are called as non-basic variables.
• Simplex algorithm is an iterative Basis 𝒙𝟏 𝒙𝟐 𝒙𝟑 … 𝒔𝟏 𝒔𝟐 … 𝑹𝑯𝑺
process which improves the
basic solution 𝑠1 𝑎1 𝑎2 𝑎3 … 1 0 … 𝑏1
𝑠2 𝑐1 𝑐2 𝑐3 … 0 1 … 𝑏1
⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮
𝑧 𝑧1 𝑧2 𝑧3 … 0 0 … 0
• Pivot variables: Pick the smallest negative value in the bottom row. One of the values lying in the column (Key column)
of this value will be the pivot variable (Key element). To find the indicator (Key row), divide the RHS values of the linear
constraints by their corresponding values from the column containing the possible key element.
Basis 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝑹𝑯𝑺 RHS/Key column

Basic Variables 𝑠1 2 1 1 0 3 3/1


-simply which are 𝑠2 3 5 0 1 9 9/5
added to the 0
𝑧 −1 −4 0 0 0
constraints
Note: Columns
1. Smallest negative value corresponding to
2. Key column Basic variables
3. Smallest positive ratio should form an
4. Key row identity matrix.
• Creating a new tableau 5. Key element
• To optimize the key element, it will need to be transformed into a unit value (value of 1). To transform the value,
multiply the row containing the key element by the reciprocal of the key element.
• After the unit value has been determined, the other values in the column containing the unit value will become
zero. The basic variable in the key row replaced with the variable in the key column called as outgoing and incoming
variables.
• Checking for optimality
• An optimal solution is defined as one where all values in the bottom row are greater than or equal to zero. If every
value meets this criterion, the solution is deemed optimal.
Problem 01:Solve the following LPP using Simplex method:
Max 𝒛 = 𝟑𝒙𝟏 + 𝟐𝒙𝟐
S.T.C. : 𝒙𝟏 + 𝒙𝟐 ≤ 𝟒
𝒙𝟏 − 𝒙𝟐 ≤ 𝟐, 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎

➢ Convert it to standard form of LPP


➢ Objective function should be of type Maximization
Max 𝑧 = 3𝑥1 + 2𝑥2
➢ Add slack variables to constraints to convert ≤ → =
S.T.C. 𝑥1 + 𝑥2 + 𝑠1 = 4
𝑥1 − 𝑥2 + 𝑠2 = 2
➢ Also introduce slack variables in objective function, hence the standard form of LPP will be
Max 𝑧 = 3𝑥1 + 2𝑥2 − 0𝑠1 − 0𝑆2
S.T.C. 𝑥1 + 𝑥2 + 𝑠1 = 4
𝑥1 − 𝑥2 + 𝑠2 = 2
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0
➢ Construct the table
Basis 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝑹𝑯𝑺 Ratio
𝑠1 1 1 1 0 4 4/1=4
𝑠2 1 -1 0 1 2 2/1=2
Obj. func. -3 -2 0 0 0

▪ −3 is the smallest negative number in the last row


▪ Column corresponding to the number −3 is the key column
▪ Find the ratio of RHS/Key column
▪ 2 is the smallest positive ratio
▪ Row corresponding to the number 2 is the key row
▪ Intersection of key row and key column is the key element, here 1 is the key element. 𝑠1 𝑠1
▪ Leaving variable will be 𝑠2 and entry variable will be 𝑥1 , i.e., replace 𝑠2 in the first column by 𝑥1 𝑠 𝑥1
2
▪ Now corresponding columns 𝑠1 and 𝑥1 should form the identity matrix, hence
▪ If key element is not equal to 1 then make the key element 1 by dividing entire key row by that element
▪ Perform row operations to make key element 1 and make all numbers above and below the key element become 0.
▪ Here perform 𝑅1′ → 𝑅1 − 𝑅2 and 𝑅3′ → 𝑅3 + 3R 2
Basis 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝑹𝑯𝑺 Ratio
𝑠1 0 2 1 -1 2 1
𝑥1 1 -1 0 1 2 -2
Obj. func. 0 -5 0 3 6
Basis 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝑹𝑯𝑺 Ratio
𝑠1 0 2 1 -1 2 1
𝑥1 1 -1 0 1 2 -2
Obj. func. 0 -5 0 3 6

▪ −5 is the smallest negative number in the last row


▪ Column corresponding to the number −5 is the key column
▪ Find the ratio of RHS/Key column
▪ 1 is the smallest positive ratio (Don’t consider negative values)
▪ Row corresponding to the number 1 is the key row
▪ Intersection of key row and key column is the key element, here 2 is the key element. 𝑠1 𝑥2
▪ Leaving variable will be 𝑠1 and entry variable will be 𝑥2 , i.e., replace 𝑠1 in the first column by 𝑥2 𝑥1 𝑥1
▪ Now corresponding columns 𝑥2 and 𝑥1 should form the identity matrix, hence
▪ The key element is not equal to 1 then make the key element 1 by dividing entire key row by that element
▪ Perform row operations to make key element 1 and all numbers above and below the key element become 0.
▪ Here perform 𝑅1′ → 𝑅1 /2 ; 𝑅2′ → 𝑅2 + R1 ; 𝑅3′ → 𝑅3 + 5𝑅1
Basis 𝒙𝟏 𝒙𝟐 𝒔𝟏 𝒔𝟐 𝑹𝑯𝑺 Ratio
𝑥2 0 1 1/2 -1/2 1
𝑥1 1 0 1/2 1/2 3
Obj. func. 0 0 5/2 1/2 11
There will be no negative number in the last row, hence we obtained the optimal solution. 𝒙𝟏 = 𝟑, 𝒙𝟐 = 𝟏 and 𝒛 = 𝟏𝟏
Problem 02: Solve the following LPP using Simplex method:
Min 𝒖 = 𝒙 − 𝟑𝒚 − 𝟐𝒛
S.T.C. : 𝟑𝐱 − 𝐲 + 𝟐𝐳 ≤ 𝟕
−𝟐𝐱 + 𝟒𝐲 ≤ 𝟏𝟐,
−𝟒𝒙 + 𝟑𝒚 + 𝟖𝒛 ≤ 𝟏𝟎, 𝒙, 𝒚, 𝒛 ≥ 𝟎
➢ Convert it to standard form of LPP
➢ Objective function should be of type Maximization
Min 𝑢 = −𝑀𝑎𝑥 𝑢∗ , 𝑢∗ = −𝑢 = −𝑥 + 3𝑦 + 2𝑧
➢ Add slack variables to constraints to convert ≤ → =
S.T.C. 3𝑥 − 𝑦 + 2𝑧 + 𝑠1 = 7
−2𝑥 + 4𝑦 + 𝑠2 = 12
−4𝑥 + 3𝑦 + 8𝑧 + 𝑠3 = 10
➢ Also introduce slack variables in objective function, hence the standard form of LPP will be
Max 𝑢∗ = −𝑥 + 3𝑦 + 2𝑧 − 0𝑠1 − 0𝑆2 -0𝑆3
S.T.C. 3x − y + 2z + 𝑠1 = 7
−2𝑥 + 4𝑦 + 𝑠2 = 12
−4𝑥 + 3𝑦 + 8𝑧 + 𝑠3 = 10
𝑥, 𝑦, 𝑧, 𝑠1 , 𝑠2 , 𝑠3 ≥ 0
➢ Construct the table
Basis 𝑥 𝑦 𝑧 s1 𝑠2 𝑠3 𝑹𝑯𝑺 Ratio
𝑠1 3 -1 2 1 0 0 7 -7
𝑠2 -2 4 0 0 1 0 12 3
𝑠3 -4 3 8 0 0 1 10 10/3
Obj. func. 1 -3 -2 0 0 0 0
▪ −3 is the smallest negative number in the last row
▪ Column corresponding to the number −3 is the key column
▪ Find the ratio of RHS/Key column
▪ 3 is the smallest positive ratio (Don’t consider negative values)
▪ Row corresponding to the number 3 is the key row
▪ Intersection of key row and key column is the key element, here 4 is the key element. 𝑠1 𝑠1
▪ Leaving variable will be 𝑠2 and entry variable will be 𝑦, i.e., replace 𝑠2 in the first column by 𝑦
𝑠2 𝑦
▪ Now corresponding columns 𝑠1 𝑦 and 𝑠3 should form the identity matrix, hence
▪ If the key element 4 (not equal to 1) then make the key element 1 by dividing entire key row by 4 𝑠3 𝑠3
▪ Perform row operations to make key element 1 and all numbers above and below the key element become 0.
▪ Here perform 𝑅2′ → 𝑅2 /4 ; 𝑅1′ → 𝑅1 + R 2 ; 𝑅3′ → 𝑅3 − 𝑅2

Basis 𝑥 𝑦 𝑧 s1 𝑠2 𝑠3 𝑹𝑯𝑺 Ratio


𝑠1 5/2 0 2 1 1/4 0 10 5
𝑦 -1/2 1 0 0 1/4 0 3 -
𝑠3 -5/2 0 8 0 -3/4 1 1 1/8
Obj. func. -1/2 0 -2 0 3/4 0 9
Basis 𝑥 𝑦 𝑧 s1 𝑠2 𝑠3 𝑹𝑯𝑺 Ratio
𝑠1 5/2 0 2 1 1/4 0 10 5
𝑦 -1/2 1 0 0 1/4 0 3 -
𝑠3 -5/2 0 8 0 -3/4 1 1 1/8
Obj. func. -1/2 0 -2 0 3/4 0 9
▪ −2 is the smallest negative number in the last row
▪ Column corresponding to the number −2 is the key column
▪ Find the ratio of RHS/Key column
▪ 1/8 is the smallest positive ratio (Don’t consider negative values)
▪ Row corresponding to the number 1/8 is the key row
▪ Intersection of key row and key column is the key element, here 8 is the key element. 𝑠1 𝑠1
▪ Leaving variable will be 𝑠3 and entry variable will be 𝑧, i.e., replace 𝑠3 in the first column by 𝑧
𝑦 𝑥
▪ Now corresponding columns 𝑠1 𝑦 and 𝑧 should form the identity matrix, hence
▪ If key element 8 is not equal to 1 then make the key element 1 by dividing entire key row by 8 𝑠3 𝑧
▪ Perform row operations to make key element 1 and all numbers above and below the key element become 0.
▪ Here perform 𝑅3′ → 𝑅3 /8 ; 𝑅1′ → 𝑅1 − 2R 3 ; 𝑅2′ → 𝑅2 ; 𝑅4′ → 𝑅4 + 2𝑅3

Basis 𝑥 𝑦 𝑧 s1 𝑠2 𝑠3 𝑹𝑯𝑺 Ratio


𝑠1 25/8 0 0 1 7/16 -1/4 39/4
𝑦 -1/2 1 0 0 1/4 0 3
𝑧 -5/16 0 1 0 -3/32 1/8 1/8
Obj. func. -9/8 0 0 0 9/16 1/4 9.25
Basis 𝑥 𝑦 𝑧 s1 𝑠2 𝑠3 𝑹𝑯𝑺 Ratio
𝑠1 25/8 0 0 1 7/16 -1/4 39/4=9.75 3.12
𝑦 -1/2 1 0 0 1/4 0 3 -
𝑧 -5/16 0 1 0 -3/32 1/8 1/8=0.125 -
Obj. func. -9/8 0 0 0 9/16 1/4 9.25
▪ −9/8 is the smallest negative number in the last row
▪ Column corresponding to the number −9/8 is the key column
▪ Find the ratio of RHS/Key column
▪ 3.12 is the smallest positive ratio (Don’t consider negative values)
▪ Row corresponding to the number 3.12 is the key row
▪ Intersection of key row and key column is the key element, here 25/8 is the key element. 𝑠1 𝑥
▪ Leaving variable will be 𝑠1 and entry variable will be 𝑥, i.e., replace 𝑠1 in the first column by x
𝑦 𝑦
▪ Now corresponding columns 𝑥, 𝑦 and 𝑧 should form the identity matrix, hence
▪ If key element 4 is not equal to 1 then make the key element 1 by dividing entire key row by 4 𝑧 𝑧
▪ Perform row operations to make key element 1 and all numbers above and below the key element become 0.
▪ Here perform 𝑅1′ → 𝑅1 8/25 ; 𝑅2′ → 𝑅2 + R1 /2 ; 𝑅3′ → 𝑅3 + 5𝑅2 /16 ; 𝑅4′ → 𝑅4 + 9𝑅1 /8

Basis 𝑥 𝑦 𝑧 s1 𝑠2 𝑠3 𝑹𝑯𝑺 Ratio There will be no negative


𝑥 1 0 0 0.32 0.14 -0.08 3.12 number in the last row,
hence we obtained the
𝑦 0 1 0 0.16 0.32 -0.04 4.56 optimal solution.
𝑧 0 0 1 0.1 -0.05 0.1 1.1 𝒙 = 𝟑. 𝟏𝟐, 𝒚 = 𝟒. 𝟓𝟔
Obj. func. 0 0 0 0.36 0.72 0.16 12.76 𝒛 = 𝟏. 𝟏 and 𝐮∗ = 𝟏𝟐. 𝟕𝟔
⇒ 𝑴𝒊𝒏 𝒖 = −𝟏𝟐. 𝟕𝟔
Problem 03: Solve the following LPP using Simplex method:
Min 𝒛 = 𝒙 + 𝒚
S.T.C. : 𝒙 + 𝒚 ≤ 𝟏
−𝟑𝒙 + 𝐲 ≥ 𝟑, 𝒙, 𝒚 ≥ 𝟎

➢ Convert it to standard form of LPP


➢ Objective function should be of type Maximization
Min 𝑧 = −𝑀𝑎𝑥 𝑧 ∗ , 𝑧 ∗ = −𝑧 = −𝑥 − 𝑦
➢ Convert ≥ to ≤ in constraints by multiplying – sign on both side except non-negative constraints
S.T.C. : 𝑥 + 𝑦 ≤ 1
3𝑥 − 𝑦 ≤ −3, 𝑥, 𝑦 ≥ 0
➢ Add slack variables to constraints to convert ≤ → =
S.T.C. 𝑥 + 𝑦 + 𝑠1 = 1
3𝑥 − 𝑦 + 𝑠2 = −3, 𝑥, 𝑦 ≥ 0
➢ Also introduce slack variables in objective function, hence the standard form of LPP will be
𝑀𝑎𝑥 𝑧 ∗ = −𝑥 − 𝑦 − 0𝑠1 − 0𝑠2
S.T.C. 𝑥 + 𝑦 + 𝑠1 = 1
3𝑥 − 𝑦 + 𝑠2 = −3, 𝑥, 𝑦, 𝑠1 , 𝑠2 ≥ 0
➢ Construct the table
Basis 𝑥 𝑦 s1 𝑠2 𝑹𝑯𝑺 Ratio
𝑠1 1 1 1 0 1
𝑠2 3 -3 0 1 -3
Obj. func. 1 1 0 0 0
There are no negative number in the last row, hence we arrived at the optimal level.
Since 𝒙 and 𝒚 are not present in the first column, we shall take 𝒙 = 𝟎, 𝒚 = 𝟎.
But this is not the optimal solution, because this violates the condition that −3𝑥 + 𝑦 ≥ 3.
Hence, the given LPP has no solution.
Note: In the Simplex method, if there are multiple smallest negative (or smallest positive) ratios, you are free to
select any one of them.
Big-M Method
• LPP should be of type Maximization
• Introduce slack variables to the ≤ constraints
• Introduce artificial variables along with the surplus variables to ≥ constraints
• Introduce only artificial variables to constraint equations
• Addition of these artificial variables causes violation of the corresponding constraints, hence assign a very large
penalty (−𝑀 for maximization problem) to the objective function.
• Use simplex method to solve the obtained LPP.
• Note:
1. If an artificial variable remains in the first column at the optimal level of the simplex table, then the Linear
Programming Problem (LPP) is unsolvable.
2. Whenever an artificial variable happens to leave in the first column, remove the artificial variable column
Problem 01: Solve LP problem using big M method (Penalty method).
Max 𝒁 = 𝟑𝒙𝟏 − 𝒙𝟐
Subjected to 𝟐𝒙𝟏 + 𝒙𝟐 ≥ 𝟐
𝒙𝟏 + 𝟑𝒙𝟐 ≤ 𝟑
𝒙𝟐 ≤ 𝟒 , 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Step1 : Introduce slack, surplus and artificial variables also penalty M in the objective function
Max 𝑍 = 3𝑥1 − 𝑥2 − 0𝑠1 − 0𝑠2 − 0𝑠3 − 𝑀𝐴1
Subjected to 2𝑥1 + 𝑥2 − 𝑠1 + 𝐴1 = 2
𝑥1 + 3𝑥2 + 𝑠2 =3
𝑥2 + 𝑠3 = 4
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝑠3 , 𝐴1 ≥ 0

Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 RHS Ratio


𝐴1 2 1 -1 0 0 1 2
𝑠2 1 3 0 1 0 0 3
𝑠3 0 1 0 0 1 0 4
Obj. Func -3 1 0 0 0 M 0

Note:
As the columns corresponding to the basic variables 𝐴1 , 𝑠2 and 𝑠3 do not conform to the standard form, it implies that
other than the intersection of the 𝐴1 (and s2 , 𝑠3 ) row with the 𝐴1 (and s2 , 𝑠3 ) column, all entries above and below should
be zero. Here we can see 𝑀 in the last row. Eliminate 𝑀 from row operation
Step2: Eliminate 𝑀 in the objective function: 𝑅4′ → 𝑅4 − 𝑀𝑅1
Step3: Construct the table

Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 RHS Ratio


𝐴1 2 1 -1 0 0 1 2 1
𝑠2 1 3 0 1 0 0 3 3
𝑠3 0 1 0 0 1 0 4 -
Obj. Func −(3 + 2𝑀) − 𝑀−1 𝑀 0 0 0 −2𝑀

Step4: Apply simplex method to get the optimal solution

Note: Since the value of the penalty 𝑀 is very big, we can assume 𝑀 value as 10( or 100, 1000 also) for our
convivence. Then − 3 + 2𝑀 = −23 and − 𝑀 − 1 = −9. −23 < −9 hence
− 3 + 2𝑀 is the smallest negative number in the last row
Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 𝐴1 RHS Ratio
𝐴1 2 1 -1 0 0 1 2 1
𝑠2 1 3 0 1 0 0 3 3
𝑠3 0 1 0 0 1 0 4 -
Obj. Func −(3 + 2𝑀) − 𝑀−1 𝑀 0 0 0 −2𝑀
▪ −(3 + 2𝑀) is the smallest negative number in the last row
▪ Column corresponding to the number −(3 + 2𝑀) is the key column
▪ Find the ratio of RHS/Key column
▪ 1 is the smallest positive ratio (Don’t consider negative values)
▪ Row corresponding to the number 1 is the key row
▪ Intersection of key row and key column is the key element, here 2 is the key element.
▪ Leaving variable will be 𝐴1 and entry variable will be 𝑥1 , i.e., replace 𝐴1 in the first column by 𝑥1
▪ Now corresponding columns𝐴1 , 𝑠2 and 𝑠3 should form the identity matrix, hence
▪ The key element is 2 ( not equal to 1 then make the key element 1 by dividing entire key row by 2)
▪ Perform row operations to make all numbers above and below the key element become 0. (Note: Remove 𝑨𝟏 column as 𝑨𝟏
will be removed from the first column, this is applicable only for artificial variables)
▪ Here perform 𝑅1′ → 𝑅1 /2 ; 𝑅2′ → 𝑅2 − R1 ; 𝑅3′ → 𝑅3 ; 𝑅4′ → 𝑅4 + 3 + 2𝑀 𝑅1
Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 RHS Ratio
𝑥1 1 0.5 -0.5 0 0 1
𝑠2 0 2.5 0.5 1 0 2
𝑠3 0 1 0 0 1 4
Obj. Func 0 2.5 -1.5 0 0 3
Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 RHS Ratio
𝑥1 1 0.5 -0.5 0 0 1 -2
𝑠2 0 2.5 0.5 1 0 2 4
𝑠3 0 1 0 0 1 4
Obj. Func. 0 2.5 -1.5 0 0 3

▪ −1.5 is the smallest negative number in the last row


▪ Column corresponding to the number −1.5 is the key column
▪ Find the ratio of RHS/Key column
▪ 4 is the smallest positive ratio (Don’t consider negative values)
▪ Row corresponding to the number 4 is the key row
▪ Intersection of key row and key column is the key element, here 0.5 is the key element.
▪ Leaving variable will be 𝑠2 and entry variable will be 𝑠1 , i.e., replace 𝑠1 in the first column by 𝑠1
▪ Now corresponding columns 𝑥1 , 𝑠1 and 𝑠3 should form the identity matrix, hence
▪ The key element is 0.5 ( not equal to 1 then make the key element 1 by dividing entire key row by 0.5 or multiply 2)
▪ Perform row operations to make all numbers above and below the key element become 0.
▪ Here perform 𝑅2′ → 2𝑅2 ; 𝑅1′ → 𝑅1 + R 2 /2 ; 𝑅3′ → 𝑅3 ; 𝑅4′ → 𝑅4 + 3𝑅1 /2

Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝑠3 RHS Hence, no negative number in


𝑥1 1 3 0 1 0 3 the last row, hence we
𝑠1 0 5 1 2 0 4 obtained the optimal solution.
𝒙𝟏 = 𝟑, 𝒙𝟐 = 𝟎 and maximum
𝑠3 0 1 0 0 1 4 value of 𝒁 = 𝟗
Obj. Func. 0 10 0 3 0 9
Problem 02: Solve LP problem using big M method (Penalty method).
Max 𝒁 = 𝟑𝒙𝟏 + 𝟐𝒙𝟐
Subjected to 𝟐𝒙𝟏 + 𝒙𝟐 ≤ 𝟐
3𝒙𝟏 + 𝟒𝒙𝟐 ≥12
𝒙𝟏 , 𝒙𝟐 ≥ 𝟎

Step1 : Introduce slack, surplus and artificial variables also penalty M in the objective function
Max 𝑍 = 3𝑥1 + 2𝑥2 − 0𝑠1 − 0𝑠2 − 𝑀𝐴1 -(1)
Subjected to 2𝑥1 + 𝑥2 + 𝑠1 = 2 -(2)
3𝑥1 + 4𝑥2 − 𝑠2 + 𝐴1 =12 -(3)
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝐴1 ≥ 0
Step2: Eliminate 𝑀 in the objective function: 1 + 𝑀 3

Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 RHS Ratio


𝑠1 2 1 1 0 0 2
𝐴1 3 4 0 -1 1 12
Obj. Func -3 -2 0 0 M 0

Note:
As the columns corresponding to the basic variables 𝑠1 and 𝐴1 do not conform to the standard form, it implies that other
than the intersection of the 𝑠1 (and 𝐴1 ) row with the 𝑠1 (and 𝐴1 ) column, all entries above and below should be zero.
Here we can see 𝑀 in the last row. Eliminate 𝑀 by row operation
Step2: Eliminate 𝑀 in the objective function: 𝑅3′ → 𝑅3 − 𝑀𝑅2
Step3: Construct the table

Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 RHS Ratio


𝑠1 2 1 1 0 0 2
𝐴1 3 4 0 -1 1 12
Obj. Func −(3 + 3𝑀) − 2 + 4𝑀 0 𝑀 0 −12𝑀

Step4: Apply simplex method to get the optimal solution

Note: Since the value of the penalty 𝑀 is very big, we can assume 𝑀 value as 10( or 100, 1000 also) for our
convivence. Then − 3 + 3𝑀 = −33 and − 2 + 4𝑀 = −42. −42 < −33 hence
− 2 + 4𝑀 is the smallest negative number in the last row
Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 RHS Ratio
𝑠1 2 1 1 0 0 2 2
𝐴1 3 4 0 -1 1 12 3
Obj. Func −(3 + 3𝑀) − 2 + 4𝑀 0 𝑀 0 −12𝑀
▪ −(2 + 4𝑀) is the smallest negative number in the last row
▪ Column corresponding to the number −(2 + 4𝑀) is the key column
▪ Find the ratio of RHS/Key column
▪ 2 is the smallest positive ratio (Don’t consider negative values)
▪ Row corresponding to the number 2 is the key row
▪ Intersection of key row and key column is the key element, here 1 is the key element.
▪ Leaving variable will be 𝑠1 and entry variable will be 𝑥2 , i.e., replace 𝑠1 in the first column by 𝑥2
▪ Now corresponding columns 𝑥2 and 𝐴1 should form the identity matrix, hence
▪ The key element is 1 (if not equal to 1 then make the key element 1 by dividing entire key row by that key element)
▪ Perform row operations to make all numbers above and below the key element become 0.
▪ Here perform 𝑅2′ → 𝑅2 − 4R1 ; 𝑅3′ → 𝑅3 + 2 + 4𝑀 𝑅1

Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 RHS Ratio


𝑥2 2 1 1 0 0 2
𝐴1 -5 0 -4 -1 1 4
Obj. Func 5𝑀 + 1 0 4𝑀 + 2 𝑀 0 4 − 4𝑀

For some large value of 𝑀 say 10, 5𝑀 + 1 = 51 > 0, 4𝑀 + 2 = 42 > 0 and 𝑀 = 10 > 0. Hence, no negative number in
the last row, hence we obtained the optimal level. But 𝑨𝟏 is present in the first column, hence NO SOLUTION
Problem 03: Solve LP problem using big M method (Penalty method).
Min 𝒁 = 𝟐𝒙𝟏 + 𝟑𝒙𝟐
Subjected to 𝒙𝟏 + 𝒙𝟐 ≥ 𝟓
𝒙𝟏 + 𝟐𝒙𝟐 ≥ 𝟔
𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Step1 : Convert Min 𝑍 in to Maximization problem, then introduce slack, surplus and artificial variables also penalty M
in the objective function
Max Z ∗ = −𝑧 = −2𝑥1 − 3𝑥2 − 0𝑠1 − 0𝑠2 − 𝑀𝐴1 − 𝑀𝐴2 -(1)
Subjected to 𝑥1 + 𝑥2 − 𝑠1 + 𝐴1 = 5 -(2)
𝑥1 + 2𝑥2 − 𝑠2 + 𝐴2 = 6 -(3)
𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝐴1 , 𝐴2 ≥ 0
Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 𝐴2 RHS Ratio
𝐴1 1 1 -1 0 1 0 5 5
𝐴2 1 2 0 -1 0 1 6 3
Obj. Func 2 3 0 0 𝑀 𝑀 0
Step2: Eliminate 𝑀 in the objective function: 𝑅3′ → 𝑅3 − 𝑀𝑅1 − 𝑀𝑅2
Step3: Construct the table and follow the procedure of simplex method, we arrive at
Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 𝐴2 RHS Ratio
𝐴1 1 1 -1 0 1 0 5 5
𝐴2 1 2 0 -1 0 1 6 3
Obj. Func 2 − 2𝑀 3 − 3𝑀 𝑀 𝑀 0 0 −11𝑀
Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 𝐴2 RHS Ratio
𝐴1 1 1 -1 0 1 0 5 5
𝐴2 1 2 0 -1 0 1 6 3
Obj. Func 2 − 2𝑀 3 − 3𝑀 𝑀 𝑀 0 0 −11𝑀

Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 RHS Ratio


𝐴1 0.5 0 -1 0.5 1 2 4
𝑥2 0.5 1 0 -0.5 0 3 6
Obj. Func 0.5(1-M) 0 𝑀 0.5(3 − 𝑀) 0 −2𝑀 − 9

Basis 𝑥1 𝑥2 𝑠1 𝑠2 RHS Ratio


𝑥1 1 0 -2 1 4
𝑥2 0 1 1 -1 1
Obj. Func 0 0 1 1 -11

Hence, there are no negative numbers in the last row, optimal solution is 𝑥1 = 4, 𝑥2 = 1 and 𝑀𝑎𝑥 𝑍 ∗ = −11 ⇒
𝑀𝑖𝑛 𝑍 = −𝑀𝑎𝑥 𝑍 ∗ ⇒11
2-phase Simplex Method
• The two-phase simplex method is another method to solve a given LPP involving some artificial variables. The
solution is obtained in two phases
Phase 1
• In this phase, we construct an auxiliary LPP leading to a final simplex table containing a basic feasible solution to
the original problem.
Step 1 Assign a cost –1 to each artificial variable and a cost 0 to all other variables and get a new objective
function Z* = – A1 – A2 – A3... where Ai are artificial variables.
Step 2 Write down the auxiliary LPP in which the new objective function is to be maximized, subject to the given
set of constraints.
Step 3 Solve the auxiliary LPP by simplex method until either of the following three cases arise:
(i) Max Z* < 0 and at least one artificial variable appears in the optimum basis at positive level.
(ii) Max Z* = 0 and at least one artificial variable appears in the optimum basis at zero level.
(iii) Max Z* = 0 and no artificial variable appears in the optimum basis.
In case (i), given LPP does not possess any feasible solution, whereas in cases (ii) and (iii) we go to phase II.
• Note: Whenever an artificial variable happens to leave in the first column, remove the artificial variable column
Phase II
Use the optimum basic feasible solution of phase I as a starting solution for the original LPP. Assign the actual
costs to the variable in the objective function and a zero cost to every artificial variable in the basis at zero level.
Delete the artificial variable column that is eliminated from the basis in phase I from the table. Apply simplex
method to the modified simplex table obtained at the end of phase I till an optimum basic feasible solution is
obtained or till there is an indication of unbounded solution.
Problem 01: Solve LP problem using two-phase simplex method
Min 𝒁 = −𝟐𝒙𝟏 − 𝒙𝟐
Subjected to 𝒙𝟏 + 𝒙𝟐 ≥ 𝟐
𝒙𝟏 + 𝒙𝟐 ≤ 𝟒 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Write the given LPP in standard form
𝑀𝑎𝑥 𝑍 ∗ = 2𝑥1 + 𝑥2 − 0𝑠1 − 0𝑠2 − 𝐴1
STC 𝑥1 + 𝑥2 − 𝑠1 + 𝐴1 = 2
𝑥1 + 𝑥2 + 𝑠2 = 4 , 𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0
Phase 1 : Write the Auxiliary equation 𝑀𝑎𝑥 𝑍 ∗∗ = −𝐴1
STC 𝑥1 + 𝑥2 − 𝑠1 + 𝐴1 = 2 (1)
𝑥1 + 𝑥2 + 𝑠2 = 4 , 𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0
Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 RHS Ratio
𝐴1 1 1 -1 0 1 2 2
𝑠2 1 1 0 1 0 4 4
Obj. Func 0 0 0 0 1 0
Columns of the basic variables does not form the identity matrix hence eliminate 1 using row operation: 𝑅3′ → 𝑅3 − 𝑅1
Now apply simplex algorithm to solve the obtained LPP
Basis 𝑥1 𝑥2 𝑠1 𝑠2 𝐴1 RHS Ratio
𝐴1 1 1 -1 0 1 2 2
𝑠2 1 1 0 1 0 4 4
Obj. Func -1 -1 1 0 0 -2
Basis 𝑥1 𝑥2 𝑠1 𝑠2 RHS Ratio
𝑥1 1 1 -1 0 2
𝑠2 0 0 1 1 2
Obj. Func 0 0 0 0 0

Since there are no negative numbers in the last row, table is in optimum state. Hence continue to phase 2
Phase 2
Remove the column 𝑨𝟏 and replace the costs of the original objective function in the last row of the table obtained
in phase 1
In Phase 2
Basis 𝑥1 𝑥2 𝑠1 𝑠2 RHS Ratio
1. Remove 𝐴𝑖 ’s columns
𝑥1 1 1 -1 0 2 2. Keep all the rows except
𝑠2 0 0 1 1 2 last row as it is and take the
coefficients of the original obj
Obj. Func -2 -1 0 0 0
function for the last row

Since 𝑥1 and 𝑠2 columns does not constitute the standard form, convert the table in to standard form, i.e., intersection
of 𝑥1 (and 𝑠2 ) row with 𝑥1 (and 𝑠2 ) column =1 and all the elements above and below are 0 by performing row
operation
𝑅3′ → 𝑅3 + 2𝑅1
Basis 𝑥1 𝑥2 𝑠1 𝑠2 RHS Ratio
𝑥1 1 1 -1 0 2 2
𝑠2 0 0 1 1 2 -
Obj. Func 0 1 -2 0 4
Here -2 is the smallest negative number

Basis 𝑥1 𝑥2 𝑠1 𝑠2 RHS Ratio


𝑥1 1 1 -1 0 2 -
𝑠2 0 0 1 1 2 2
Obj. Func 0 1 -2 0 4

Basis 𝑥1 𝑥2 𝑠1 𝑠2 RHS Ratio


𝑥1 1 1 0 1 4
𝑠1 0 0 1 1 2 -
Obj. Func 0 1 0 2 8
Since there are no positive numbers in the last row, table is in optimum state. Hence the solution is
𝒙𝟏 = 𝟒, 𝒙𝟐 = 𝟎, 𝑴𝒊𝒏 𝒁 = −𝑴𝒂𝒙𝒁∗ = −(𝟖)
Problem 02: Solve LP problem using two-phase simplex method
Max 𝒁 = 𝟓𝒙𝟏 − 𝟒𝒙𝟐 + 𝟑𝒙𝟑
Subjected to 𝟐𝒙𝟏 + 𝒙𝟐 − 𝟔𝒙𝟑 = 𝟐𝟎 , 𝟔𝒙𝟏 + 𝟓𝒙𝟐 + 𝟏𝟎𝒙𝟑 ≤ 𝟕𝟔 , 𝟖𝒙𝟏 − 𝟑𝒙𝟐 + 𝟔𝒙𝟑 ≤ 𝟓𝟎, 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 ≥ 𝟎
Write the given LPP in standard form
𝑀𝑎𝑥 𝑍 = 5𝑥1 − 4𝑥2 + 3𝑥3 − 0𝑠1 − 0𝑠2 − 𝐴1
STC 2𝑥1 + 𝑥2 − 6𝑥3 + 𝐴1 = 20
6𝑥1 + 5𝑥2 + 10𝑥3 + 𝑠1 = 76
8𝑥1 − 3𝑥2 + 6𝑥3 + 𝑠2 = 50, 𝑥1 , 𝑥2 , 𝑥3 , 𝑠1 , 𝑠2 , 𝐴1 ≥ 0
Phase 1 Write the Auxiliary equation
𝑀𝑎𝑥 𝑍 ∗ = −𝐴1
STC 2𝑥1 + 𝑥2 − 6𝑥3 + 𝐴1 = 20 -(1)
6𝑥1 + 5𝑥2 + 10𝑥3 + 𝑠1 = 76 -(2)
8𝑥1 − 3𝑥2 + 6𝑥3 + 𝑠2 = 50, 𝑥1 , 𝑥2 , 𝑥3 , 𝑠1 , 𝑠2 , 𝐴1 ≥ 0
Basis 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝐴1 RHS Ratio
𝐴1 2 1 -6 0 0 1 20 10
𝑠1 6 5 10 1 0 0 76 12.66
𝑠2 8 -3 6 0 1 0 50 6.25
Obj. Func 0 0 0 0 0 1 0

Columns of the basic variables does not form the identity matrix hence eliminate 1 using row operation: 𝑅4′ → 𝑅4 − 𝑅1
Now apply simplex algorithm to solve the obtained LPP
Basis 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝐴1 RHS Ratio
𝐴1 2 1 -6 0 0 1 20 10
𝑠1 6 5 10 1 0 0 76 12.66
𝑠2 8 -3 6 0 1 0 50 6.25
Obj. Func -2 -1 6 0 0 0 -20

Basis 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 𝐴1 RHS Ratio


𝐴1 0 7/4 -15/2 0 -1/4 1 15/2 4.28
𝑠1 0 29/4 11/2 1 -3/4 0 77/2 5.3
𝑥1 1 -3/8 3/4 0 1/8 0 25/4 -
Obj. Func 0 -7/4 15/4 0 1/4 0

Basis 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 RHS Ratio


𝑥2 0 1 -30/7 0 -1/7 30/7
𝑠1 0 0 256/7 1 2/7 52/7
𝑥1 1 0 -6/7 0 1/14 55/7
Obj. Func 0 0 0 0 0
Since there are no negative numbers in the last row, table is in optimum state. Hence continue to phase 2
Phase 2
Remove the column 𝑨𝟏 and replace the costs of the original objective function in the last row of the table obtained
in phase 1
In Phase 2
Basis 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 RHS Ratio 1. Remove 𝐴𝑖 ’s columns
𝑥2 0 1 -30/7 0 -1/7 30/7 2. Keep all the rows except
last row as it is and take the
𝑠1 0 0 256/7 1 2/7 52/7 coefficients of the original obj
𝑥1 1 0 -6/7 0 1/14 55/7 function for the last row
Obj. Func -5 4 -3 0 0 0
Since 𝑥1 , 𝑥2 and 𝑠1 columns does not constitute the standard form, convert the table in to standard form, i.e.,
intersection of 𝑥1 (and 𝑥2 , 𝑠2 ) row with 𝑥1 (and𝑥2 , 𝑠2 ) column =1 and all the elements above and below are 0 by
performing row operation
𝑅4′ → 𝑅4 + 5𝑅3 − 4𝑅1
Basis 𝑥1 𝑥2 𝑥3 𝑠1 𝑠2 RHS Ratio
𝑥2 0 1 -30/7 0 -1/7 30/7
𝑠1 0 0 256/7 1 2/7 52/7
𝑥1 1 0 -6/7 0 1/14 55/7
Obj. Func 0 0 69/7 0 13/14 155/7
Since there are no positive numbers in the last row, table is in optimum state. Hence the solution is
𝒙𝟏 = 𝟓𝟓/𝟕, 𝒙𝟐 = 𝟑𝟎/𝟕, 𝒙𝟑 = 𝟎, 𝑴𝒂𝒙 𝒁 = 𝟏𝟓𝟓/𝟕
Points to remember to solve LPP:

Simplex Method: • Problems should be of type Max – Standard form


• The basis should have the variables which are added in standard form
• If the decision variables(𝑥, 𝑦, 𝑧 𝑜𝑟 𝑥𝑖 ) are not present the basis then then the Linear
Programming Problem (LPP) is unsolvable
• While doing row operation, do not multiply any constant to the row which is
changing other than key row
• Columns corresponding to Basic variables should form an identity matrix.
Big M Method • All the rules of simplex method is applicable
• Introduce artificial variables along with the surplus variables to ≥ constraints
• Introduce only artificial variables to constraint equations
• If an artificial variable remains in the first column at the optimal level of the simplex
table, then the Linear Programming Problem (LPP) is unsolvable
• Whenever an artificial variable happens to leave in the first column, remove the
artificial variable column
Two-phase Method • All the rules of simplex method is applicable
• Consider only artificial variables in objective function in Phase 1
• Keeping all other rows replace costs of the original function in LPP and solve
Online Calculators

Graphical Method: https://cbom.atozmath.com/CBOM/Simplex.aspx?q=gm

Simplex Method or Big M method: https://linprog.com/en/main-simplex-method

Two phase simplex method: https://www.pmcalculators.com/simplex-method-calculator/

You might also like