0% found this document useful (0 votes)
3 views62 pages

Module 2

Module 2 covers Linear Programming (LP), a mathematical technique for optimizing a linear objective function under constraints. It discusses the standard and canonical forms of LP problems, the assumptions in LP models, and various methods such as the Simplex algorithm. The module also highlights the importance and applications of LP in resource allocation, cost minimization, and decision-making across various industries.
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)
3 views62 pages

Module 2

Module 2 covers Linear Programming (LP), a mathematical technique for optimizing a linear objective function under constraints. It discusses the standard and canonical forms of LP problems, the assumptions in LP models, and various methods such as the Simplex algorithm. The module also highlights the importance and applications of LP in resource allocation, cost minimization, and decision-making across various industries.
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/ 62

OPTIMIZATION TECHNIQUES

MODULE - 2

1
OPTIMIZATION TECHNIQUES

Module 2: Linear Programming

• 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

What is Linear Programming (LP)?


• Linear Programming is a mathematical technique used to optimize a linear objective function, subject to a
set of linear equality and inequality constraints.
• Objective Function: A linear function that represents the goal of optimization (e.g., profit, cost, or
resource usage).
• Constraints: A set of linear equations or inequalities that restrict the values of decision variables.
• Decision Variables: The unknowns to be determined in the problem.
• Feasible Region: The set of all points that satisfy the constraint.

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

4. Efficiency with Modern Algorithms


• Advanced algorithms like the Simplex Method and Interior Point Methods allow solving large and
complex LP problems shortly and accurately.
5. Improved Competitiveness
• By optimizing operations, organizations can gain a competitive edge, reduce expenses, and improve
service quality.
6. Basis for Advanced Optimization Techniques
• LP serves as the foundation for other optimization methods like Integer Programming, Nonlinear
Programming, and Dynamic Programming, which address more complex scenarios.

5
Applications of LP

Applications of LP

Manufacturing and Transportation and


Business and Economics Healthcare Energy and Utilities
Production Logistics

Profit maximization: Production Scheduling: Hospital Resource Power Generation


Transportation Problem: Optimization: Determine the
Determine the best Plan production schedules to Allocation: Optimize the Minimize transportation costs best mix of energy sources to
combination of products or maximize efficiency and allocation of medical staff, while meeting supply and minimize costs while meeting
services to maximize profits. minimize idle time. equipment, and facilities. demand at multiple locations. demand.

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

Standard Form of LP: Canonical Form of LP:

Max or Min 𝒇 𝒙𝟏 , 𝒙𝟐 , … . , 𝒙𝒏 = 𝒄𝟏 𝒙𝟏 + 𝒄𝟐 𝒙𝟐 + ⋯ + Max 𝒇 𝒙𝟏 , 𝒙𝟐 , … . , 𝒙𝒏 = 𝒄𝟏 𝒙𝟏 + 𝒄𝟐 𝒙𝟐 + ⋯ + 𝒄𝒏 𝒙𝒏


𝒄𝒏 𝒙 𝒏
Subject to the constraints
Subject to the constraints 𝒂𝟏𝟏 𝒙𝟏 + 𝒂𝟏𝟐 𝒙𝟐 + ⋯ + 𝒂𝟏𝒏 𝒙𝒏 ≤ 𝒃𝟏
𝒂𝟏𝟏 𝒙𝟏 + 𝒂𝟏𝟐 𝒙𝟐 + ⋯ + 𝒂𝟏𝒏 𝒙𝒏 = 𝒃𝟏 𝒂𝟐𝟏 𝒙𝟏 + 𝒂𝟐𝟐 𝒙𝟐 + ⋯ + 𝒂𝟐𝒏 𝒙𝒏 ≤ 𝒃𝟐
𝒂𝟐𝟏 𝒙𝟏 + 𝒂𝟐𝟐 𝒙𝟐 + ⋯ + 𝒂𝟐𝒏 𝒙𝒏 = 𝒃𝟐 ⋮
⋮ 𝒂𝒎𝟏 𝒙𝟏 + 𝒂𝒎𝟐 𝒙𝟐 + ⋯ + 𝒂𝒎𝒏 𝒙𝒏 ≤ 𝒃𝒎
𝒂𝒎𝟏 𝒙𝟏 + 𝒂𝒎𝟐 𝒙𝟐 + ⋯ + 𝒂𝒎𝒏 𝒙𝒏 = 𝒃𝒎
𝒙 𝟏 , 𝒙𝟐 , … , 𝒙𝒏 ≥ 𝟎
𝒙𝟏 , 𝒙𝟐 , … , 𝒙𝒏 ≥ 𝟎
RHS of the constraints need not to be non-negative
RHS of the constraints must be non-negative
Where 𝑐𝑗 , 𝑏𝑖 , and 𝑎𝑖𝑗 (𝑖 = 1,2, … , 𝑚; 𝑗 = 1,2, … , 𝑛) are
Where 𝑐𝑗 , 𝑏𝑖 , and 𝑎𝑖𝑗 (𝑖 = 1,2, … , 𝑚; 𝑗 = 1,2, … , 𝑛) are known constants, and 𝑥𝑗 are the decision variables.
known constants, and 𝑥𝑗 are the decision variables.

7
Standard form and Canonical form of Linear Programming (LP) problem

Matrix representation of Standard form Matrix representation of Canonical form

Max or Min 𝒇 𝑿 = 𝒄𝑻 𝑿 Max 𝒇 𝑿 = 𝒄𝑻 𝑿

Subject to the constraints Subject to the constraints


𝑨𝑿 = 𝒃, 𝒃 ≥ 𝟎 𝑨𝑿 ≤ 𝒃,
and 𝑿≥𝟎 and 𝑿≥𝟎

Where Where
𝑥1 𝑏1 𝑐1 𝑥1 𝑏1 𝑐1
𝑥2 𝑏2 𝑐2 𝑥2 𝑏2 𝑐2
𝑋= ⋮ , b= , 𝑐= ⋮ 𝑋= ⋮ , b= , 𝑐= ⋮
⋮ ⋮
𝑥𝑛 𝑏𝑚 𝑐𝑛 𝑥𝑛 𝑏𝑚 𝑐𝑛

𝑎11 ⋯ 𝑎1𝑛 𝑎11 ⋯ 𝑎1𝑛


𝑎= ⋮ ⋱ ⋮ 𝑎= ⋮ ⋱ ⋮
𝑎𝑚1 ⋯ 𝑎𝑚𝑛 𝑎𝑚1 ⋯ 𝑎𝑚𝑛

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

Here 𝑠1 and 𝑠2 are Slack Here 𝑠1 and 𝑠2 are Surplus


variables variables

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

And 𝑥1 , 𝑥2 , 𝑥3′ , 𝑥3″ , 𝑠1 , 𝑠2 , 𝑠3 ≥ 0 And 𝑥1 , 𝑥2 , 𝑥3′ , 𝑥3″ ≥ 0

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.

Steps for the Graphical Method

1. Define the Problem:

• Write the objective function to maximize or minimize

𝑍 = 𝑐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

2. Plot the Constraints:

• Convert each constraint inequality (≤ 𝑜𝑟 ≥) into an equation for graphing.

• Plot the corresponding lines by:

• Finding the 𝑥1 and 𝑥2 intercepts of the line.

• Drawing the line connecting these points on a graph.

• Determine the side of the line that satisfies the inequality (e.g., use test points like the origin).

3. Identify the Feasible Region:

• 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.

4. Find the Corner Points:

• Identify the vertices (corner points) of the feasible region. These are obtained by:

• Observing points where constraint lines intersect.


17
Graphical Method for Two Variable Optimization Problem

• Observing points where constraint lines intersect.

• Solving pairs of equations algebraically to find intersection points.

5. Evaluate the Objective Function:

• Substitute the coordinates of each corner point into the objective function.

• Calculate 𝑍 (the objective value) for each point.

6. Determine the Optimal Solution:

• 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

Why Graphical Method is Needed?


The graphical method for solving two-variable LP
problem is important because:

1. Visualization of Feasible Region: 4. Insight into Constraints:


• It provides a clear, intuitive understanding of the • By plotting constraints, it highlights which
problem by graphically representing constraints and constraints are active (binding) and which are
the feasible region. redundant.
• Decision-makers can visually see how constraints 5. Preliminary Analysis:
interact. • For small-scale problems, it provides a quick
2. Simplicity for Two-Variable Problems: way to verify solutions and gain insights
before using more complex methods like the
• For LP problems with only two decision variables,
Simplex Algorithm.
the graphical method is simple and easy to apply
without requiring advanced computational tools.
3. Educational and Conceptual Understanding:
• It helps learners and beginners in optimization to
understand the fundamentals of LP, such as feasible
regions, objective function, and optimal solutions.
19
Graphical Method for Two Variable Optimization Problem

Applications of the
Graphical Method

Transportation and
Business Optimization Resource Allocation Manufacturing Agriculture
Logistics

Maximize profits or Efficiently allocate limited Optimize transportation


Optimize production Allocate land or resources
minimize costs for two- resources (e.g., labor and routes or vehicle loads
schedules for two between two crops to
variable production materials) between two involving two constraints
products. maximize yield or profit.
problems. activities. (e.g., time and cost).

Manage the allocation of Balance two types of


raw materials to meet goods in transport to
production demands. minimize costs.

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

Table 1: Information for the wooden tables and chairs


linear programming problem
21
Graphical Method for Two Variable Optimization Problem

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

Now, substitute 𝑥2 = 0 in [2], we get

5𝑥1 = 110

110
𝑥1 = = 22
5

⸫ (𝑥1 , 𝑥2 ) = (22,0)

Here, 𝐴 0,0 , 𝐵 10,0 , 𝐶 𝑥1 , 𝑥2 and 𝐷(0,10)

23
Graphical Method for Two Variable Optimization Problem

To find C: Points Max Z=6x1+8x2


A (0,0) Z=0
C is the intersection point of equation [1] and [2]
B (10,0) Z = 6(10) +8(0)
[1] × 1 ⟹ 30𝑥1 + 20𝑥2 = 300 −−−→ [3]
Z = 60
2 × 2 ⟹ 10𝑥1 + 20𝑥2 = 220 −−−→ [4] C (4,9) Z = 6(4) +8(9)

Solve the equation [3] and [4], we get Z = 24+72

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.

120 + 20𝑥2 = 300 That is,


𝑍 = 𝑅𝑠. 6 4 + 𝑅𝑠. 8(9)
20𝑥2 = 180
𝑍 = 𝑅𝑠. 96 𝑥1 = 4 𝑎𝑛𝑑 𝑥2 = 9
𝑥2 = 4
Thus, we find that maximum profit of Rs.96 can be
⸫ 𝐶 𝑥1 , 𝑥2 = 𝐶 4,9 obtained by producing four 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?

M1 M2 Available Active per week


units (hr)
Grinding in (hr.) 4 2 2 40
Policing in (hr.) 2 5 3 60
Profit per unit 3 4
(Rs.)

Table 2: Information for the models M1 and M2

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

Now, substitute 𝑥2 = 0 in [2], we get

2𝑥1 = 180

180
𝑥1 = = 90
2

⸫ (𝑥1 , 𝑥2 ) = (90,0)

Here, 𝐴 0,0 , 𝐵 20,0 , 𝐶 𝑥1 , 𝑥2 and 𝐷(0,36)

27
Graphical Method for Two Variable Optimization Problem

To find C: Points Max Z=3x1+4x2


A (0,0) Z=0
C is the intersection point of equation [1] and [2]
B (20,0) Z = 3(20) +4(0)
[1] × 5 ⟹ 20𝑥1 + 10𝑥2 = 400 −−−→ [3]
Z = 60
2 × 2 ⟹ 4𝑥1 + 10𝑥2 = 360 −−−→ [4] C (2.5,35) Z = 3(2.5) +4(35)

Solve the equation [3] and [4], we get Z = 7.5+142

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

Example 3: ⸫ (𝑥1 , 𝑥2 ) = (0,3)


Minimize 𝒁 = 𝟑𝒙𝟏 + 𝟒𝒙𝟐 Now substitute 𝑥2 = 0 in [1], we get
Subject to 𝑥1 = 6
𝒙𝟏 + 𝟐𝒙𝟐 ≥ 𝟔
𝟐𝒙𝟏 + 𝒙𝟐 ≤ 𝟖 ⸫ 𝑥1 , 𝑥2 = 6,0
𝒙𝟏 + 𝒙𝟐 ≥ 𝟒
and 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎 Consider the equation [2],
2𝑥1 + 𝑥2 = 8
Solution:
First, we consider the constraint inequalities as Substitute 𝑥1 = 0 in [2], we get
equalities, 𝑥2 = 8
𝑥1 + 2𝑥2 = 6 −−−−−→ [1] ⸫ 𝑥1 , 𝑥2 = 0,8
2𝑥1 + 𝑥2 = 8 −−−−−→ [2]
Now, substitute 𝑥2 = 0 in [2], we get
𝑥1 + 𝑥2 = 4 −−−−−−→ [3]
2𝑥1 = 8
𝑥1 = 4
Consider the equation [1]
⸫ (𝑥1 , 𝑥2 ) = (4,0)
𝑥1 + 2𝑥2 = 6
Substitute 𝑥1 = 0 in [1], we get
2𝑥2 = 6 ⟹ 𝑥2 = 3
29
Graphical Method for Two Variable Optimization Problem

Consider the equation [3],


𝑥1 + 𝑥2 = 4
Substitute 𝑥1 = 0 in [3], we get
𝑥2 = 4
⸫ 𝑥1 , 𝑥2 = 0,4

Now, substitute 𝑥2 = 0 in [3], we get


𝑥1 = 4
⸫ (𝑥1 , 𝑥2 ) = (4,0)

Here, 𝐶(0,8), 𝐸 0,4 , 𝐹 𝑥1 , 𝑥2 and 𝐺(𝑥3 , 𝑥4 )

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.

Motivation of Simplex Method:


• Solution of LP problem, if exists, lies at one of the vertices of the feasible region.
• All the basic solutions can be investigated one-by-one to pick up the optimal solution.
• For 𝑚 equations with 𝑛 variables there exists
𝑛 𝑛!
𝑚
= 𝑚!×(𝑛−𝑚)! basic solutions.
• A basic solution for which all the basic variables are non – negative is called the basic feasible solution.
For Example:
There are 2 equations with 3 variables, then there exists
3 3! 3×2!
2
= 2!×(3−2)! = 2!×1! = 3 basic solution.

33
Simplex Method

For Example: Set 𝑥2 = 0,


Determine all the basic feasible solutions of 2𝑥1 + 4𝑥3 = 5
the equations: 3𝑥1 + 5𝑥3 = 6
𝟐𝒙𝟏 + 𝟑𝒙𝟐 + 𝟒𝒙𝟑 = 𝟓 Solving these 2 equations, we will get
1 3
𝟑𝒙𝟏 + 𝟒𝒙𝟐 + 𝟓𝒙𝟑 = 𝟔 𝑥1 = − and 𝑥3 =
2 2
Solution:
Given equations involving 3 variables and 2 Set 𝑥3 = 0,
equations.
2𝑥1 + 3𝑥2 = 5
3 3! 3 × 2!
= = =3 3𝑥1 + 4𝑥2 = 6
2 2! × (3 − 2)! 2! × 1!
Solving these 2 equations, we will get
So there are 3 basic variables obtain as follows:
𝑥1 = −2 and 𝑥2 = 3
Set 𝑥1 = 0,
Thus, all basic solutions of the given equations are:
3𝑥2 + 4𝑥3 = 5
0, −1,2 , (−1,0,2) and (−2,3,0)
4𝑥2 + 5𝑥3 = 6
Solving these 2 equations, we will get
It is clear that from the observation of basic solutions,
𝑥2 = −1 and 𝑥3 = 2
there is no basic feasible solution exists, because all the
basic solutions are not positive.
34
Simplex Method

Simplex Method Algorithm

35
Simplex Method

Why Simplex Method is Needed?


The simplex method is a cornerstone in LP, used to 3. Guaranteed Optimality:
solve optimization problems efficiently. Here’s why it is • The simplex method guarantees finding the
essential: best solution (if it exists) or determining if the
problem is unbounded or infeasible.
1. Efficient solution for Complex Problems: 4. Versality:
• Many real-world problems involve multiple variable
and constraints, making graphical method is • It can handle both maximization and
infeasible. minimization problems with mixed
constraints.
• The simplex method systematically navigates the
solution space to find the optimal solution, even in • It is adaptable to various problem structures
higher dimensions. using methods like the Big M or Two-Phase
simplex.
2. Handles Constraints Systematically: 5. Foundation for Modern Optimization:
• LP problems often involve equality and inequality • The simplex method serves as the basis for
constraints. advanced algorithms like the revised simplex
• The simplex method ensures that these constraints method and interior-point methods.
are respected at every step. • It supports duality, sensitivity analysis, and
economic interpretations of optimization
problems. 36
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 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 ≤ 𝑏𝑚

And 𝑥𝑗 ≥ 0 for all 𝑗 = 1,2,3, … , 𝑛


Where the constants 𝐶1 , 𝐶2 , … , 𝐶𝑛 are the cost coefficients of decision variables. Let (𝑎𝑖𝑗 ) be 𝑚 × 𝑛 real matrix and
{𝑏1 , 𝑏2 , … , 𝑏𝑚 } be a set of constants.
Let us explain the step by step procedure for solving the LPP by the Simplex Method.

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

Max 𝑍 = 𝐶1 𝑋1 + 𝐶2 𝑋2 + ⋯ + 𝐶𝑛 𝑋𝑛 + 0𝑠1 + 0𝑠2 + ⋯ + 0𝑠𝑚


Subject to the constraints
𝑎11 𝑥1 + 𝑎12 𝑥2 + ⋯ + 𝑎1𝑛 𝑥𝑛 + 𝑠1 = 𝑏1
𝑎21 𝑥1 + 𝑎22 𝑥2 + ⋯ + 𝑎2𝑛 𝑥𝑛 + 𝑠2 = 𝑏2

𝑎𝑚1 𝑥1 + 𝑎𝑚2 𝑥2 + ⋯ + 𝑎𝑚𝑛 𝑥𝑛 + 𝑠𝑚 = 𝑏𝑚

And 𝑥𝑗 ≥ 0 and 𝑠𝑖 ≥ 0 for all 𝑗 = 1,2,3, … , 𝑛 and 𝑖 = 1,2,3, … , 𝑚


Step 2: Construct the initial simplex table.
The initial simplex table is formed as follows:
𝐶1 𝐶2 … 𝐶𝑛 0 0 ….
𝐵 𝐶𝐵 𝑋𝐵 𝑋1 𝑋2 … 𝑋𝑛 𝑠1 𝑠2 …. Ratio
𝑋𝐵
൘𝑋
𝑗 𝐵 = Basic Variable
𝑠1 0 𝑏1 𝑎11 𝑎21 … 𝑎1𝑛 1 0… 𝐶𝐵 = Profit/unit
𝑠2 0 𝑏2 𝑎21 𝑎22 … 𝑎2𝑛 0 1… 𝑋𝐵 = Quantity
. . . . . . .
𝑍𝑗 ⟶ 𝐶𝐵 𝑋1 𝐶𝐵 𝑋2 … 𝐶𝐵 𝑋𝑛 𝐶𝐵 𝑠1 𝐶𝐵 𝑠2 …
𝑍𝑗 − 𝐶𝑗 →
38
Simplex Method

Step 3: Test for optimality.


Calculate the values of 𝑍𝑗 − 𝐶𝑗 , the nature of the solution could be any one of the following:

• If all 𝑍𝑗 − 𝐶𝑗 ≥ 0, the solution under test is optimal solution.

• 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.

Step 4: Select incoming variable to enter the basis.


If the solution is not optimal then we look for most negative entry and it could be any of (𝑍𝑗 − 𝐶𝑗 ). In this
case, we proceed as follows to obtain the optimal solution:

• Let 𝑋𝑗 be the variable which corresponds to the most negative value of 𝑍𝑗 − 𝐶𝑗 . This variable is called the
incoming variable

• The column to be entered is called the key or pivot column.

39
Simplex Method

Step 4: Test for feasibility (variable to leave the basis)


After finding the incoming variable, we determine the outgoing variable. For this we proceed as follow:
• We divide the value of the Quantity (Qty) column be the corresponding positive values in the column 𝑋𝑛 . These
ratios are called Replacement Ratios (RR). Note that we do not consider the negative values in the column of 𝑋𝑟
for calculating RR. Then we select the minimum RR. The basic variable corresponding to this value of the RR is
called the outgoing variable. It is called outgoing variable because it is removed (goes out) from the next
simplex table. The row selected in this manner is called key or pivot row.
• The element that lies at the intersection of the key row and key column is called the key element or leading
element or pivot element.
• Suppose the most negative value is, say 𝑍1 − 𝐶1 , then the corresponding variable 𝑋1 is the entering to the basis.
Suppose 𝑠1 row is the minimum replacement ratio, then it will leave the basis. The element 𝑎11 is lies at the
intersection of the key row and key column, it is the key element or pivot element.
Step 6: Finding the new solution
• We convert the key element to unity by dividing all entries in the row by the key element itself.
• In the next step, we would like that the values of all other elements in the column corresponding to key element
are zero. For this we carry out suitable operations on each row using the row containing the key element by
using the following formula
40
Simplex Method

𝑪𝒐𝒓𝒓𝒆𝒔𝒑𝒐𝒏𝒅𝒊𝒏𝒈 𝒌𝒆𝒚 𝒄𝒐𝒍𝒖𝒎𝒏 𝒗𝒂𝒍𝒖𝒆 × 𝑪𝒐𝒓𝒓𝒆𝒔𝒑𝒐𝒏𝒅𝒊𝒏𝒈 𝒌𝒆𝒚 𝒓𝒐𝒘 𝒗𝒂𝒍𝒖𝒆


𝑵𝒆𝒘 𝒗𝒂𝒍𝒖𝒆 = 𝑶𝒍𝒅 𝒗𝒂𝒍𝒖𝒆 −
𝑲𝒆𝒚 𝒆𝒍𝒆𝒎𝒆𝒏𝒕

Now the first iteration be like:

𝐶1 𝐶2 … 𝐶𝑛 0 0 ….
𝐵 𝐶𝐵 𝑋𝐵 𝑋1 𝑋2 … 𝑋𝑛 𝑠1 𝑠2 …. Ratio
𝑋𝐵
൘𝑋
𝑗

𝑋1 𝐶1 𝑏1ൗ 1 𝑎21 … 𝑎1𝑛Τ𝑎11 1Τ 0…


𝑎11 ൗ𝑎11 𝑎11
𝑠2 0 𝑎21 𝑎22 … 𝑎2𝑛 0 1…
𝑏2
. . . . . .
.
𝑍𝑗 ⟶ 𝐶𝐵 𝑋1 𝐶𝐵 𝑋2 … 𝐶𝐵 𝑋𝑛 𝐶𝐵 𝑠1 𝐶𝐵 𝑠2 …
𝑍𝑗 − 𝐶𝑗 →

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

Step 7: Repeat the procedure


Go to step 3 and repeat the procedure until all entries in the 𝑍𝑗 − 𝐶𝑗 are either positive or zero i.e. we
repeat the procedure until either an optimal solution is obtained or there is an indication of unbounded solution

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 𝑁𝑒𝑤 = 𝑅1 𝑂𝑙𝑑 − 𝑅2 (𝑁𝑒𝑤)


= 4 1 1 1 0
−2 −1 1 0 −1
2 0 2 1 −1
𝐶1 𝐶2 𝐶3 𝐶4

𝑅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

𝑅2 𝑁𝑒𝑤 = 𝑅2 𝑂𝑙𝑑 + 𝑅1 (𝑁𝑒𝑤)


= 2 1 −1 0 1
1 0 1 0.5 − 0.5
3 1 0 0.5 0.5

46
Simplex Method

𝐶1 𝐶2 𝐶3 𝐶4

𝑅1

𝑅2

Since all 𝑍𝑗 − 𝐶𝑗 ≥ 0. The current basic feasible solution is optimal.


Hence, optimal solution at 𝑥1 = 3, 𝑥2 = 1 is
Max 𝒁 = 𝟑𝒙𝟏 + 𝟐𝒙𝟐
=3 3 +2 1
=9+2
= 11
47
Simplex Method

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 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎

The non-basic variables are 𝑥1 and 𝑥2 .


Solution:
Hence the non-basic solutions are 𝑥1 = 0 and 𝑥2 = 0.
The given problem is converted to standard
form by subtracting non-negative surplus variable
The basic variables are 𝐴1 and 𝐴2
𝑠1 and adding artificial variable 𝐴1 to the first constraint
∴ Initial Basic Feasible Solution (IBFS) are
and subtracting non-negative surplus variable 𝑠2 and
𝐴1 = 10 and 𝐴2 = 24
adding artificial variable 𝐴2 to the second constraint.

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 𝑁𝑒𝑤 = 𝑅1 𝑂𝑙𝑑 − 𝑅2 (𝑁𝑒𝑤)


= 10 1 1 −1 0 1
−6 − 0.5 −1 0 0.25 0
4 0.5 0 −1 0.25 1
𝐶1 𝐶2 𝐶3 𝐶4

𝑅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

𝑅1 𝑁𝑒𝑤 = 𝑅1 𝑂𝑙𝑑 ÷0.5


𝑅1 𝑁𝑒𝑤 = 4 0.5 0 −1 0.25 ÷ 0.5
= 8 1 0 −2 0.5

𝑅2 𝑁𝑒𝑤 = 𝑅2 𝑂𝑙𝑑 − 0.5𝑅1 (𝑁𝑒𝑤)


= 6 0.5 1 0 − 0.25
−4 − 0.5 0 1 − 0.25
2 0 1 1 − 0.5

51
Simplex Method

𝐶1 𝐶2 𝐶3 𝐶4

𝑅1

𝑅2

Since all 𝑍𝑗 − 𝐶𝑗 ≤ 0. The current basic feasible solution is optimal.


Hence, optimal solution at 𝑥1 = 8, 𝑥2 = 2 is
Min 𝒁 = 𝟓𝒙𝟏 + 𝟔𝒙𝟐
=5 8 +6 2
= 40 + 12
= 52
52
Simplex Method

Example 3: The standard form of the LP problem is


Min 𝒁 = 𝟐𝒙𝟏 + 𝟑𝒙𝟐 + 𝟓𝒙𝟑 Min 𝑍 = 2𝑥1 + 3𝑥2 + 5(𝑥3′ − 𝑥3″ ) + 0𝑠1 + 0𝑠2 +
Subject to 0𝑠3 + 𝑀𝐴1
Min 𝑍 = 2𝑥1 + 3𝑥2 + 5𝑥3′ − 5𝑥3″ + 0𝑠1 + 0𝑠2 +
−𝟑𝒙𝟏 + 𝟒𝒙𝟐 ≤ 𝟓 0𝑠3 + 𝑀𝐴1
𝒙𝟏 + 𝟑𝒙𝟐 + 𝒙𝟑 ≥ 𝟒 Subject to
𝒙𝟏 + 𝒙𝟑 ≤ 𝟑 −3𝑥1 + 4𝑥2 + 𝑠1 = 5
𝑥1 + 3𝑥2 + 𝑥3′ − 𝑥3″ − 𝑠2 + 𝐴1 = 4
and 𝒙𝟏 , 𝒙𝟐 ≥ 𝟎, 𝒙𝟑 is unrestricted in sign.
𝑥1 + 𝑥3′ − 𝑥3″ + 𝑠3 = 3
Solution:
and 𝑥1 , 𝑥2 , 𝑥3′ , 𝑥3″ , 𝑠1 , 𝑠2 , 𝑠3 ≥ 0
Since 𝑥3 is unrestricted in sign,
The non-basic variables are 𝑥1 , 𝑥2 and 𝑥3 .
∴ 𝑥3 = 𝑥3′ − 𝑥3″ Hence the non-basic solutions are 𝑥1 = 0, 𝑥2 = 0, 𝑥3 = 0.
The given problem is converted to standard
form by adding non-negative surplus variables 𝑠1 , 𝑠3 to
the first and last constraints and subtracting surplus The basic variables are 𝑠1 , 𝐴1 and 𝑠3
variable 𝑠2 and adding artificial variable 𝐴1 to the second ∴ Initial Basic Feasible Solution (IBFS) are
constraint.
𝑠1 = 5, 𝐴1 = 4 and 𝑠3 = 3
53
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𝑀 − 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

= 1.25 − 0.75 1 0 0 0.25 0 0 0

𝑅2 𝑁𝑒𝑤 = 𝑅2 𝑂𝑙𝑑 − 3𝑅1 (𝑁𝑒𝑤)

= 4 1 3 1 −1 0 −1 0 1

−3.75 2.25 −3 0 0 − 0.75 0 0 0

0.25 3.25 0 1 −1 − 0.75 −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

𝑅2 𝑁𝑒𝑤 = 𝑅2 (𝑂𝑙𝑑) ÷ 3.25

𝑅2 𝑁𝑒𝑤 = 0.25 3.25 0 1 −1 − 0.75 −1 0 ÷ 3.25

= 0.0769 1 0 0.3077 − 0.3077 − 0.2308 − 0.3077 0

𝑅1 𝑁𝑒𝑤 = 𝑅1 𝑂𝑙𝑑 + 0.75𝑅2 (𝑁𝑒𝑤)

= 1.25 − 0.75 1 0 0 0.25 0 0

0.0577 0.75 0 0.2308 − 0.2308 − 0.1731 − 0.2308 0_

1. 3077 0 1 0.2308 − 0.2308 0.0769 − 0.2308 0

𝑅3 𝑁𝑒𝑤 = 𝑅3 𝑂𝑙𝑑 − 𝑅2 (𝑁𝑒𝑤)

= 3 1 0 1 −1 0 0 1

−0.0769 −1 0 − 0.3077 0.3077 0.2308 0.3077 0

2.9231 0 0 0.6923 − 0.6923 0.2308 0.3077 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 𝑁𝑒𝑤 = 𝑅1 𝑂𝑙𝑑 − 2𝑅2 (𝑁𝑒𝑤)


= 120 2 5 1 0
40 2 1 0 1
80 0 4 1 −1
𝐶1 𝐶2 𝐶3 𝐶4

𝑅1

𝑅2

61
Simplex Method

Since all 𝑍𝑗 − 𝐶𝑗 ≤ 0. The current basic feasible solution is optimal.


Hence, optimal solution at 𝑥1 = 20, 𝑥2 = 0 is
Min 𝒁 = 𝟔𝒙𝟏 + 𝟑𝒙𝟐
= 6 20 + 3 0
= 120 + 0
= 120

62

You might also like