0% found this document useful (0 votes)
16 views

Unit 2 Notes

The document outlines various linear programming problems related to maximizing profit and minimizing costs for different manufacturing scenarios. Each problem includes a mathematical formulation with decision variables, objective functions, and constraints. Solutions to practice problems are also provided, demonstrating graphical methods and optimal solutions.

Uploaded by

hp9266210
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)
16 views

Unit 2 Notes

The document outlines various linear programming problems related to maximizing profit and minimizing costs for different manufacturing scenarios. Each problem includes a mathematical formulation with decision variables, objective functions, and constraints. Solutions to practice problems are also provided, demonstrating graphical methods and optimal solutions.

Uploaded by

hp9266210
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/ 30

Subject Code: 23BBAC304

Course Title: Quantitative Techniques using R & Python leveraging generative AI


Total credits: 3
Unit 2- Linear Programming Problem (LPP)
Practice problems
1. A small scale industry manufactures two products P and Q which are processed in a machine shop
and assembly shop. Product P requires 2 hours of work in a machine shop and 4 hours of work in the
assembly shop to manufacture while product Q requires 3 hours of work in machine shop and 2 hours
of work in assembly shop. In one day, the industry cannot use more than 16 hours of machine shop and
22 hours of assembly shop. It earns a profit of ₹3 per unit of product P and ₹4 per unit of product Q.
Give the mathematical formulation of the problem so as to maximise profit.

2. A company produces two types of items P and Q that require gold and silver. Each unit of type P
requires 4g silver and 1g gold while that of Q requires 1g silver and 3g gold. The company can produce
8g silver and 9g gold. Suppose each unit of type P brings a profit of ₹44 and that of type Q, ₹55. Give
the mathematical formulation for the problem to determine the number of units of each type that the
company should produce to maximise the profit.

3. A company manufactures two products X and Y, each of which requires three types of processing.
The length of time for processing each unit and the profit per unit are given in the following table:

4. A company produces soft drinks and has a contract requiring that a minimum of 80 units of chemical
A and 60 units of chemical B go into each bottle of the drink. The chemicals are available in a prepared
mix from two different suppliers. The supplier X1 has a mix of 4 units of A and 2 units of B that costs
₹10, and the supplier X2 has a mix of 1 unit of A and 1 unit of B that costs ₹4. How many mixes from
the company X1 and company X2 should the company purchase to honour contract requirement and
yet minimise cost?

5. Solve the given linear programming problem graphically:


Maximize: Z = 8x + y
Constraints are,
x + y ≤ 40
2x + y ≤ 60
x ≥ 0, y ≥ 0
Answer: x = 30, y = 0, z = 240

6. Solve the given linear programming problem graphically:


Maximize: Z = x + y
Constraints are,
2x + y ≤ 50
X+2y ≤ 40
x ≥ 0, y ≥ 0
Answer: x = 20, y = 10, z = 30

7. Solve the given linear programming problem graphically:


Maximize: Z = 50x + 15y
Constraints are,
5x + y ≤ 100
x + y ≤ 50
x ≥ 0, y ≥ 0
Answer: x = 12.5, y = 37.5, z = 1187

8. Solve the given linear programming problems graphically:


Minimize: Z = 20x + 10y
Constraints are,
x + 2y ≤ 40
3x + y ≥ 30
4x + 3y ≥ 60
x ≥ 0, y ≥ 0
Answer: x = 6, y = 12 , z = 240

9. Solve the following linear programming problem graphically:


Minimize Z = 200 x + 500 y
Constraints are,
x + 2y ≥ 10
3x + 4y ≤ 24
x ≥ 0, y ≥ 0
Answer: x= 4, y=3, z = 2300

10. Solve the following linear programming problem graphically:


Maximize z = x1 + 2x2
Constraints are,
x1 ≤ 80
x2 ≤ 60
5x1 + 6x2 ≤ 600
x1 + 2x2 ≤ 160
x1, x2 ≥ 0.

The value of the objective function at each of these extreme points is as follows:

Extreme Point
Objective function value
Coordinates Lines through Extreme Point
Z=x1+2x2
(x1,x2)

5→x1≥0
O(0,0) 1(0)+2(0)=0
6→x2≥0

1→x1≤80
A(80,0) 1(80)+2(0)=80
6→x2≥0

1→x1≤80
B(80,33.33) 1(80)+2(33.33)=146.67
3→5x1+6x2≤600

3→5x1+6x2≤600
C(60,50) 1(60)+2(50)=160
4→x1+2x2≤160

2→x2≤60
D(40,60) 1(40)+2(60)=160
4→x1+2x2≤160

2→x2≤60
E(0,60) 1(0)+2(60)=120
5→x1≥0

The maximum value of the objective function Z=160 occurs at 2 extreme points.

Hence, problem has multiple optimal solutions and max Z=160.


Answer: Problem has multiple optimal solutions.

Example 11. Solve the following linear programming problem graphically:


Minimize z = 200x1 + 300x2
Constraints are,
2x1 + 3x2 ≥ 1200
x1 + x2 ≤ 400
2x1 + 1.5x2 ≥ 900
x1, x2 ≥ 0
Answer: Problem has an infeasible solution.
12. Solve the following linear programming problem graphically:
Maximize z = 40x1 + 60x2
Constraints are,
2x1+ x2 ≥ 70
x1 + x2 ≥ 40
x1 + 3x2 ≥ 90
x1, x2 ≥ 0
Answer: Problem has an unbounded solution.

Solutions to Practice problems

Solution to the problem 1:


Problem Formulation for Maximizing Profit:
A small-scale industry manufactures two products, P and Q. Each product requires different amounts
of work in both a machine shop and an assembly shop, and earns a specific profit per unit. The goal is
to maximize the total profit.
Variables:
• 𝑥: Number of units of product P to produce.
• 𝑦: Number of units of product Q to produce.
Objective: Maximize the total profit:
Maximize Z = 3x + 4y
Constraints:
1. Machine Shop Constraint: The total hours available in the machine shop cannot exceed 16
hours per day.
2𝑥 + 3𝑦 ≤ 16
This equation represents the total hours of work required in the machine shop for products P and Q.
2. Assembly Shop Constraint: The total hours available in the assembly shop cannot exceed 22
hours per day.
4𝑥 + 2𝑦 ≤ 22
This equation represents the total hours of work required in the assembly shop for products P and Q.
3. Non-negativity Constraint: The number of units produced cannot be negative.
𝑥≥0
𝑦≥0
Mathematical formulation:
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒: 𝑍 = 3𝑥 + 4𝑦
Subject to:
2𝑥 + 3𝑦 ≤ 16
4𝑥 + 2𝑦 ≤ 22
𝑥≥0
𝑦≥0

Solution to the problem 2:


To formulate the problem of maximizing profit for the company producing items P and Q using gold
and silver resources, here's the mathematical representation:
Decision Variables:
• Let 𝑥 be the number of units of type P to produce.
• Let 𝑦 be the number of units of type Q to produce.
Objective Function:
• Maximize the total profit:
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 44𝑥 + 55𝑦
where 𝑍 is the total profit in rupees.
Constraints:
1. Silver Constraint: The total amount of silver used cannot exceed 8 grams.
4𝑥 + 𝑦 ≤ 8
Each unit of type P requires 4 grams of silver, and each unit of type Q requires 1 gram of silver.
2. Gold Constraint: The total amount of gold used cannot exceed 9 grams.
𝑥 + 3𝑦 ≤ 9
Each unit of type P requires 1 gram of gold, and each unit of type Q requires 3 grams of gold.
3. Non-negativity Constraint: The number of units produced cannot be negative.
𝑥≥0
𝑦≥0
Mathematical Formulation:
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒: 𝑍 = 44𝑥 + 55𝑦
Subject to:
4𝑥 + 𝑦 ≤ 8
𝑥 + 3𝑦 ≤ 9
𝑥≥0
𝑦≥0
This formulation ensures that the company maximizes its profit by determining how many units of
items P and Q to produce, considering the constraints on available silver and gold resources. The
objective function (profit) and constraints (resource limitations) are all linear, making this a linear
programming problem suitable for optimization using standard techniques.

The solution to problem 3:


To formulate the problem to determine the number of units of products X and Y that the company
should produce to maximize profit, considering the processing times, available capacities per day, and
profits per unit.
Decision Variables:
• Let 𝑥 be the number of units of Product X to produce.
• Let 𝑦 be the number of units of Product Y to produce.
Objective Function:
• Maximize the total profit:
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒 𝑍 = 5𝑥 + 7𝑦
𝑍 is the total profit in rupees per day.
Constraints:
1. Process I Constraint:
o Total time available in Process I cannot be exceeded by the combined production of
𝑥 and 𝑦.
12𝑥 + 12𝑦 ≤ 840
This equation represents the available capacity of 840 hours per day in Process I, with each unit of X
and Y requiring 12 hours.
2. Process II Constraint:
o Total time available in Process II cannot be exceeded by the combined production of
𝑋 and Y.
3𝑥 + 6𝑦 ≤ 300
This equation represents the available capacity of 300 hours per day in Process II, with each unit of X
requiring 3 hours and each unit of Y requiring 6 hours.
3. Process III Constraint:
o Total time available in Process III cannot be exceeded by the combined production of
X and Y.
8𝑥 + 4𝑦 ≤ 480
This equation represents the available capacity of 480 hours per day in Process III, with each unit of 𝑋
requiring 4 hours and each unit of 𝑌 requiring 7 hours.
4. Non-negativity Constraint:
o The number of units produced cannot be negative.
𝑥 ≥ 0,
𝑦≥0
Mathematical Formulation:
𝑀𝑎𝑥𝑖𝑚𝑖𝑧𝑒: 𝑍 = 5𝑥 + 7𝑦
Subject to:
12𝑥 + 12𝑦 ≤ 840
3𝑥 + 6𝑦 ≤ 300
8𝑥 + 4𝑦 ≤ 480
𝑥≥0
𝑦≥0
This formulation allows the company to maximize its daily profit by deciding how many units of
products X and Y to produce, given the constraints on available processing capacities in three
different processes (Process I, Process II, and Process III). The objective function maximizes the
profit based on the profit per unit values provided (5 for X and 7 for Y).

The solution to problem 3:


To minimize the cost while meeting the contract requirements for chemical components A and B in
the soft drinks, let's formulate the problem using linear programming.
Decision Variables:
• Let 𝑚 be the number of mixes purchased from supplier X1.
• Let 𝑛 be the number of mixes purchased from supplier X2.
Objective Function:
Minimize the total cost:
𝑀𝑖𝑛𝑖𝑚𝑖𝑧𝑒 𝑍 = 10𝑚 + 4𝑛
Z is the total cost in rupees.
Constraints:
1. Chemical A Requirement Constraint:
o The total amount of chemical A required should meet or exceed 80 units.
4𝑚 + 𝑛 ≥ 80
This equation represents the total units of chemical A provided by mixes purchased from suppliers X1
and X2.
2. Chemical B Requirement Constraint:
o The total amount of chemical B required should meet or exceed 60 units.
2𝑚 + 𝑛 ≥ 60
This equation represents the total units of chemical B provided by mixes purchased from suppliers X1
and X2.
3. Non-negativity Constraint:
o The number of mixes purchased cannot be negative.
𝑚≥0
𝑛≥0
Mathematical Formulation:
Minimize: 𝑍 = 10𝑚 + 4𝑛
Subject to:
4𝑚 + 𝑛 ≥ 80
2𝑚 + 𝑛 ≥ 60
𝑚≥0
𝑛≥0
Solving this linear programming problem will determine the optimal quantities mmm and nnn to
minimize the cost while satisfying the contract requirements for chemical components A and B in the
soft drinks.

Solution to problem 5:
Problem is
MAX z = 8 x + y
subject to
x + y ≤ 40
2 x + y ≤ 60
and x,y≥0;
Hint to draw constraints

1. To draw constraint x+y≤40→(1)

Treat it as x+y=40

When x=0 then y=?

⇒(0)+y=40

⇒y=40

When y=0 then x=?

⇒x+(0)=40
⇒x=40

x 0 40

y 40 0

Put x=0,y=0 (origin) in x+y≤40, then 0+0≤40, which is true,

The half plane containing the origin is the region of the solution set of the inequation x+y≤40

2. To draw constraint 2x+y≤60→(2)

Treat it as 2x+y=60

When x=0 then y=?

⇒2(0)+y=60

⇒y=60

When y=0 then x=?

⇒2x+(0)=60

⇒2x=60

⇒x=602=30

x 0 30

y 60 0

Put x=0,y=0 (origin) in 2x+y≤60, then 0+0≤60, which is true,

The half plane containing the origin is the region of the solution set of the inequation 2x+y≤60
The value of the objective function at each of these extreme points is as follows:

Extreme Point
Objective function value
Coordinates Lines through Extreme Point
z=8x+y
(x,y)

3→x≥0
O(0,0) 8(0)+1(0)=0
4→y≥0

2→2x+y≤60
A(30,0) 8(30)+1(0)=240
4→y≥0

1→x+y≤40
B(20,20) 8(20)+1(20)=180
2→2x+y≤60

1→x+y≤40
C(0,40) 8(0)+1(40)=40
3→x≥0

The maximum value of the objective function z=240 occurs at the extreme point (30,0).

Hence, the optimal solution to the given LP problem is : x=30,y=0 and max z=240.
Graph:

Answer: x = 30, y = 0, z = 240

Solution to problem 6: Graph:


Answer: x = 20, y = 10, z = 30

Solution to problem 7: Graph

Answer: x = 12.5, y = 37.5, z = 1187

Solution to problem 8: Graph

Answer: x = 6, y = 12 , z = 240
Solution to problem 9: Graph

Answer: x= 4, y=3, z = 2300

Solution to problem 10: Graph

Answer: Problem has multiple optimal solutions.

Solution to problem 11: Graph


Answer: Problem has an infeasible solution.

Solution to problem 12: Graph

Answer: Problem has an unbounded solution.

Simplex method
The Simplex method is a widely used algorithm for solving Linear Programming Problems (LPP)
where the objective is to maximize or minimize a linear objective function subject to linear
constraints. Here’s a detailed breakdown of the Simplex method, including some clarifications and
steps:
Terminology
1. Basic Variables: Variables that are included in the current solution and correspond to the
columns with the identity matrix in the tableau. They have coefficients of 1 in their respective
equations and 0 in the other equations.
2. Non-Basic Variables: Variables that are not included in the current solution. Their
coefficients can be positive, negative, or zero in the equations.
3. Slack, Surplus, and Artificial Variables:
o Slack Variables: Added to constraints of the form ≤ to convert them into equalities.
For example, if the constraint is x1+x2≤10, we add a slack variable s1 to get
x1+x2+s1=10
o Surplus Variables: Subtracted from constraints of the form ≥ to convert them into
equalities. For instance, for the constraint x1+x2≥10, we subtract a surplus variable s2
to get x1+x2−s2=10.
o Artificial Variables: Introduced when converting inequalities into equalities,
especially when the constraints cannot be converted into standard form directly. For
example, in a constraint x1+x2≥10, after subtracting the surplus variable, if we need
to use a method like the Big M method or Two-Phase method, artificial variables a1
may be introduced to handle infeasibility.
Simplex Method Steps
1. Determine a Starting Basic Feasible Solution:
o Start with an initial feasible solution where all constraints are satisfied. This usually
involves setting the non-basic variables to zero and solving for the basic variables.
2. Select an Entering Variable:
o In a maximization problem, the entering variable is the non-basic variable with the
most negative coefficient in the objective function (Z-row) of the tableau.
o In a minimization problem, it is the non-basic variable with the most positive
coefficient in the Z-row.
Question that can arise in your mind: Why do we choose the most positive entry in the bottom row?
Answer: The most positive entry in the bottom row represents the largest coefficient in the objective
function - the coefficient whose entry will increase the value of the objective function the quickest.
3. Select a Leaving Variable:
o Determine which basic variable will leave the basis. This is done by finding the
smallest non-negative ratio of the right-hand side (RHS) values to the pivot column
values (while ensuring the denominator is strictly positive).
Question Why do we find quotients, and why does the smallest quotient identify a row?
Answer: When we choose the most positive entry in the bottom row, we are trying to increase the
value of the objective function by bringing in the variable x1x1. But we cannot choose any value
for x1. The purpose of computing the quotients; using the quotients to identify the pivot element
guarantees that we do not violate the constraints
4. Perform Pivot Operations:
o Pivot Row: a) Replace the leaving variable with the entering variable in the basic
column. b) Normalize the pivot row by dividing it by the pivot element (the element
in the pivot row and pivot column). c) Update all other rows by subtracting the
product of the pivot column coefficient and the new pivot row from each row to
maintain feasibility.

Question Why do we identify the pivot element?

Answer As we have mentioned earlier, the simplex method begins with a corner point and then
moves to the next corner point always improving the value of the objective function. The value of the
objective function is improved by changing the number of units of the variables. We may add the
number of units of one variable, while throwing away the units of another. Pivoting allows us to do
just that.

5. Repeat:
o Continue the process until no further improvements can be made. For a maximization
problem, this is when all coefficients in the Z-row are non-negative. For a
minimization problem, it’s when all coefficients are non-positive.
6. Terminate:
o The algorithm terminates when the optimal solution is reached (i.e., no further
entering variables can improve the objective function) or when the problem is
deemed infeasible or unbounded.

1. Find solution using simplex method.


Maximize Z = 5x1 + 4x2
subject to the constraints
6x1 + 4x2 ≤ 24
x1 + 2x2 ≤ 6
-x1 + x2 ≤ 1
x2 ≤ 2
and x1, x2≥ 0
Solution:

Iteration-
Cj 5 4 0 0 0 0
1
Min
Ratio
B CB x1 x2 S1 S2 S3 S4 XB
XB/x1

S1 0 6 4 1 0 0 0 24 24/6=4→

S2 0 1 2 0 1 0 0 6 6/1=6

S3 0 -1 1 0 0 1 0 1 ---

S4 0 0 1 0 0 0 1 2 ---
Z=0 Zj 0 0 0 0 0 0
Cj-Zj 5↑ 4 0 0 0 0

Positive maximum Cj-Zj is 5 and its column index is 1. So, the entering variable is x1.

Minimum ratio is 4 and its row index is 1. So, the leaving basis variable is S1.

∴ The pivot element is 6.

Entering =x1, Departing =S1, Key Element =6

Iteration-
Cj 5 4 0 0 0 0
2
Min Ratio
B CB x1 x2 S1 S2 S3 S4 XB
XB/x2
x1 5 1 0.67 0.17 0 0 0 4 4/0.67=6
S2 0 0 1.33 -0.17 1 0 0 2 2/1.33=1.5→
S3 0 0 1.67 0.17 0 1 0 5 5/1.67=3
S4 0 0 1.00 0.00 0 0 1 2 2/1=2
Z=20 Zj 5 3.33 0.83 0 0 0
Cj-Zj 0 0.67↑ -0.83 0 0 0

Positive maximum Cj-Zj is 0.67 and its column index is 2. So, the entering variable is x2.

Minimum ratio is 1.5 and its row index is 2. So, the leaving basis variable is S2.

∴ The pivot element is 1.33.

Entering =x2, Departing =S2, Key Element =1.33


Iteration-
Cj 5 4 0 0 0 0
3
B CB x1 x2 S1 S2 S3 S4 XB MinRatio
x1 5 1 0 0.25 -0.5 0 0 3
x2 4 0 1 -0.125 0.75 0 0 1.5
S3 0 0 0 0.375 -1.25 1 0 2.5
S4 0 0 0 0.125 -0.75 0 1 0.5
Z=21 Zj 5 4 0.75 0.5 0 0
Cj-Zj 0 0 -0.75 -0.5 0 0

Since all Cj-Zj≤0

Hence, optimal solution is arrived with value of variables as:


x1=3,x2=1.5

Max Z=21

2. Find solution using simplex method.


Maximize Z = 3x1 + 5x2 + 4x3
subject to the constraints
2x1 + 3x2 ≤ 8
2x2 + 5x3 ≤ 10
3x1 + 2x2 + 4x3 ≤ 15
and x1, x2, x3 ≥ 0

Solution:

Iteration-1 Cj 3 5 4 0 0 0
Min Ratio
B CB x1 x2 x3 S1 S2 S3 XB
XB/x2
S1 0 2 3 0 1 0 0 8 8/3=2.67→
S2 0 0 2 5 0 1 0 10 10/2=5
S3 0 3 2 4 0 0 1 15 15/2=7.5
Z=0 Zj 0 0 0 0 0 0
Cj-Zj 3 5↑ 4 0 0 0

Positive maximum Cj-Zj is 5 and its column index is 2. So, the entering variable is x2.

Minimum ratio is 2.6667 and its row index is 1. So, the leaving basis variable is S1.

∴ The pivot element is 3.

Entering =x2, Departing =S1, Key Element =3


Iteration-2 Cj 3 5 4 0 0 0
Min Ratio
B CB x1 x2 x3 S1 S2 S3 XB
XB/x3
x2 5 0.67 1 0 0.33 0 0 2.67 ---
S2 0 -1.33 0 5 -0.67 1 0 4.67 4.67/5=0.93→
S3 0 1.67 0 4 -0.67 0 1 9.67 9.67/4=2.42
Z=13.3333 Zj 3.33 5 0 1.67 0 0
Cj-Zj -0.33 0 4↑ -1.67 0 0

Positive maximum Cj-Zj is 4 and its column index is 3. So, the entering variable is x3.

Minimum ratio is 0.9333 and its row index is 2. So, the leaving basis variable is S2.

∴ The pivot element is 5.

Entering =x3, Departing =S2, Key Element =5

Iteration-3 Cj 3 5 4 0 0 0
Min Ratio
B CB x1 x2 x3 S1 S2 S3 XB
XB/x1
x2 5 0.67 1 0 0.33 0 0 2.67 2.67/0.67=4
x3 4 -0.27 0 1 -0.13 0.2 0 0.93 ---
S3 0 2.73 0 0 -0.13 -0.8 1 5.93 5.93/2.73=2.17→
Z=17.0667 Zj 2.27 5 4 1.13 0.8 0
Cj-Zj 0.73↑ 0 0 -1.13 -0.8 0

Positive maximum Cj-Zj is 0.7333 and its column index is 1. So, the entering variable is x1.

Minimum ratio is 2.1707 and its row index is 3. So, the leaving basis variable is S3.

∴ The pivot element is 2.7333.

Entering =x1, Departing =S3, Key Element =2.7333

Iteration-4 Cj 3 5 4 0 0 0
B CB x1 x2 x3 S1 S2 S3 XB Min Ratio
x2 5 0 1 0 0.37 0.20 -0.24 1.22
x3 4 0 0 1 -0.15 0.12 0.10 1.51
x1 3 1 0 0 -0.05 -0.29 0.37 2.17
Z=18.6585 Zj 3 5 4 1.10 0.59 0.27
Cj-Zj 0 0 0 -1.10 -0.59 -0.27

Since all Cj-Zj≤0

Hence, optimal solution is arrived with value of variables as :


x1=2.1707,x2=1.2195,x3=1.5122
Max Z=18.6585

3. Find solution using simplex method.


Maximize Z = 4x1 + 3x2
subject to the constraints
2x1 + x2 ≤ 1000
x1 + x2 ≤ 800
x1 ≤ 400
x2 ≤ 700
and x1,x2 ≥ 0
Final Tableau:

Iteration-
Cj 4 3 0 0 0 0
4
Min
B CB x1 x2 S1 S2 S3 S4 XB
Ratio
x2 3 0 1 -1 2 0 0 600
S3 0 0 0 -1 1 1 0 200
x1 4 1 0 1 -1 0 0 200
S4 0 0 0 1 -2 0 1 100
Z=2600 Zj 4 3 1 2 0 0
Cj-Zj 0 0 -1 -2 0 0

Since all Cj-Zj≤0

Hence, optimal solution is arrived with value of variables as :


x1=200,x2=600

Max Z=2600

4. Find solution using simplex method.


Maximize Z = 2x1 + 3x2
subject to the constraints
0.25x1 + 0.5x2 ≤ 40
0.4x1 + 0.2x2 ≤ 40
0.8x2 ≤ 40
and x1,x2 ≥ 0
Final Tableau:

Iteration-
Cj 2 3 0 0 0
4
B CB x1 x2 S1 S2 S3 XB
x1 2 1 0 -1.3333 3.3333 0 80
S3 0 0 0 -2.1333 1.3333 1 8
x2 3 0 1 2.6667 -1.6667 0 40
Z=280 Zj 2 3 5.3333 1.6667 0
Cj-Zj 0 0 -5.3333 -1.6667 0

5. Find solution using simplex method.


Maximize Z = 4x1 - x2
subject to the constraints
x1 + 2x2 ≤ 4
2x1 + 3x2 ≤ 12
x1-x2 ≤ 3
and x1,x2 ≥ 0
Final Tableau
Iteration-
Cj 4 -1 0 0 0
3
B CB x1 x2 S1 S2 S3 XB
x2 -1 0 1 0.3333 0 -0.3333 0.3333
S2 0 0 0 -1.6667 1 -0.3333 4.3333
x1 4 1 0 0.3333 0 0.6667 3.3333
Z=13 Zj 4 -1 1 0 3
Cj-Zj 0 0 -1 0 -3

6. Find solution using simplex method.


Maximize Z = 16x1 + 17x2 + 10x3
subject to the constraints
x1 + 2x2+4x3 ≤ 2000
2x1+x2 + x3 ≤ 3600
x1 + 2x2 + 2x3 ≤ 2400
X1≤30
and x1, x2, x3 ≥ 0
Iteration-
Cj 16 17 10 0 0 0 0
3
B CB x1 x2 x3 S1 S2 S3 S4 XB
x2 17 0 1 2 0.5 0 0 -0.5 985
S2 0 0 0 -1 -0.5 1 0 -1.5 2555
S3 0 0 0 -2 -1 0 1 0 400
x1 16 1 0 0 0 0 0 1 30
Z=17225 Zj 16 17 34 8.5 0 0 7.5
Cj-Zj 0 0 -24 -8.5 0 0 -7.5

7. Find solution using simplex method.


Maximize Z = 3x1 + 5x2 + 4x3
subject to the constraints
2x1 + 3x2 ≤ 8
2x1+5x2 ≤ 10
3x1 + 2x2 + 4x3 ≤ 15
and x1, x2, x3 ≥ 0

Final Tableau:

Iteration-
Cj 3 5 4 0 0 0
3
B CB x1 x2 x3 S1 S2 S3 XB
S1 0 0.8 0 0 1 -0.6 0 2
x2 5 0.4 1 0 0 0.2 0 2
x3 4 0.55 0 1 0 -0.1 0.25 2.75
Z=21 Zj 4.2 5 4 0 0.6 1
Cj-Zj -1.2 0 0 0 -0.6 -1

References:
https://math.libretexts.org/Bookshelves/Applied_Mathematics/Applied_Finite_Mathematics_(Sekhon
_and_Bloom)/04%3A_Linear_Programming_The_Simplex_Method/4.02%3A_Maximization_By_Th
e_Simplex_Method

Duality in Linear Programming


INTRODUCTION
The term ‘dual’ in general implies two or double. The concept of duality is very useful in various fields
such as mathematics, physics, statistics, engineering, and managerial decision-making. For instance, in
two-person game theory, one competitor’s problem is the dual of the opponent’s problem.
In linear programming (LP), duality signifies that each linear programming problem can be analyzed
in two different ways but will have equivalent solutions. Any LP problem (whether it is a maximization
or minimization problem) can be expressed in another equivalent form based on the same data. This
new LP problem is referred to as the dual linear programming problem or simply the dual. Generally,
it does not matter which of the two problems is called the primal or dual, as the dual of the dual is the
primal.
Example:
Consider a problem of production planning. The production manager aims to determine quantities for
each product to be produced with the objective of optimizing the use of available resources to maximize
profit. Using a dual LP approach, the manager may develop a production plan that optimizes resource
utilization such that the marginal opportunity cost of each unit of a resource is equal to its marginal
return (also known as the shadow price).
The shadow price represents the additional price that should be paid to obtain one more unit of the
resource in order to maximize profit under the resource constraints. If a resource is not fully utilized
(i.e., there is slack), its marginal return is zero.
The shadow price can be defined as:
Change in optimal objective function value
Shadow Price = Unit change in the availability of resource

The interpretation of the rate of change (increase or decrease) in the value of the objective function
depends on whether the LP problem is a maximization or minimization problem. Specifically:
• The shadow price for a less than or equal to (≤) type constraint will always be positive. This
is because increasing the right-hand side resource value cannot decrease the value of the
objective function.
• The shadow price for a greater than or equal to (≥) type constraint will always be negative.
This is because increasing the right-hand side resource value cannot increase the value of the
objective function.
There is no need to solve both LP problems separately. Solving one LP problem is equivalent to solving
the other simultaneously. Hence, if the optimal solution to one problem is known, the optimal solution
of the other can also be obtained from the cj – zj row. In some cases, solving the dual LP problem can
significantly reduce computing time.
MANAGERIAL SIGNIFICANCE OF DUALITY
The study of dual LP problem provides information about the value of the resources. Thus, a thorough
economic analysis is required to decide whether additional units of any resource are needed. If yes, then
how much cost per unit is required to be paid for any resource.
The significance of the study of dual is summarized as follows:
(i) The right-hand side of the constraint in primal LP problem represents the amount of a resource
available and the associated dual variable value is interpretated as the maximum amount likely to be
paid for an additional unit of this resource.
(ii) The maximum amount that should be paid for one additional unit of a resource is called its shadow
price (also called simplex multiplier).
(iii) The total shadow price (or marginal value) of the resources equals the optimal value of objective
function.
(iv) The value of the ith dual variable represents the rate at which the primal objective function value
will increase by increasing the right-hand side (resource value) of constraint i, assuming that all other
data remain unchanged.
Remark When the cost of a resource is sunk (cost that is incurred no matter irrespective to the value
the dual variables). When the cost of a resource vary with the value of decision variables the shadow
price represents the extra cost likely to be paid for one unit of the resource.

Example: Manufacturing Widgets


Problem: A company manufactures two products, Product A and Product B. The company wants to
maximize its profit given the constraints on available resources.
• Objective Function: Maximize profit
• Resource Constraints: Limited quantities of two resources, Resource 1 and Resource 2.
Data:
• Profit per Unit:
o Product A: $10
o Product B: $12
• Resource Requirements:
o Product A: 2 units of Resource 1, 1 unit of Resource 2
o Product B: 1 unit of Resource 1, 2 units of Resource 2
• Available Resources:
o Resource 1: 100 units
o Resource 2: 80 units
Solving the Primal Problem
After solving the linear programming problem using the simplex method, let’s assume the optimal
solution is:
• Product A = 20 units
• Product B = 30 units
• Optimal profit = $10(20) + $12(30) = $200 + $360 = $560
Dual Problem
Now, let’s consider the dual problem to understand the shadow prices.
Dual Formulation:

Dual Variables:
• y1 represents the shadow price of Resource 1.
• y2 represents the shadow price of Resource 2.
Assuming the dual problem is solved and yields:
• y1=2
• y2=3
Interpretation of Shadow Prices
• Shadow Price of Resource 1: 2
o Meaning: If the availability of Resource 1 is increased by 1 unit, the optimal profit of
the company will increase by $2. In other words, the company would be willing to pay
up to $2 for an additional unit of Resource 1 to maximize its profit.
• Shadow Price of Resource 2: 3
o Meaning: If the availability of Resource 2 is increased by 1 unit, the optimal profit of
the company will increase by $3. Thus, the company would be willing to pay up to $3
for an additional unit of Resource 2 to maximize its profit.
Remark
• Sunk Cost: If the cost of obtaining Resource 1 or Resource 2 is a sunk cost (i.e., it has already
been incurred and does not change with the availability), the shadow prices still represent how
much additional profit can be gained from increasing the availability of these resources.
• Variable Cost: If the cost of resources varies with the quantity available, the shadow price
provides the additional amount that should be paid for one more unit of the resource, reflecting
the extra cost likely to be incurred for obtaining additional units.
In this example, the shadow prices help in understanding the value of resources and guide decision-
making about whether it’s worthwhile to invest in increasing the availability of resources to boost profit.
ADVANTAGES OF DUALITY
1. It is advantageous to solve the dual of a primal that has a less number of constraints because the
number of constraints usually equals the number of iterations required to solve the problem.
2. This avoids the necessity for adding surplus or artificial variables and solves the problem quickly
(the technique is known as the primal-dual method ). In economics, duality is useful in the formulation
of the input and output systems. It is also useful in physics, engineering, mathematics, etc.
3. The dual variables provide an important economic interpretation of the final solution of an LP
problem.
4. It is quite useful when investigating changes in the parameters of an LP problem (the technique is
known as the sensitivity analysis).
5. Duality is used to solve an LP problem by the simplex method in which the initial solution is
infeasible (the technique is known as the dual simplex method).

You might also like