Linear Programming I
Linear Programming I
Linear Programming I
LINEAR PROGRAMMING-I
2.1 INTRODUCTION
Many management decisions involve trying to make the most effective use of
organization resources. These resources include Machinery, Labors, Money, Time,
Warehouse space or Raw materials to produce goods (machinery, furniture, food or
cooking) or service (schedules for machinery and production advertising policies or
investment decision).
2.2 History
The problem of solving a system of linear inequalities dates back at least as far as
Fourier, after whom the method of Fourier-Motzkin elimination is named. Linear
programming arose as a mathematical model developed during World War II to plan
expenditures and returns in order to reduce costs to the army and increase losses to the
enemy. It was kept secret until 1947. Postwar, many industries found its use in their
daily planning.
The founders of the subject are Leonid Kantorovich, a Russian mathematician who
developed linear programming problems in 1939, George B. Dantzig, who published the
simplex method in 1947, and John von Neumann, who developed the theory of the
duality in the same year. The linear programming problem was first shown to be
solvable in polynomial time by Leonid Khachiyan in 1979, but a larger theoretical and
practical breakthrough in the field came in 1984 when Narendra Karmarkar introduced a
new interior point method for solving linear programming problems.
1
applying the Simplex algorithm. The theory behind linear programming drastically
reduces the number of possible optimal solutions that must be checked.
2
Linear Combination. An expression of the form a1x1 + a2x2 + ... + anxn where
the ai are coefficients and the xi are variables or vectors.
Linear Constraint. A constraint which contains variables which are related in
terms of linear combinations.
Linearly Dependent. A set of vectors {X} is linearly dependent if a set of
numbers aj, not all equal to zero, can be found such that a1X1 + a2X2 + ... +
akXk = 0.
Linear Equation. An equation whose left-hand side and right-hand side are both
linear functions of the variables. Such an equation can always be put in the form
f(x, y, z,) = c, where f is a linear function and c is a constant.
Linear Independence. A set of vectors (Xi)is linearly independent if the only set
of numbers ai for which alX1 + a2X2 + ... + akXk = 0 is al = a2 = ... = ak = 0.
Linear Inequality. An inequality whose left-hand side and right-hand side are
both linear functions of the variables.
Linear Model. A model where each dependent variable is a linear function of
independent variables.
Linear Programming. The concept of expressing the interrelationship of
activities of a system in terms of a set of linear constraints in nonnegative
variables. A program, i.e., values of the variables, is selected which satisfies the
constraints and optimizes a linear objective function in these variables.
Linear Programming Problem. The problem of minimizing or maximizing a
linear function in n variables subject to m linear constraints, with the variables
restricted to be nonnegative. Mathematically, we have Min (max) cX subject to
AX = b X ≥ 0 with A an (mxn) matrix. The constraints AX = b can also be
given in terms of inequalities, i.e., AX ≥ b, AX ≤ b or a combination of such
constraints.
Near-Optimum Solution. A feasible solution to a mathematical programming
problem whose value of the objective function can be shown to be near the
optimum value.
Nonbasic Variable. A variable in a solution to a linear programming problem
obtained by the simplex method and whose value has been arbitrarily set to
equal zero.
Nondegeneracy Assumption. The assumption that all basic feasible solutions
to a linear programming problem are nondegenerate. This assumption is
convenient in some proofs which demonstrate the finiteness and convergence of
the simplex algorithm.
Nondegenerate Feasible Solution. A basic feasible solution in which all of the
basic variables are positive.
Nonegativity Constraint. A restriction that a variable can take on only positive
or zero values, e.g., x ≥ 0-
Nonlinear Constraint. A constraint which contains variables whose relationship
cannot be expressed in terms of linear combinations.
Nonlinear Equation. An equation at least one of whose terms is a nonlinear
function of the variables.
3
Nonlinear Function. A function defined as something other than a sum of terms
consisting of a constant times a single variable plus a final constant; net, not a
linear function
Nonlinear Programming. An inclusive term covering all types of constrained
optimization problems except those where the objective function and the
constraints are all linear. Special types of nonlinear programming for which some
theory has been developed are convex programming, concave programming,
and quadratic programming.
2.4 CANONICAL FORM OF LP PROBLEM
Where,
x represents
the vector of variables (to be determined),
c and b are vectors of (known) coefficients and
A is a (known) matrix of coefficients.
Linear programming can be applied to various fields of study. It is used most extensively
in business and economics, but can also be utilized for some engineering problems.
Industries that use linear programming models include transportation, energy,
telecommunications, and manufacturing. It has proved useful in modeling diverse types
of problems in planning, routing, scheduling, assignment, and design.
4
Use in determination of how much quantity to produce of different grades of
petroleum product (say) to yield maximum profit.
Distribution System
Use in determining a distribution system that will minimize total shipping cost from
several warehouses to various market locations.
Limited Advertisement
Use in the allocation of limited advertising budget among radio, TV and
newspaper spots in order to maximize the returns on investment.
Investment
Use in selecting investment port-folio from a variety of stocks and bonds available in
such a way as to maximize the returns on investment.
Work Scheduled
Use in the development of a work scheduled that allows a large restaurant to meet
staff needs at all hours of the day, while minimizing the total number of employees.
5
ii. All LP models have constraints or limitations that limit the degree to which the
objective can be purse. E.g. deciding how many units of product in a product line to be
produced is restricted to the manpower and machinery available.
iii. There must be alternative course of action to choose from e.g. if there are 4 different
product, management may decide (using LP) how to allocate limited resources among
them.
iv. Objectives and constraints in LP model must be expressed in linear equations and
inequalities.
6
Standard form is the usual and most intuitive form of describing a linear programming
problem. It consists of the following four parts:
A linear function to be maximized
e.g.
.
Problem constraints of the following form
e.g.
Non-negative variables
e.g.
Subject to
a11 x1 + a12 x2 + ….. + a1n xn = b1
7
SOLVED EXAMPLES OF LP PROBLEM
1 7 5 6 4
2 4 7 5 8
3 2 9 7 3
Formulate a L.P. model to determine the number of production run for each method so as to
maximize the total number of complete unit of the final product.
Solution:
8
(
Let y = Min 6 x1+5 x2+7 x3 , 4 x1+8 x2+3 ).
5 4
It follow that 6 x1+5 x2+7 x3 y and 4x1 + 8 x2+3 x3 y
5 4
i.e 6 x1+5 x2+7 x3 0, and 4 x1+8 x2+3 x3 0.
Thus mathematical model for the problem is
Maximize Z= y,
Subject to constraints 7 x1 + 4 x2 + 2 x3 ≤ 120,
5 x1+ 7x2 + 9 x3 ≤ 240.
6 x1+ 5 x2+ 7 x3 – 5y 0,
4 x1+ 8 x2+ 3 x3 – 4y 0,
Where x1, x2 , x3 , y 0.
Part A Part B
Machining Capacity 25/hr 40/hr
Boring Capacity 28/hr 35/hr
Polishing Capacity 35/hr 25/hr
Formulate the L. P. model to determine the product mix that maximizes the profit.
Solution:
14 = 0.50 14 = 0.40
Boring cost 28 35
9
Casting Cost 2.00 3.00
Total Cost 3.80 4.60
Selling Price 5.00 6.00
Profit 1.20 1.40
Therefore objective is to
Maximize z= 1.2 x1 + 1.4 x2
Constraints are on the capacities of the machine. For one hour running of each machine they are
1 x1 + 1 x2 ≤ 1,
25 40
1 x1 + 1 x2 ≤ 1,
28 35
1 x1 + 1 x2 ≤ 1,
35 25
Or 8 x1 + 5 x2 ≤ 200,
5 x1 + 4 x2 ≤ 140,
5 x1 + 7 x2 ≤ 175,
Where,
x1 0 , x2 0
Mutual Fund is required to keep at least Rs. 2 lakhs in short term deposit and not to exceed
average risk factor of 42. Speculative stock must be at most 20 percent of total amount invested.
How should the mutual fund invest the funds so as to maximize its total expected annual return?.
Formulate this as a linear programming problem.
Solution
10
Let x1 , x2 ,x3 and x4 denote the amount of funds to be invested in government bonds, blue chip
stocks , speculative stocks and short term deposits respectively. Let z denote the total expected
return.
Since the Mutual Fund Company has Rs. 20 lakhs available for investment,
x1 + x2 + x3 + x4 ≤ 200000
Also , Mutual fund is required to keep at least Rs. 2 lakhs in short term deposits.
Hence x4 200000
The average risk factor is given by
12 x1 +24 x2 +48 x3 + 6 x4
x1 + x2 + x3 + x4
Since the average risk factor for Mutual Fund Company should not exceed 42, we get the
following constraint:
12 x1 +24 x2 +48 x3 + 6 x4 ≤ 42
x1 + x2 + x3 + x4
or 12 x1 +24 x2 +48 x3 + 6 x4 ≤ 42 ( x1 + x2 + x3 + x4)
or -30 x1 - 18 x2 + 6 x3 -36 x4 ≤ 0
Further , speculative stocks must be at most 20 per cent of total amount invested, hence
x3 ≤ 0.20 ( x1 + x2 + x3 + x4)
Or -0.2 x1 – 0.2 x2 + 0.8 x3 -0.2 x4 ≤ 0
Finally , since the objective is to maximize the total expected annual return, the objective
function for Mutual fund Company can be expressed as
Maximize Z = 0.14 x1 + 0.19 x2 + 0.23 x3 + 0.12 x4
Thus the linear programming model for Mutual fund Company is formulated as below:
Maximize Z = 0.14 x1 + 0.19 x2 + 0.23 x3 + 0.12 x4
Subject to constraints
x1 + x2 + x3 + x4 ≤ 200000
x4 200000
-30 x1 - 18 x2 + 6 x3 -36 x4 ≤ 0 or 30 x1 + 18 x2 - 6 x3 +36 x4 0
-0.2 x1 – 0.2 x2 + 0.8 x3 -0.2 x4 ≤ 0 or 0.2 x1 + 0.2 x2 - 0.8 x3 + 0.2 x4 0
Where,
x1 0, x2 0, x3 0, x4 0.
11
Example 2.4 :Allocation of Resources in Production
A farmer has 100 acres on which to plant two crops: corn or wheat. To produce these crops, there
are certain expenses as shown in the table.
Table 2.4: Allocation of resources for production of crops
Item Cost per Acre (Rs)
Corn
Seed 12
Fertilizer 58
Planting/care/harvesting 50
Total 120
Wheat
Seed 40
Fertilizer 80
Planting/care/harvesting 90
Total 210
After the harvest, the farmer must store the crops awaiting proper market conditions. Each acre
yields an average of 110 bushels of corn or 30 bushels of wheat. The limitations of resources are
as follows:
Available capital: Rs15,000 , Available storage facilities: 4,000 bushels.
If net profit (the profit after all expenses have been subtracted) per bushel of corn is Rs1.30 and
for wheat is Rs2.00 , how should the farmer plant the 100 acres to maximize the profits?
12
110x 30y 4000 .
Summary of constraints:
x y 100 [Available land]
120x 210y 15000 [Available capital]
110x 30y 4000 [Storage capacity]
x 0 [Non-negativity]
y 0 [Non-negativity]
Now, let P represent total profit. The farmer wants to maximize the profit, P.
Profit from corn value . amount 1.30 . 110x 143x .
Profit from wheat value . amount 2.00 . 30y 60y .
P profit from corn profit from wheat 143x 60y .
The linear programming model is stated as follows:
Maximise: P 143x 60y [Available land]
Subject to:
x y 100 [Available land]
120x 210y 15000 [Available capital]
110x 30y 4000 [Storage capacity]
x 0 [Non-negativity]
y 0 [Non-negativity]
13
The constraints are:
i. Non-negativity,
x 0 , y 0, The number of product must be non-negative
ii. Wood Material
2x Amount of wood material used for half-upholstered.
y Amount of wood material used for full-upholstered.
The total wood material cannot exceed 12:
This is the maximum available: 2x y 12 .
iii. Foam Material
2x Amount of foam material used for half-upholstered.
4y Amount of foam material used for full-upholstered.
The total foam material cannot exceed 24 :
This is the maximum available: 2x 4y 24 .
iv. Cover Material
5x Amount of cover material used for half-upholstered.
5y Amount of cover material used for full-upholstered.
The total cover material cannot exceed 35 :
This is the maximum available: 5x 5y 35 .
Thus, the linear programming model is:
Maximize: P Rs80x Rs90y .
Subject to:
2x y 12 [Wood material]
2x 4y 24 [Foam material]
5x 5y 35 [Cover material]
x 0 [Non-negativity]
y 0 [Non-negativity]
If food A cost 29k per ounce and food B cost 15k per ounce, how many ounces of each food
should be purchased for each patient per day in order to meet the minimum requirements at the
lowest cost?
Formulate the LP model.
14
y Number of ounces of food B.
The minimum cost, C, is found by:
Cost of food A .29x .
Cost of food B .15y .
C .29x .15y
The constraints are:
x 0
y 0
The amounts of food must be non-negative.
The table gives a summary of nutrients provided:
Food type Amount Total consumption (in Grams)
(Ounces)
Carbohydrates Proteins Fats
1 x 10x 2x 3x
2 y 5y 5y 4y
Total 10x + 5y 2x + 5y 3x+ 4y
Daily requirements:
10x 5y 200
2x 5y 100
3x 4y 120
The LP model is:
Minimize: C .29x .15y
Subject to:
10x 5y 200 [Carbohydrates]
2x 5y 100 [Protein]
3x 4y 120 [Fats]
x 0 [Non-negativity]
y 0 [Non-negativity]
15
Table 2.8: Capacity of supply and demand of refrigerator
Supply Demand
Dehradun, 200 Ambala 300
Ludhiana 600 Noida 400
How should transportation be made from Dehradun and Ludhiana to minimize the transporting
cost?
The information of this problem can be summarized by the following “map which is referred as fig 2.1”.
Fig: 2.1: Map of no of supply and demand of refrigerator along with transportation cost
Table 2.9: Source of supply to destinations with number and transportation cost
16
Example 2.8: Diet Problem
A patient wants to decide the constituents of diet., which will fulfill his daily requirements of proteins,
fats and carbohydrates at the minimum cost. The choice is to be made from three different types of
foods. The yields per unit of these foods are as follows
Table 2.10: Diet type, minimum requirement and cost
Food type Yield / unit Cost / Unit (Rs)
Proteins Fats Carbohydrates
1 2 2 4 40
2 4 2 4 50
3 8 10 8 60
Minimum 1200 400 800
requirement
Formulate linear programming for the problem.
Let,
a Number of yield of food protein.
b Number of yieldof food fats .
c Number of yield of food carbohydrates
17
Example 2.9: A school is preparing a trip for 400 students. The company who is providing the
transportation has 10 buses of 50 seats each and 8 buses of 40 seats, but only has 9 drivers
available. The rental cost for a large bus is $800 and $600 for the small bus. Calculate how many
buses of each type should be used for the trip for the least possible cost.
Solution:
x = small buses
y = big buses
x+y≤9
x≥0
y≥0
4 Find the set of feasible solutions that graphically represent the constraints.
18
5 Calculate the coordinates of the vertices from the compound of feasible solutions.
6 Calculate the value of the objective function at each of the vertices to determine which of
them has the maximum or minimum values.
The minimum cost is $6,200. This is achieved with 4 large and 5 small buses.
19
Example 2.10: A store wants to liquidate 200 of its shirts and 100 pairs of pants from last season.
They have decided to put together two offers, A and B. Offer A is a package of one shirt and a
pair of pants which will sell for $30. Offer B is a package of three shirts and a pair of pants,
which will sell for $50. The store does not want to sell less than 20 packages of Offer A and less
than 10 of Offer B. How many packages of each do they have to sell to maximize the money
generated from the promotion?
A B Minimal
Shirts 1 3 200
Pants 1 1 100
x + 3y ≤ 200
x + y ≤ 100
x ≥ 20
y ≥ 10
4 Find the set of feasible solutions that graphically represent the constraints.
20
5 Calculate the coordinates of the vertices from the compound of feasible solutions.
6 Calculate the value of the objective function at each of the vertices to determine which of
them has the maximum or minimum values.
f(x, y) = 30 · 20 + 50 · 10 = $1,100
f(x, y) = 30 · 90 + 50 · 10 = $3,200
f(x, y) = 30 · 20 + 50 · 60 = $3,600
21
QUESTION BANK: 2.1
Operations Product
I II III
1 1 2 1
2 3 0 2
3 1 4 0
Write LP model for this problem
8. A used car dealer wishes to stock up his lot to maximize his profit . He can select
car A, B and C which are valued wholesale at Rs 50000, Rs 70000 and Rs
80000 respectively. These can be sold at Rs 60000, Rs 85000 and Rs 105000
respectively. For each car type the probabilities of sale are as follows
Type of Car Probability of sale in 90 days
A 0.7
B 0.8
C 0.6
22
For every two car of type B, he should buy a one car of type A or C. If he has Rs
1000000 to invest, what should he buy to maximize his profit? Formulate the
linear programming for the problem.
9. Vitamin A and B is found in foods F1 and F2. One unit of food F1 contains 3 units
of vitamin A and 4 units of vitamin B and that of F2 contains 6 units of vitamin A
and 3 units of vitamin B One unit of vitamin F1 and F2 cost Rs 4 and Rs 5
respectively. The minimum daily need per person of vitamin A and B is 80 and
100 units respectively. Assuming that anything in excess of daily minimum
requirement is harmful. Find out the optimum mixture of F1 and F2 at the
minimum cost which meets the minimum requirement of vitamin A and B.
Formulate this as a LP problem.
10. A transport company has two types of trucks, Type A and Type B. Type A has a
refrigerated capacity of 20 m3 and a non-refrigerated capacity of 40 m3 while Type B has
the same overall volume with equal sections for refrigerated and non-refrigerated stock.
A grocer needs to hire trucks for the transport of 3,000 m3 of refrigerated stock and 4 000
m3 of non-refrigerated stock. The cost per kilometer of a Type A is $30, and $40 for Type
B. How many trucks of each type should the grocer rent to achieve the minimum total
cost?
11. A school is preparing a trip for 400 students. The company who is providing the
transportation has 10 buses of 50 seats each and 8 buses of 40 seats, but only has 9
drivers available. The rental cost for a large bus is $800 and $600 for the small bus.
Calculate how many buses of each type should be used for the trip for the least possible
cost.
12. A store wants to liquidate 200 of its shirts and 100 pairs of pants from last season. They
have decided to put together two offers, A and B. Offer A is a package of one shirt and a
pair of pants which will sell for $30. Offer B is a package of three shirts and a pair of
pants, which will sell for $50. The store does not want to sell less than 20 packages of
Offer A and less than 10 of Offer B. How many packages of each do they have to sell to
maximize the money generated from the promotion?
23