Module 2
Module 2
MODULE - 2
1
OPTIMIZATION TECHNIQUES
• Introduction
• Standard form of linear programming (LP) problem
• Canonical form of LP problem
• Assumptions in LP Models
• Elementary operations, Graphical method for two variable
optimization Problem; Examples.
• Motivation of simplex method, Simplex algorithm
• Simplex criterion
• Minimization versus maximization problems.
2
INTRODUCTION
3
INTRODUCTION
Why LP is Needed?
LP is essential because it provides a systematic and efficient method to solve optimization problems
that arise in real-world scenarios. Here are the key reasons why LP is needed:
1. Optimal Resource Allocation
• LP helps allocate limited resources like time, cost, man power, and materials in the most efficient way
possible.
• It ensures the maximum utilization of resources while minimizing wastage.
2. Cost Minimization and Profit Maximization
• Businesses use LP to minimize operational costs or maximize profits by optimizing production
schedules, inventory levels, and transportation routes.
3. Decision-Making under Constraints
• Real-world problems often come with constraints, such as budget limits, capacity restrictions, or legal
requirements. LP provides a structured approach to finding feasible and optimal solutions.
4
INTRODUCTION
5
Applications of LP
Applications of LP
Cost Minimization: Resource Allocation: Treatment Scheduling: Supply Chain Optimization: Load Balancing:
Optimize resource usage to Allocate raw materials, labor, Plan patient appointments Optimize inventory levels and Allocate electricity across
reduce production or and machinery to maximize and treatments to minimize distribution schedules to grids efficiently to reduce
operational costs. output. waiting time. minimize costs. losses.
Marketing Mix Optimization: Blending Problems: Epidemiology: Optimize Vehicle Routing: Find the Renewable Energy:
Allocate budget across various Optimize the mix of raw vaccination or testing most efficient routs for Optimize the placement and
marketing channels to achieve materials to meet quality strategies to maximize delivery vehicles to minimize capacity of renewable energy
max reach or impact. standards at minimum cost. coverage and efficiency. distance or time. plants.
6
Standard form and Canonical form of Linear Programming (LP) problem
7
Standard form and Canonical form of Linear Programming (LP) problem
Where Where
𝑥1 𝑏1 𝑐1 𝑥1 𝑏1 𝑐1
𝑥2 𝑏2 𝑐2 𝑥2 𝑏2 𝑐2
𝑋= ⋮ , b= , 𝑐= ⋮ 𝑋= ⋮ , b= , 𝑐= ⋮
⋮ ⋮
𝑥𝑛 𝑏𝑚 𝑐𝑛 𝑥𝑛 𝑏𝑚 𝑐𝑛
8
Standard form and Canonical form of Linear Programming (LP) problem
Note:
• If the constraint appears in the ≤ type of inequality as
• If 𝑥𝑖 ≤ 0 then 𝑥𝑖 = −𝑥𝑖′ , 𝑥𝑖′ ≥ 0.
𝒂𝒌𝟏 𝒙𝟏 + 𝒂𝒌𝟐 𝒙𝟐 + ⋯ + 𝒂𝒌𝒏 𝒙𝒏 ≤ 𝒃𝒌
• If 𝑥𝑖 is unrestricted in sign, then 𝑥𝑖 = 𝑥𝑖′ − 𝑥𝑖″ ,
it can be converted into equality by adding a non-
𝑥𝑖′ ≥ 0, 𝑥𝑖″ ≥ 0
negative Slack Variable 𝒔 as
• The maximization of a function 𝑓 𝑥1 , 𝑥2 , … . , 𝑥𝑛 is
𝒂𝒌𝟏 𝒙𝟏 + 𝒂𝒌𝟐 𝒙𝟐 + ⋯ + 𝒂𝒌𝒏 𝒙𝒏 + 𝒔 = 𝒃𝒌
equivalent to the minimization of the negative of the
• If the constraint appears in the ≥ type of inequality as
same function. For example, the objective function
𝒂𝒌𝟏 𝒙𝟏 + 𝒂𝒌𝟐 𝒙𝟐 + ⋯ + 𝒂𝒌𝒏 𝒙𝒏 ≥ 𝒃𝒌
Minimize 𝑓 = 𝑐1 𝑥1 + 𝑐2 𝑥2 + ⋯ + 𝑐𝑛 𝑥𝑛
it can be converted into equality by subtracting a
is equivalent to
non-negative Surplus Variable 𝒔 as
Maximize 𝑓 ∗ = −𝑓 = −𝑐1 𝑥1 − 𝑐2 𝑥2 − ⋯ − 𝑐𝑛 𝑥𝑛
𝒂𝒌𝟏 𝒙𝟏 + 𝒂𝒌𝟐 𝒙𝟐 + ⋯ + 𝒂𝒌𝒏 𝒙𝒏 − 𝒔 = 𝒃𝒌
Consequently, the objective function can be
stated in the minimization form in any linear
programming problem.
9
Standard form and Canonical form of Linear Programming (LP) problem
Example 1: Example 2:
Max 𝑍 = 5𝑥1 + 3𝑥2 + 4𝑥3 Min 𝑍 = 4𝑥1 + 6𝑥2
Subject to Subject to
𝑥1 + 2𝑥2 + 𝑥3 ≤ 10 3𝑥1 + 2𝑥2 ≥ 12
2𝑥1 + 𝑥2 + 3𝑥3 ≤ 15 𝑥1 + 𝑥2 ≥ 5
and 𝑥1 , 𝑥2 , 𝑥3 ≥ 0 and 𝑥1 , 𝑥2 ≥ 0
Solution: Solution:
Standard Form: Standard Form: Canonical Form:
Canonical Form:
Max 𝑍 = 5𝑥1 + 3𝑥2 + 4𝑥3 Min 𝑍 = 4𝑥1 + 6𝑥2 Max 𝑍 ∗ = −4𝑥1 − 6𝑥2
Max 𝑍 = 5𝑥1 + 3𝑥2 +4𝑥3
Subject to Subject to Subject to
Subject to
𝑥1 + 2𝑥2 + 𝑥3 + 𝑠1 = 10 3𝑥1 + 2𝑥2 − 𝑠1 = 6 −3𝑥1 − 2𝑥2 ≤ −6
𝑥1 + 2𝑥2 + 𝑥3 ≤ 10
2𝑥1 + 𝑥2 + 3𝑥3 + 𝑠2 = 15 𝑥1 + 𝑥2 − 𝑠2 = 5 −𝑥1 − 𝑥2 ≤ −5
2𝑥1 + 𝑥2 + 3𝑥3 ≤ 15
and 𝑥1 , 𝑥2 , 𝑥3 ≥ 0
and 𝑥1 , 𝑥2 , 𝑥3 , 𝑠1 , 𝑠2 ≥ 0 and 𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0 and 𝑥1 , 𝑥2 ≥ 0
10
Standard form and Canonical form of Linear Programming (LP) problem
Example 3: Example 4:
Max 𝑍 = 8𝑥1 + 7𝑥2 Min 𝑍 = 3𝑥1 + 5𝑥2 + 7𝑥3
Subject to Subject to
2𝑥1 + 3𝑥2 ≤ 15 2𝑥1 + 3𝑥2 + 𝑥3 ≥ 10
𝑥1 + 2𝑥2 ≤ 4 4𝑥1 + 𝑥2 + 2𝑥3 ≤ 12
𝑥1 − 2𝑥2 ≥5 3𝑥1 + 5𝑥2 + 4𝑥3 ≥ 15
4𝑥1 − 𝑥2 ≥ 10 and 𝑥1 , 𝑥2 , 𝑥3 ≥ 0
and 𝑥1 , 𝑥2 ≥ 0
Solution: Solution:
Standard Form: Canonical Form: Standard Form: Canonical Form:
Max 𝑍 = 8𝑥1 + 7𝑥2 Max 𝑍 = 8𝑥1 + 7𝑥2
Subject to Subject to Min 𝑍 = 3𝑥1 + 5𝑥2 + 7𝑥3 Max 𝑍 ∗ = −3𝑥1 − 5𝑥2 − 7𝑥3
2𝑥1 + 3𝑥2 + 𝑠1 = 15 2𝑥1 + 3𝑥2 ≤ 15 Subject to Subject to
𝑥1 + 2𝑥2 + 𝑠2 = 4 𝑥1 + 2𝑥2 ≤ 4 2𝑥1 + 3𝑥2 + 𝑥3 − 𝑠1 = 10 −2𝑥1 − 3𝑥2 − 𝑥3 ≤ −10
𝑥1 − 2𝑥2 − 𝑠3 =5 −𝑥1 + 2𝑥2 ≤ −5 4𝑥1 + 𝑥2 + 2𝑥3 + 𝑠2 = 12 4𝑥1 + 𝑥2 + 2𝑥3 ≤ 12
4𝑥1 − 𝑥2 − 𝑠4 = 10 −4𝑥1 + 𝑥2 ≤ −10 3𝑥1 + 5𝑥2 + 4𝑥3 − 𝑠3 = 15 −3𝑥1 − 5𝑥2 − 4𝑥3 ≤ −15
and 𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝑠3 , 𝑠4 ≥ 0 and 𝑥1 , 𝑥2 ≥ 0
and 𝑥1 , 𝑥2 , 𝑥3 , 𝑠1 , 𝑠2 , 𝑠3 ≥ 0 and 𝑥1 , 𝑥2 , 𝑥3 ≥ 0
Here 𝑠1 and 𝑠2 are Slack
variables, 𝑠3 and 𝑠4 are Here 𝑠1 and 𝑠3 are Surplus
Surplus variables. variables, 𝑠2 is Slack variable.
11
Standard form and Canonical form of Linear Programming (LP) problem
Example 5:
Min 𝑍 = 2𝑥1 + 3𝑥2 + 5𝑥3
Subject to
−3𝑥1 + 4𝑥2 ≤ 5
𝑥1 + 3𝑥2 + 𝑥3 ≥ 4
𝑥1 + 𝑥3 ≤ 3
and 𝑥1 , 𝑥2 ≥ 0, 𝑥3 is unrestricted in sign.
Solution:
Standard Form: Canonical Form:
Min 𝑍 = 2𝑥1 + 3𝑥2 + 5(𝑥3′ − 𝑥3″ ) Max 𝑍 ∗ = −2𝑥1 − 3𝑥2 − 5 𝑥3′ − 𝑥3″
Min 𝑍 = 2𝑥1 + 3𝑥2 + 5𝑥3′ − 5𝑥3″ Max 𝑍 ∗ = −2𝑥1 − 3𝑥2 − 5𝑥3′ + 5𝑥3″
Subject to Subject to
−3𝑥1 + 4𝑥2 + 𝑠1 = 5 −3𝑥1 + 4𝑥2 ≤ 5
𝑥1 + 3𝑥2 + 𝑥3′ − 𝑥3″ − 𝑠2 = 4 −𝑥1 − 3𝑥2 − 𝑥3′ + 𝑥3″ ≤ −4
𝑥1 + 𝑥3′ − 𝑥3″ + 𝑠3 = 3 𝑥1 + 𝑥3′ − 𝑥3″ ≤ 3
Here 𝑠1 and 𝑠3 are Slack variables Since 𝑥3 is unrestricted in sign, ∴ 𝑥3 = 𝑥3′ − 𝑥3″
𝑠2 is Surplus variable.
Since 𝑥3 is unrestricted in sign, ∴ 𝑥3 = 𝑥3′ − 𝑥3″ .
12
Assumptions of LP Models
13
Assumptions of LP Models
1. Proportionality: The contribution of any decision variable to the objective function is proportional to its value.
i.e., If the profit of one item is A, the profit of two items is 2A. Thus, if the output (sales) is doubled, the profit
would also be doubled.
• Let's take one example: In diet problem, the contribution to the cost of the diet from 1kg of apples is
𝑅𝑠. 100, from 2kg of apples is 𝑅𝑠. 200 and from 4kg is 𝑅𝑠. 400.
2. Additivity: Total profit of objective function is determined by the sum of profit contributed by each product
separately.
• Let’s take one example: VM Ltd. Manufactures 2 products – P1 and P2. The profit/unit of the 2 products
is 𝑅𝑠. 50 and 𝑅𝑠. 60 respectively.
• Let 𝑥1 is units of P1 and 𝑥2 is units of P2
Profit 𝑍 = 50 1 + 60 1
Total profit 𝑍 = 50 𝑥1 + 60 𝑥2
Linearity means the variables are assumed to be mutually independent. In other words, the products
are assumed to be neither complements nor substitutes of each other. There is no interaction between
the variables.
14
Assumptions of LP Models
3. Continuity/Divisibility: The decision variables are continuous. This means a combination of outputs can be
used with the fractional values along with the integer values. In short, we can say if the profit of one item is A,
profit of ½ item is A/2.
4. Certainty: Coefficients of objective function and the coefficients of constraint inequalities are known with
certainty. i.e., They don’t change during or after the formulation
• Let’s take one example:
Maximize 𝑍 = 50𝑥1 + 60𝑥2 ⟵ Profit
Subject to 2𝑥1 + 𝑥2 ≤ 300, ⟵ Machine 1
3𝑥1 + 4𝑥2 ≤ 509, ⟵ Machine 2
4𝑥1 + 7𝑥2 ≤ 812, ⟵ Machine 3
and 𝑥1 , 𝑥2 ≥ 0
5. Finite Choices/Non-negativity: This assumption implies that the decision maker has certain choices, and the
decision variables assume non-negative values.
15
Graphical Method for Two Variable Optimization Problem
• The Graphical Method is a technique used to solve Linear Programming (LP) problems with two decision
variables (𝑥1 and 𝑥2 ).
• It involves plotting the constraints and objective function on a two-dimensional graph to find the optimal
solution.
• This method is simple and intuitive but only applicable to two-variable problems.
𝑍 = 𝑐1 𝑥1 + 𝑐2 𝑥2
• Identify the constraints in terms of 𝑥1 and 𝑥2 , including non-negative constraints (𝑥1 ≥ 0, 𝑥2 ≥ 0).
16
Graphical Method for Two Variable Optimization Problem
• Determine the side of the line that satisfies the inequality (e.g., use test points like the origin).
• The feasible region is the area where all constraints overlap, representing the set of feasible solutions.
• This region is typically a polygon in the first quadrant due to the non-negative constraints.
• Identify the vertices (corner points) of the feasible region. These are obtained by:
• Substitute the coordinates of each corner point into the objective function.
• For a maximization problem, choose the corner point with the highest 𝑍.
• For a minimization problem, choose the corner point with the lowest 𝑍.
18
Graphical Method for Two Variable Optimization Problem
Applications of the
Graphical Method
Transportation and
Business Optimization Resource Allocation Manufacturing Agriculture
Logistics
20
Graphical Method for Two Variable Optimization Problem
Example 1:
Let’s look at the profit maximization problem that our furniture manufacturer faces. The
company uses wood and labor to produce tables and chairs. Recall that unit profit for tables is 6, and unit
profit for chairs is 8. There are 300 board feet of wood available, and 110 hours of labor available. It
takes 30 board feet and 5 hours to make a table, and 20 board feet and 10 hours to make a chair. Table 1
contains the information for the LP problem. We will go through the step-by-step process of solving this
problem graphically.
Resource Table Chair Available
(𝒙𝟏 ) (𝒙𝟐 )
Wood 30 20 300
Labor 5 10 110
Unit Rs.6 Rs.8
profit
Solution: 300
𝑥2 = = 15
20
Formulate the LP problem
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 6𝑥1 + 8𝑥2 ⸫ (𝑥1 , 𝑥2 ) = (0,15)
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜
30𝑥1 + 20𝑥2 ≤ 300 Now substitute 𝑥2 = 0 in [1], we get
5𝑥1 + 10𝑥2 ≤ 110
and 𝑥1 , 𝑥2 ≥ 0 30𝑥1 = 300
First, we consider the constraint inequalities as
300
equalities, 𝑥1 = = 10
30
30𝑥1 + 20𝑥2 = 300 −−−−−→ [1]
⸫ 𝑥1 , 𝑥2 = 10,0
5𝑥1 + 10𝑥2 = 110 −−−−−−→ [2]
Consider the equation [2],
Consider the equation [1]
5𝑥1 + 10𝑥2 = 110
30𝑥1 + 20𝑥2 = 300
Substitute 𝑥1 = 0 in [2], we get
Substitute 𝑥1 = 0 in [1], we get
10𝑥2 = 110
20𝑥2 = 300 22
Graphical Method for Two Variable Optimization Problem
110
𝑥2 = = 11
10
⸫ 𝑥1 , 𝑥2 = 0,11
5𝑥1 = 110
110
𝑥1 = = 22
5
⸫ (𝑥1 , 𝑥2 ) = (22,0)
23
Graphical Method for Two Variable Optimization Problem
20𝑥1 = 80 Z = 96
D (0,10) Z = 6(0) +8(19)
𝑥1 = 4
Z = 80
Substitute 𝑥1 = 4 in [1] we get, Thus, the company’s optimal solution is to make four
30 4 + 20𝑥2 = 300 tables and nine chairs.
24
Ramalingam Sakthivel Assistant Professor (Senior Grade)
Graphical Method for Two Variable Optimization Problem
Example 2:
A manufacturer produces two types of models M1 and M2. Each M1 models requires 4 hours of
griding and 2 hours of polishing; whereas each M2 model requires 2 hours of grinding and 5 hours of
polishing. The manufacturer has 2 grinders and 3 polishers. Each grinder works for 40 hours a week and
each polisher works for 60 hours a week. Profit on an M1 is Rs.3 and on an M2 is Rs.4. whatever is
produced in a week is sold in the market. How should the manufacturer allocate his production capacity
to the two types of models so that he may make the maximum profit in a week?
25
Graphical Method for Two Variable Optimization Problem
Solution: 80
𝑥2 = = 40
2
Formulate the LP problem
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 3𝑥1 + 4𝑥2 ⸫ (𝑥1 , 𝑥2 ) = (0,40)
𝑆𝑢𝑏𝑗𝑒𝑐𝑡 𝑡𝑜
4𝑥1 + 2𝑥2 ≤ 80 Now substitute 𝑥2 = 0 in [1], we get
2𝑥1 + 5𝑥2 ≤ 180
𝑎𝑛𝑑 𝑥1 , 𝑥2 ≥ 0 4𝑥1 = 80
First, we consider the constraint inequalities as
80
equalities, 𝑥1 = = 20
4
4𝑥1 + 2𝑥2 = 80 −−−−−−−→ [1]
⸫ 𝑥1 , 𝑥2 = 20,0
2𝑥1 + 5𝑥2 = 180 −−−−−−→ [2]
Consider the equation [2],
Consider the equation [1]
2𝑥1 + 5𝑥2 = 180
4𝑥1 + 2𝑥2 = 80
Substitute 𝑥1 = 0 in [2], we get
Substitute 𝑥1 = 0 in [1], we get
5𝑥2 = 180
2𝑥2 = 80 26
Graphical Method for Two Variable Optimization Problem
180
𝑥2 = = 36
5
⸫ 𝑥1 , 𝑥2 = 0,36
2𝑥1 = 180
180
𝑥1 = = 90
2
⸫ (𝑥1 , 𝑥2 ) = (90,0)
27
Graphical Method for Two Variable Optimization Problem
16𝑥1 = 40 Z = 147.5
D (0,36) Z = 3(0) +4(36)
𝑥1 = 2.5
Z = 144
Substitute 𝑥1 = 2.5 in [1] we get, Thus, the manufacturer should allocate 2.5 units of
4 2.5 + 2𝑥2 = 80 model M1 and 35 units of model M2 to get the maximum
profit of 𝑅𝑠. 147 in a week
10 + 2𝑥2 = 80
That is,
2𝑥2 = 70
𝑍 = 𝑅𝑠. 3 2.5 + 𝑅𝑠. 4(35)
𝑥2 = 35 𝑍 = 𝑅𝑠. 147.5 𝑥1 = 2.5 𝑎𝑛𝑑 𝑥2 = 35
⸫ 𝐶 𝑥1 , 𝑥2 = 𝐶 2.5,35
28
Graphical Method for Two Variable Optimization Problem
30
Graphical Method for Two Variable Optimization Problem
To find F: To find G:
F is the intersection point of equation [1] and [3] G is the intersection point of equation [1] and [2]
[1] ⟹ 𝑥1 + 2𝑥2 = 6 −−−→ [4] [1] × 2 ⟹ 2𝑥1 + 4𝑥2 = 12 −−−→ [6]
2 ⟹ 𝑥1 + 𝑥2 = 4 −−−→ [5] 2 ⟹ 2𝑥1 + 𝑥2 = 8 −−−−→ [7]
Solve the equation [4] and [5], we get Solve the equation [6] and [7], we get
𝑥2 = 2 3𝑥2 = 4
Substitute 𝑥2 = 2 in [1] we get, 4
𝑥2 = 3 = 1.33
𝑥1 + 2(2) = 6
Substitute 𝑥2 = 1.33 in [1] we get,
𝑥1 + 4 = 6 𝑥1 + 2(1.33) = 6
𝑥1 = 2 𝑥1 + 2.66 = 6
⸫ 𝐹 𝑥1 , 𝑥2 = 𝐹 2,2 𝑥1 = 3.34
⸫ 𝐺 𝑥3 , 𝑥4 = 𝐺 3.34,1.33
31
Graphical Method for Two Variable Optimization Problem
That is,
Points Min Z=3x1+4x2
C (0,8) Z = 3(0) + 4(8) Min 𝑍 = 14
Z = 32 𝑥1 = 2 𝑎𝑛𝑑 𝑥2 = 2
E (0,4) Z = 3(0) +4(4)
Z = 16
F (2,2) Z = 3(2) +4(2)
Z = 6+8
Z = 14
G (3.34,1.33) Z = 3(3.34) +4(1.33)
Z = 10.02 + 5.32
Z = 15.34
32
Simplex Method
• The simplex method is designed to find the optimal solution to linear programming problems, typically
involving the maximization or minimization of an objective function.
33
Simplex Method
35
Simplex Method
Suppose we have to optimize (Maximize or Minimize) 𝑍, a linear function of n basic variables 𝑋1 , 𝑋2 , … , 𝑋𝑛 . The
LPP is written as:
Max 𝑍 = 𝐶1 𝑋1 + 𝐶2 𝑋2 + ⋯ + 𝐶𝑛 𝑋𝑛
Subject to the constraints
𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ + 𝑎1𝑛 𝑥𝑛 ≤ 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ + 𝑎2𝑛 𝑥𝑛 ≤ 𝑏2
⋮
𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 ≤ 𝑏𝑚
Step 1: Convert the LPP into standard form by adding slack variables.
We convert the given LPP into standard form by adding slack variables 𝑠1 , 𝑠2 , … , 𝑠𝑚 .
37
Simplex Method
• If at least one value of 𝑍𝑗 − 𝐶𝑗 is negative and corresponding to the most negative 𝑍𝑗 − 𝐶𝑗 , all the elements of the
column 𝑋𝑗 are negative or zero, the solution under test is an unbounded solution.
• Suppose at least one value of 𝑍𝑗 − 𝐶𝑗 is negative. Suppose the most negative value is, say 𝑍1 − 𝐶1 and at least
one entry in the column of 𝑋1 is negative. Then the solution under test is not optimal.
• Let 𝑋𝑗 be the variable which corresponds to the most negative value of 𝑍𝑗 − 𝐶𝑗 . This variable is called the
incoming variable
39
Simplex Method
𝐶1 𝐶2 … 𝐶𝑛 0 0 ….
𝐵 𝐶𝐵 𝑋𝐵 𝑋1 𝑋2 … 𝑋𝑛 𝑠1 𝑠2 …. Ratio
𝑋𝐵
൘𝑋
𝑗
Letting the most negative value is, say 𝑍2 − 𝐶2 , then the corresponding variable 𝑋2 is the entering to the basis.
Suppose 𝑠1 row is the minimum replacement ratio, then it will leave the basis. The element 𝑎22 is lies at the
intersection of the key row and key column, it is the key element or pivot element.
41
Simplex Method
Note:
For minimizing problem
• Convert the given LPP to standard form by subtracting surplus variables.
• 𝑍𝑗 − 𝐶𝑗 ≤ 0 for optimal solution. If not, take most positive 𝑍𝑗 − 𝐶𝑗 value column as entering variable.
• Calculate the replacement ratio by using the same conditions for max problem.
• Find the leaving variable.
• Continue the same way until the optimal solution is obtained.
42
Simplex Method
Example 1:
Max 𝒁 = 𝟑𝒙𝟏 + 𝟐𝒙𝟐
Subject to
𝒙𝟏 + 𝒙𝟐 ≤ 𝟒
𝒙𝟏 − 𝒙𝟐 ≤ 𝟐
And 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Solution:
The given problem is converted to standard The non-basic variables are 𝑥1 and 𝑥2 .
form by adding non-negative slack variables 𝑠1 and 𝑠2 Hence the non-basic solutions are 𝑥1 = 0 and 𝑥2 = 0.
The standard form of the LP problem is
Maz 𝑍 = 3𝑥1 + 2𝑥2 + 0𝑠1 + 0𝑠2 The basic variables are 𝑠1 and 𝑠2
Subject to 𝑥1 + 𝑥2 + 𝑠1 + 0𝑠2 = 4 ∴ Initial Basic Feasible Solution (IBFS) are
𝑥1 − 𝑥2 + 0𝑠1 + 𝑠2 = 2 𝑠1 = 4 and 𝑠2 = 2
And 𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0
43
Simplex Method
𝐶1 𝐶2 𝐶3 𝐶4
𝑅1
𝑅2
Since some 𝑍𝑗 − 𝐶𝑗 < 0. The current basic feasible solution is not optimal.
Negative minimum 𝑍𝑗 − 𝐶𝑗 is −3 and its column index is 1. So, the entering variable is 𝑥1 .
Minimum ratio is 2 and its row index is 2. So, the leaving basic variable is 𝑠2 .
∴ The pivot element is 1.
𝐸𝑛𝑡𝑒𝑟𝑖𝑛𝑔 = 𝑥1 , 𝐷𝑒𝑝𝑎𝑟𝑡𝑖𝑛𝑔 = 𝑠2 , 𝑃𝑖𝑣𝑜𝑡 𝐸𝑙𝑒𝑚𝑒𝑛𝑡 = 1
44
Simplex Method
𝑅2 𝑁𝑒𝑤 = 𝑅2 (𝑂𝑙𝑑)
𝑅2 𝑁𝑒𝑤 = 2 1 −1 0 1
𝑅1
𝑅2
45
Simplex Method
Since one 𝑍𝑗 − 𝐶𝑗 < 0. The current basic feasible solution is not optimal.
Negative minimum 𝑍𝑗 − 𝐶𝑗 is −5 and its column index is 2. So, the entering variable is 𝑥2 .
Minimum ratio is 1 and its row index is 1. So, the leaving basic variable is 𝑠1 .
∴ The pivot element is 2.
𝐸𝑛𝑡𝑒𝑟𝑖𝑛𝑔 = 𝑥2 , 𝐷𝑒𝑝𝑎𝑟𝑡𝑖𝑛𝑔 = 𝑠1 , 𝑃𝑖𝑣𝑜𝑡 𝐸𝑙𝑒𝑚𝑒𝑛𝑡 = 2
𝑅1 𝑁𝑒𝑤 = 𝑅1 𝑂𝑙𝑑 ÷ 2
𝑅1 𝑁𝑒𝑤 = 2 0 2 1 −1 ÷2
=1 0 1 0.5 − 0.5
46
Simplex Method
𝐶1 𝐶2 𝐶3 𝐶4
𝑅1
𝑅2
Example 2:
The standard form of the LP problem is
Min 𝒁 = 𝟓𝒙𝟏 + 𝟔𝒙𝟐
Min 𝑍 = 5𝑥1 + 6𝑥2 + 0𝑠1 + 0𝑠2 + 𝑀𝐴1 + 𝑀𝐴2
Subject to
Subject to 𝑥1 + 𝑥2 − 𝑠1 + 𝐴1 = 10
𝒙𝟏 + 𝒙𝟐 ≥ 𝟏𝟎
2𝑥1 + 4𝑥2 − 𝑠2 + 𝐴2 = 24
𝟐𝒙𝟏 + 𝟒𝒙𝟐 ≥ 𝟐𝟒
And 𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 , 𝐴1 , 𝐴2 ≥ 0
And 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
48
Simplex Method
𝐶1 𝐶2 𝐶3 𝐶4
𝑅1
𝑅2
Since some 𝑍𝑗 − 𝐶𝑗 > 0. The current basic feasible solution is not optimal.
Positive maximum 𝑍𝑗 − 𝐶𝑗 is 5𝑀 − 6 and its column index is 2. So, the entering variable is 𝑥2 .
Minimum ratio is 6 and its row index is 2. So, the leaving basic variable is 𝐴2 .
∴ The pivot element is 4.
𝐸𝑛𝑡𝑒𝑟𝑖𝑛𝑔 = 𝑥2 , 𝐷𝑒𝑝𝑎𝑟𝑡𝑖𝑛𝑔 = 𝐴2 , 𝑃𝑖𝑣𝑜𝑡 𝐸𝑙𝑒𝑚𝑒𝑛𝑡 = 4
49
Simplex Method
𝑅2 𝑁𝑒𝑤 = 𝑅2 (𝑂𝑙𝑑) ÷ 4
𝑅2 𝑁𝑒𝑤 = 24 2 4 0 −1 0 ÷4
= 6 0.5 1 0 − 0.25 0
𝑅1
𝑅2
50
Simplex Method
Since one 𝑍𝑗 − 𝐶𝑗 > 0. The current basic feasible solution is not optimal.
Positive maximum 𝑍𝑗 − 𝐶𝑗 is 0.5𝑀 − 2 and its column index is 1. So, the entering variable is 𝑥1 .
Minimum ratio is 8 and its row index is 1. So, the leaving basic variable is 𝐴1 .
∴ The pivot element is 0.5.
𝐸𝑛𝑡𝑒𝑟𝑖𝑛𝑔 = 𝑥1 , 𝐷𝑒𝑝𝑎𝑟𝑡𝑖𝑛𝑔 = 𝐴1 , 𝑃𝑖𝑣𝑜𝑡 𝐸𝑙𝑒𝑚𝑒𝑛𝑡 = 0.5
51
Simplex Method
𝐶1 𝐶2 𝐶3 𝐶4
𝑅1
𝑅2
𝐶1 𝐶2 𝐶3 𝐶4 𝐶5 𝐶6 𝐶7 𝐶8
𝑅1
𝑅2
𝑅3
Since some 𝑍𝑗 − 𝐶𝑗 > 0. The current basic feasible solution is not optimal.
Positive maximum 𝑍𝑗 − 𝐶𝑗 is 3𝑀 − 3 and its column index is 2. So, the entering variable is 𝑥2 .
Minimum ratio is 1.25 and its row index is 1. So, the leaving basic variable is 𝑠1 .
∴ The pivot element is 4.
𝐸𝑛𝑡𝑒𝑟𝑖𝑛𝑔 = 𝑥2 , 𝐷𝑒𝑝𝑎𝑟𝑡𝑖𝑛𝑔 = 𝑠1 , 𝑃𝑖𝑣𝑜𝑡 𝐸𝑙𝑒𝑚𝑒𝑛𝑡 = 4
54
Simplex Method
𝑅1 𝑁𝑒𝑤 = 𝑅1 (𝑂𝑙𝑑) ÷ 4
𝑅1 𝑁𝑒𝑤 = 5 −3 4 0 0 1 0 0 0 ÷4
= 4 1 3 1 −1 0 −1 0 1
𝑅3 𝑁𝑒𝑤 = 𝑅3 (𝑂𝑙𝑑)
= 3 1 0 1 −1 0 0 1 0
55
Simplex Method
𝐶1 𝐶2 𝐶3 𝐶4 𝐶5 𝐶6 𝐶7 𝐶8
𝑅1
𝑅2
𝑅3
Since some 𝑍𝑗 − 𝐶𝑗 > 0. The current basic feasible solution is not optimal.
Positive maximum 𝑍𝑗 − 𝐶𝑗 is 3.25𝑀 − 4.25 and its column index is 1. So, the entering variable is 𝑥1 .
Minimum ratio is 0.0769 and its row index is 2. So, the leaving basic variable is 𝐴1 .
∴ The pivot element is 3.25.
𝐸𝑛𝑡𝑒𝑟𝑖𝑛𝑔 = 𝑥1 , 𝐷𝑒𝑝𝑎𝑟𝑡𝑖𝑛𝑔 = 𝐴1 , 𝑃𝑖𝑣𝑜𝑡 𝐸𝑙𝑒𝑚𝑒𝑛𝑡 = 3.25
56
Simplex Method
= 3 1 0 1 −1 0 0 1
57
Simplex Method
𝐶1 𝐶2 𝐶3 𝐶4 𝐶5 𝐶6 𝐶7
𝑅1
𝑅2
𝑅3
Since some 𝑍𝑗 − 𝐶𝑗 > 0. The current basic feasible solution is not optimal.
Variable 𝑥3″ should enter into the basis, but all the coefficients in the 𝑥3″ column are negative. So 𝑥3″ can
not be entered into the basis.
Hence, the solution to the given problem is unbounded.
58
Simplex Method
Example 4:
Max 𝒁 = 𝟔𝒙𝟏 + 𝟑𝒙𝟐
Subject to
𝟐𝒙𝟏 + 𝟓𝒙𝟐 ≤ 𝟏𝟐𝟎
𝟐𝒙𝟏 + 𝒙𝟐 ≤ 𝟒𝟎
And 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎
Solution:
The given problem is converted to standard The non-basic variables are 𝑥1 and 𝑥2 .
form by adding non-negative slack variables 𝑠1 and 𝑠2 . Hence the non-basic solutions are 𝑥1 = 0 and 𝑥2 = 0.
The standard form of the LP problem is
Maz 𝑍 = 6𝑥1 + 3𝑥2 + 0𝑠1 + 0𝑠2 The basic variables are 𝑠1 and 𝑠2
Subject to 2𝑥1 + 5𝑥2 + 𝑠1 + 0𝑠2 = 120 ∴ Initial Basic Feasible Solution (IBFS) are
2𝑥1 + 𝑥2 + 0𝑠1 + 𝑠2 = 40 𝑠1 = 120 and 𝑠2 = 40
And 𝑥1 , 𝑥2 , 𝑠1 , 𝑠2 ≥ 0
59
Simplex Method
𝐶1 𝐶2 𝐶3 𝐶4
𝑅1
𝑅2
Since some 𝑍𝑗 − 𝐶𝑗 < 0. The current basic feasible solution is not optimal.
Negative minimum 𝑍𝑗 − 𝐶𝑗 is −6 and its column index is 1. So, the entering variable is 𝑥1 .
Minimum ratio is 20 and its row index is 2. So, the leaving basic variable is 𝑠2 .
∴ The pivot element is 2.
𝐸𝑛𝑡𝑒𝑟𝑖𝑛𝑔 = 𝑥1 , 𝐷𝑒𝑝𝑎𝑟𝑡𝑖𝑛𝑔 = 𝑠2 , 𝑃𝑖𝑣𝑜𝑡 𝐸𝑙𝑒𝑚𝑒𝑛𝑡 = 2
60
Simplex Method
𝑅2 𝑁𝑒𝑤 = 𝑅2 𝑂𝑙𝑑 ÷ 2
𝑅2 𝑁𝑒𝑤 = 40 2 1 0 1 ÷2
= 20 1 0.5 0 0.5
𝑅1
𝑅2
61
Simplex Method
62