Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
303 views

2 Linear Programming (LP) Problem - Formulations

The document provides examples of linear programming problems and their formulations. It begins with examples of product mix, work scheduling, and other optimization problems. It then defines key terms like decision variables, objective function, constraints, and non-negativity restrictions. Several examples of linear programming problems from areas like production planning, cutting stock, game theory, work scheduling, portfolio optimization, and catering are presented along with their mathematical formulations. The document aims to explain the concepts and process of formulating linear programming problems through various examples.

Uploaded by

balaji
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
303 views

2 Linear Programming (LP) Problem - Formulations

The document provides examples of linear programming problems and their formulations. It begins with examples of product mix, work scheduling, and other optimization problems. It then defines key terms like decision variables, objective function, constraints, and non-negativity restrictions. Several examples of linear programming problems from areas like production planning, cutting stock, game theory, work scheduling, portfolio optimization, and catering are presented along with their mathematical formulations. The document aims to explain the concepts and process of formulating linear programming problems through various examples.

Uploaded by

balaji
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 57

Linear Programming (LP)

Problem- Formulations
Example 1. (Product Mix Problem)
• Consider a small manufacturer making two products A and B.

• Two resources R1 and R2 are required to make these products.

• Each unit of product A requires 1 unit of R1 and 3 units of R2.

• Each unit of product B requires 1 unit of R1 and 2 units of R2.

• The Manufacturer has 5 units of R1 and 12 units of R2 available.

• Manufacturer also makes a profit of


– Rs 6 per unit of product A sold and
– Rs 5 per unit of product B sold.

• Formulate a linear programming problem for the above situation.


Solution Problem 1
• Let X - be the number of units A produced
• Let Y - be the number of units B produced
• Profit Maximize Z = 6X + 5Y
• Constraints
– X + Y <= 5
– 3X + 2Y <= 12
• Non-negativity restrictions X, Y >= 0
Terminology
• The problem variables X and Y are called Decision variables and they represent
the solution or the output decision from the problem.

• The profit function that the manufacturer wishes to increase, represents the
objective of making the decisions on the product quantities and is called the
objective function.

• The conditions matching the resource availability and resource requirement are
called constraints.
– These usually limit (or restrict) the values the decision variables can take.

• We have also explicitly stated that the decision variables should take non
negative values
– This is true for all Linear Programming problems.
– This is called non negativity restriction

• The problem that we have written down in algebraic form represents the
mathematical model of the given system and is called the Problem formulation.
• The problem formulation has the following steps.
– Identifying the decision variables.
– Writing the objective function
– Writing the constraints.
– Writing the non negativity restrictions.

• In the above formulation, the objective function and the constraints are
linear.
– Therefore the model that we formulated is a linear programming
problem.

• A Linear Programming problem has


– A linear objective function,
– Linear constraints and
– The non negativity constraints on all the decision variables.

• Let us consider some more examples to understand the linear programming


formulations better
Example 2
A computer company manufactures laptops &
desktops that fetches profit of Rs. 700/- & 500/-
unit respectively. Each unit of laptop takes 4
hours of assembly time & 2 hours of testing time
while each unit of desktop requires 3 hours of
assembly time & 1 hour for testing. In a given
month the total number of hours available for
assembly is 210 hours & for inspection is 90
hours. Formulate the problem as LPP in such a
way that the total profit is maximum.
Solution Problem 2
• Let x1 - be the number of laptops produced
• Let x2 - be the number of desktops produced
• The objective function is
• Z=700x1+500x2 (Maximize)
• Subject to the constraint:
4x1+3x2 ≤ 210 (Assembly time constraint)
2x1+x2 ≤ 90 (Inspection time constraint)
• Non-negativity restrictions - x1≥0, x2≥0
Example 3
A toy company manufactures two types of dolls, a
basic version-doll A and a deluxe version- doll B.
Each doll of type B takes twice as long to produce as
one of type A and the company would have time to
make maximum of 2000 dolls per day. The supply of
plastic is sufficient to produce 1500 dolls per day(
Both A & B combined). The deluxe version requires a
fancy dress of which there are only 600 per day
available. If the company makes a profit of Rs. 10/- &
Rs. 18/- per doll on doll A & B respectively, then how
many of each doll should be produced per day in
order to maximize the total profit. Formulate the
problem as LPP.
Solution to Problem 3
The objective function is
Zmax=10x1+18x2
Subject to the constraint:
x1+2x2 ≤ 2000
x1+x2 ≤ 1500
x2 ≤ 600
x1≥0, x2≥0
Problem 4
A person requires 10, 12 and 12 units
chemicals A, B, C respectively for his garden.
One unit of liquid product contains 5, 2 and 1
units of A, B and C respectively. One unit of
dry product contains 1, 2 and 4 units of A, B,
C. If the liquid product sells for Rs. 3/- and the
dry product sells for Rs. 2/-, how many of each
should be purchased, in order to minimize the
cost and meet the requirements.
Solution to Problem 4
The objective function is
Zmin=3x1+2x2
Subject to the constraint:
5x1+x2 ≥ 10
2x1+2x2 ≥12
x1+4x2 ≥ 12
x1≥0, x2≥0
Example 5. Production planning problem
• Let us consider a company making a single product.

• The estimated demand for the product for the next four months are
1000, 800, 1200, 900 respectively.

• The company has a regular time capacity of 800 per month and
over time capacity of 200 per month.

• The cost of regular time production is Rs 20 per unit and the cost of
over time production is Rs 25 per unit.

• The company can carry inventory to the next month and the
holding cost is Rs 3/unit/month.

• The demand has to be met every month. Formulate a linear


programming problem for the above situation.
Example 6. Cutting Stock Problem
Consider a big steel roll from which steel sheets of the same
lengths but different width have to be cut. Let us assume that
the roll is 20 Inch wide and the following sizes have to be cut

1. 9 Inch 511 numbers


2. 8 Inch 301 numbers
3. 7 Inch 263 numbers
4. 6 Inch 383 numbers

It is assumed that all the cut sheets have the same length
(Say, 50 Inches). Only one dimensional cutting is only
allowed.

The problem is to cut the sheets in such a way as to


minimize wastage of material.
Example 7. Game theory Problem
• Consider two manufacturers (A and B) who are competitors for the
same market segment for the same product.
– Each wants to maximize the market share and adopts two strategies.

• The gain (or pay off) for A when A adopts strategy i and B adopts
strategy j is given by aij. A 2 x 2 matrix would look like

• During a given time period T, both A and B have to mix their


strategies.

• If A plays only strategy 1, then B would play strategy 2 to gain which A


would not want.

• Each therefore want to mix their strategies so that they gain


maximum (or the other loses maximum).
Example 8. Work – scheduling Problem
A hospital requires different number of full time
employees on different days of the week. The daily
requirement is given in the table. Union rules state that
each full time employee must work for five consecutive
days and then receive two days off. Formulate an LP so
that the hospital can minimize the number of full time
employees who must be hired.
Days of the No. of full-time Days of the No. of full-time
week employees required week employees required
1 = Monday 17 5 = Friday 14
2 = Tuesday 13 6 = Saturday 16
3 = Wednesday 15 7 = Sunday 11
4 = Thursday 19
Solution to Problem 8
DECISION VARIABLES
Let xi = no. of employees beginning work on day i,
for i=1, 2, ….7
All xi >= 0 for i = 1, 2, 3, 4, 5, 6, 7. And all xi are integers
OBJECTIVE FUNCTION
Minimize Z = x1 + x2 + x3 + x4 + x5 + x6 + x7
CONSTRAINTS
Constraints for Monday, Tuesday, …
x1 + x4 + x5 + x6 + x7 >= 17
x1 + x2 + x5 + x6 + x7 >= 13
x1 + x2 + x3 + x6 + x7 >= 15
x1 + x2 + x3 + x4 + x7 >= 19
x1 + x2 + x3 + x4 + x5 >= 14
x2 + x3 + x4 + x5 + x6 >= 16
x3 + x4 + x5 + x6 + x7 >=11
Example 9.
Old hens can be bought at Rs. 50/- each
but young ones cost Rs. 100/- each. The
old hens lay 3 eggs/week and young hens
5 eggs/week. Each egg costs Rs. 2/-.
A hen costs Rs. 5/- per week to fee. If a
person has only Rs. 2000/- to spend for
hens and he cannot house more than 40
hens, formulate the problem to decide
how many of each kind of hen should he
buy ?
Solution to Problem 9
Let x1& x2 be the number of old and young hens to be purchased
No. of eggs laid by old hens=3
No. of eggs laid by young hens=5
Total income from the eggs= (No. of eggs)*Selling price
= (3x1+5x2)*2 = 6x1+10x2
Feeding cost = (x1+x2)*5 = 5x1+5x2
Profit = Income-Feeding cost = ( 6x1+10x2 ) –(5x1+5x2) = x1+5x2
Thus,
Zmax= x1+5x2 is the objective function
Subject to the constraints,
50x1 + 100x2 ≤ 2000 (Budget Constraint)
x1 + x2 ≤ 40 (Housing Constraint)
x1≥0, x2≥0
Example 10. Portfolio optimization
Assume you have inherited Rs. 1 lakh from your
father that can be invested in two kinds of stock
portfolios, with the maximum investment allowed
in either portfolio set as Rs. 75,000/-. The first
portfolio has an average rate of return of 10 %,
whereas the second has 20%. In terms of risk
factors the first and second portfolios have a risk
rating of 4 and 9, resp. on a scale of 0 to 10.
Since you wish to maximize your returns, you will
not accept an average rate of return below 12 % or
a risk factor above 6. Hence you face the important
question… How much should you invest in each
portfolios? Formulate this as an LPP.
Solution to Problem 10

Maximize 0.1x1 + 0.2x2


subject to x1 + x2 <= 1,00,000
x1 <=75,000
x2 <= 75,000
0.1x1 + 0.2x2 >= 0.12(x1 + x2)
4x1 +9x2 <= 6 (x1 + x2)
x1 >= 0, x2 >= 0.
Example 11. Caterer Problem
A caterer is to organize party for a five
consecutive days. He needs a total of 100, 60, 80,
90, and 70 fresh napkins during the 5 days. Each
new napkins costs Rs. 3/-. He can use soiled
napkins after getting them washed from a
laundry. washing charges are Rs.1 per napkin.
Napkin sent to the laundry at the end of any day
can be used from the second day onwards.
Formulate LP model to determine the planning
schedule the caterer should adopt to buy or send
napkins to the laundry so as to minimize the cost.
Solution to Problem 11
Xj = no. of napkins bought on the jth day
Yj = no. of napkins sent for laundry service on the jth day

Minimize Z = 3(X1+X2+X3+X4+X5)+(Y1+Y2+Y3)
STC
X1>=100
X1+X2>=160
X1+X2+X3+Y1>=240
X1+X2+X3+X4+Y1+Y2>=330
X1+X2+X3+X4+X5+Y1+Y2+Y3>=400
Y1<=100
Y2<=60
Y3<=80

All Xj , Yj > = 0 and integers


Example 12.
The owner of fancy goods shop is interested to determine how many
advertisement to release in the selected three magazines A,B and C. His main
purpose is to advertise in such a way that total exposure to principal buyers of his
goods is maximized. Percentages of readers for each magazine are known.
Exposure in any particular magazine is the number of advertisements released
multiplied by the number of principal buyers. The following data are available.

Magazine A Magazine B Magazine C

Readers 1 lakh 0.6 lakh 0.4 lakh

Principal buyers 20 % 15 % 8%

Cost per advt. (Rs.) 8000 6000 5000

The budgeted amount for the advertisements is at most Rs. 1.0 lakh. The owner
has already decided that magazine A should have not more than 15
advertisements and that B and C each gets at least 8 advertisements. Formulate a
linear programming model for this problem.
Solution to Problem 12
Let x1, x2 and x3 be no. Of advertisements insertions in
magazines A, B and C, respectively.
The total exposure of principal buyers of the magazine is
Zmax= (20% of 1,00,000)x1 + (15% of 60,000)x2+(8% of 40,000)x3
The Objective function
Zmax= 20000x1 +9000x2+3200x3
Subject to the constraint
8000x1 +6000x2+5000x3≤1,00,000
x1 ≤ 15, x2 ≥ 8, x3 ≥ 8
x1≥0, x2≥0, x3≥0
GRAPHICAL METHOD FOR LPP
Graphical Method
Linear programming problems involving two
decision variables can easily be solved by
graphical method, which provides a pictorial
representation of the solution.
Steps in Graphical Method
• Formulate the given problem as LPP
• Draw a graph with one variable on the horizontal axis
and one on the vertical axis.
• Plot each of the constraint as if they were equalities
or equations.
• Identify the feasible region (Solution space) that is
the area that satisfies all the constraints.
• Name the intersections of the constraints on the
perimeter of the feasible region and get their co-
ordinates,
• Substitute each of the co-ordinates into the objective
function and solve for Z
• Select the solution that optimizes Z (based on
objective) that is obtain Zmin or Zmax
Various Cases in Graphical Method
A Linear-programming problem may be having
–A unique optimal solution
–An infinite number of optimal solution
(alternative optimal solution).
–An unbounded solution and
–No solution.
Problem 1. Solve graphically
“Fresh and tasty” bakers make cakes and pastries. On
a Sunday morning they have to make ‘plum cake”
and “fruit pastries”. They have 450 units of flour and
they use 1 units of flour per cake and 1 units per
pastry. They also have 600 units of time in the oven
that day and each cake requires 2 units in the oven
and each pastry requires 1 units of time in the oven.
They sell each cake for Rs 3 and each pastry for Rs 4.
How many cakes and pastries they should make to
maximize their sale?
Formulate this problem as L.P.P.
– Solve graphically.
Solution to Problem 1

Formulate of the given problem as LPP


Zmax=3x1 +4x2
Subject to
x1+x2 ≤ 450
2x1 + x2 ≤ 600
x1≥0, x2≥0
Solution to Problem 1 Cont..
x1+x2 ≤ 450 -----------------(1)
2x1 + x2 ≤ 600 ------------------(2)
x1≥0, x2≥0
Writing the constraint (1) as equation
x1+x2 = 450
when x1 = 0, x2 = 450, The Co-ordinates are (0,450).
when x2 = 0,x1 = 450, The Co-ordinates are (450,0).
Similarly writing the constraint (2) as equation
2x1 + x2 = 600
when x1 = 0, x2 = 600, The Co-ordinates are (0,600).
when x2 = 0,x1 = 300, The Co-ordinates are (300,0).
Solution to Problem 1 Cont..Graph
Solution to Problem 1 Cont..
Co-ordinates Zmax=3x1+4x2
O(0,0) ZO=3(0)+4(0)=0
A(300,0) ZA=3(300)+4(0)=900
B(150,300) ZB=3(150)+4(300)=1650
C(0,450) ZC=3(0)+4(450)=1800

Zmax occurs at Zc and the value is 1800


& co-ordinates are x1=0 and x2=450.
The number of plum cake” and “fruit pastries prepared on Sunday
are 0 and 450 respectively in order to maximize the profit
Problem 2. Solve graphically

A paper mill produces two grades of paper


namely X and Y. Because of raw material
restrictions, it cannot produce more than 400
tons of grade X and 300 tons of grade Y in a
week. There are 160 production hours in a week.
It requires 0.2 and 0.4 hours to produce a ton of
products X and Y respectively with corresponding
profits of Rs. 200/- and Rs. 500/- per ton.
Formulate the above as a LPP to maximize profit
and find the optimum product mix.
Solution to Problem 2
The objective function is
Zmax = 200x1+500x2
Subject to the constraint:
x1 ≤ 400
x2 ≤ 300
0.2x1+0.4x2 ≤ 160
x1≥0, x2≥0
Solution to Problem 2 Cont..
x1 ≤ 400 -----------------(1)
x2 ≤ 300 -----------------(2)
0.2x1+0.4x2 ≤ 160 ------------------(3)
x1≥0, x2≥0
Writing the constraint (3) as equation
0.2x1+0.4x2 = 160
when x1 = 0, x2 = 400,
The Co-ordinates are (0,400).
when x2 = 0,x1 = 800,
The Co-ordinates are (800,0).
Solution to Problem 2 Cont..Graph
Solution to Problem 2 Cont..
Co-ordinates Zmax=200x1+500x2
O(0,0) ZO=200(0)+500(0)=0
A(0,300) ZA=200(0)+500(300)=150000
B(200,300) ZB=200(200)+500(300)=190000
C(400,200) ZC=200(400)+500(200)=160000
D (400,0) ZD=200(400)+500(0)=80000
Zmax occurs at ZB and the value is 190000
& co-ordinates are x1=200 and x2=300.
The number of X” and “Y are 200 and 300 tons paper produced
respectively in order to maximize the profit
Problem 3. Solve graphically
A family doctor suggests two types of foods F1
and F2 Per gram of F1 contains 20 units of
vitamins and 40 units of proteins and per gram of
F2 contains 30 units of each if vitamin and
protein. The daily human requirements of
vitamins and proteins are 900 units and 1200
units, respectively. The food cost per gram of F1
and F2 is Rs. 0.60 and Rs.0.80, respectively. How
many grams each of F1 and F2 should be
consumed so as to minimize the food cost?
Clearly shade the feasible region while using the
graphical method.
Solution to Problem 3
The objective function is
Zmin = 0.6x1+0.8x2
Subject to the constraint:
20x1+30x2 ≥ 900
40x1+30x2 ≥ 1200
x1≥0, x2≥0
F1 = 15 and F2 = 20 Cost = Rs 25/-
Problem 4. Solve graphically
The standard weight of a special purpose brick
is 5 kg and it contains two basic ingredients B1
and B2. B1 costs Rs. 5 per Kg and B2 costs Rs. 8
per Kg. Strength considerations state that the
brick contains not more than 4 kg of B1 and
minimum of 2 kg of B2. Since the demand for
the product is likely to be related to the price
of the brick, find out graphically minimum cost
of the brick satisfying the above conditions.
Solution 4

Z=5X1 + 8X2
6
5
Z=5*3 + 8*2
4 Z=15+16 = Rs 31/-
3
2
1

0 1 2 4
3 5 6
Problem 5. Solve graphically
• A company produce 2 types of leather belts type A &
type B. Profits on 2 types of belts are Rs 40 & Rs 30
respectively per belt. Each type of A belt requires twice
as much time as required by type B belt. If all the belts
are of type B the company would produce 1000
belts/day. But the supply of leather is sufficient only to
produce 800 belts/day. Belt A requires fancy buckles and
400 fancy buckles are available for this/day. For belt B
only 700 buckles are available/day. How should the
company manufacture the 2 types of belts in order to
maximize the profits.
– Formulate this problem as L.P.P.
– Solve graphically.
Solution to problem no 5
• Maximize Z = 40 X + 30 Y
• 2X + Y <= 1000
• X + Y <= 800
• X<=400
• Y<= 700

• X=200 Y=600 & Z=26,000/-


Problem 6. Solve graphically
• A company owns 2 flour mills A & B which have different
production capacities for high, medium & low grade flour.
This company has entered a contract to supply flour to a
firm every week with 12, 8 & 24 quintals of high, med &
low grade flour resp. It costs the company Rs 1000 and Rs
800/day to run a mill A & B Respectively. On a day mill A
produces 6, 2 & 4 quintals of high, med & low grade flour
resp. Mill B produce 2, 2 & 12 quintals of high, med &
low grade flour resp. How many days / week should each
mill be operated in order to meet the contract order
most economically
– Formulate this problem as L.P.P.
– Solve graphically.
Solution to problem no 6
• Minimize Z = 1000 X + 800 Y
• 6X + 2Y >= 12
• 2X + 2Y >= 8
• 4X + 12Y >=24

• X=1 Y=3 & Z=3,400/-


Problem no 7
Solve the following Linear programming
problem by graphical method
(Multiple solutions)
Zmax=3x1 +8x2
Subject to
x1 + x2 ≤ 5
3x1 + 8x2 ≤ 24
x1≥0, x2≥0
Solution to Problem 7 Cont..
Co-ordinates Zmax=3x1+8x2
O(0,0) ZO=3(0)+8(0)=0
A(0,3) ZA=3(0)+8(3)=24 Max
B(16/5,9/5) ZB=3(16/5)+8(9/5)=24 Max
C(5,0) ZC=3(5)+8(0)=15

Zmax occurs at ZA and ZB the value is 24


& co-ordinates are x1=0 and x2=3., & x1=16/5 and x2=9/5
Problem no 8
Solve the following Linear programming
problem by graphical method
(Unbounded solutions)
Zmax=3x1 +8x2
Subject to
2x1 - x2 ≥0
x2 ≤ 4
x1≥0, x2≥0
Solution to Problem 8 Cont..

Co-ordinates Zmax=3x1+8x2
O(0,0) ZO=3(0)+8(0)=0
A(2,4) ZA=3(2)+8(4)=38
B(t,4) ZB=3(t)+8(4)=3t + 32
C(t,0) ZC=3(t)+8(0)=3t

As t increases 3t + 32 also increases


Note: The obtained feasible region is open or unbounded
if Z is to be maximized then the solution is unbounded
that is Zmax occurs at infinity in the given problem.
Problem no 9
Solve the following Linear programming
problem by graphical method
(Infeasible solution)
Zmax=3x1 - 2x2
Subject to
x1 + x2 ≤ 5
x1 + x2 ≥ 6
x1≥0, x2≥0
It is observed that there is no common feasible
region satisfying all the constraints. Hence the
problem cannot be solved. In other words the given
linear programming problem has no solution.
Problem 10. Solve graphically
• A manufacturer of a line of patient medicines is
preparing a production plan of medicines of A & B.
There are sufficient ingredients available to make
20,000 bottles of A and 40,000 bottles of B, but there
are only 45,000 bottles into which either of the
medicines can be put. Furthermore it takes 3 hours
to prepare enough material to fill 1000 bottles of A
and 1 hour to fill 1000 bottles of B and there are 66
hours available for this operation. The profit is Rs. 20
per bottle of A and Rs. 16 per bottle of B.
– Formulate this problem as L.P.P.
– Solve graphically.
Problem 11. Solve graphically
• A small manufacturer employs 5 skilled men and 10
semi-skilled men. He makes an article in 2 qualities, a
deluxe model and an ordinary model. The making of
deluxe model requires 2 hours of work by a semi-
skilled man and 2 hours of work by a skilled man. The
ordinary model requires 3 hours of work by a semi-
skilled man and 1 hour of work by a skilled man. By
union rule no man can work more than 8 hours per
day. The manufacturer's profit on the deluxe model
is Rs. 10 and on the ordinary model it is Rs. 8. How
many of each type of model should be made in order
to maximize profit.
Problem 12. Solve graphically
A firm plans to purchase at least 200 quintals of scrap containing
high quality metal X and low quality metal Y. It decides that the
scrap to be purchased must contain at least 100 quintals of X –
metal and not more than 35 quintals of Y – metal. The firm can
purchase the scrap from two suppliers (A and B) in unlimited
quantities. The percentage of X and Y metals in terms of weight in
the scraps supplied by A and B is given below:

Metals Supplier A Supplier B


X 25% 75%
Y 10% 20%

The price of A’s scrap is Rs. 200 per quintal and that of B’s is Rs. 400
per quintal. Formulate this problem as LP model and solve it to
determine the quantities that the firm should buy from the two
suppliers so as to minimize total purchase cost.

You might also like