Linear Programming
Linear Programming
INTRODUCTION
What does Linear Programming stand for?
Linear – all the relations used in the problem should be linear, i.e. the powers of the decision variables
should be one, e.g. Z = 2X + 3Y.
A linear program is a model that can be used to determine how to achieve an objective while satisfying all
the basic requirements for a problem situation. It is a mathematical procedure that is applicable when the
objective and requirements can be expressed as functions that are linear.
Linear Programming typically deals with the problem of allocating limited (scarce) resources to numerous
competing activities in a fashion that maximizes return or minimizes cost. As a model, L.P. has been used
widely in a variety of applications, including:
Another factor to be considered is that the firm has more than one alternative available in securing its
objectives. Thus, it usually has a number of products that it can offer in order to maximize profits, secure a
certain sales volume, generate a desired return on investment, and so on.
Therefore, there are three essential aspects that must be met for L.P. application, namely:
Given a set of m linear inequalities or equations in n variables, find non-negative values of these variables
that satisfy the given inequalities or equations and maximize / minimize some linear functions of variables.
The resources are indexed by i, where i = 1, 2, 3,…….., m and the activities are indexed by j, where j = 1,2,
……., n.
We let X j be the level of activity j, and Z be the numerical value of the measure of performance or benefit.
We also define C j to be the increase in Z that would result from a one-unit increase in X j. The parameter b i
denotes the amount of resource i available and a I j represents the amount of resource I needed for one unit of
activity j.
ACTIVITY
RESOURCE RESOURCE REQUIRED / UNIT RESOURCE
AVAILABLE
1 2 3 … n
Change in Z / C1 C2 C3 … Cn .
Unit
Using the data from the resource requirements table, we can formulate the general L.P. model for allocating
m resources to n activities.
Optimize Z = C1 X1 + C2 X2 + C3 X3 + … + C n X n
Subject to
1. LINEARITY (PROPORTIONALITY)
The objective function, constraints and relationships must be linear, i.e., any physical properties that
form the basis of the problem vary in direct proportion with the quantities or number of components
produced. For example, if profit increases by Sh.100 per unit if product A is produced, then if X units
are produced then the profit expected is Sh.100 × X.
2. DIVISIBILITY
Quantities, costs and revenues (i.e. physical properties) are infinitely divisible, i.e. fractions of the
model, decision variables are acceptable in the solution. [It is okay to have a solution giving 2.5 people,
1.3 cars, 54.5 units of a product being produced]. The divisibility assumption simply means that we are
treating the variables as continuous rather than being discrete.
3. DETERMINISTIC (CERTAINTY)
This assumption means that the model parameters / coefficients (C j, a i j and b i) are known and hence
constant. This means that the method makes no allowance for uncertainty in the estimates made,
although the evaluation of dual values or shadow prices indicate the sensitivity of the solution to
marginal uncertainty in the model parameters.
4. ADDITIVITY
The activities of the model must be additive in the objective function and the problem constraints.
If we produce two products A and B, then the total profit will be the total profits per product added
together.
5. STATICITY
Time factors are ignored, i.e. all production is assumed to be instantaneous. Also, any raw material not
being consumed during the period of the analysis is taken to have a value of zero, i.e. it is worthless or
has a value of zero!
The ability to represent a real-world problem situation with a mathematical model is an art. The art of
problem formulation comes with practice, a good deal of patience and a thorough understanding of the
problem being modeled.
After the problem has been properly identified verbally, the verbal descriptions must be transformed into
mathematical statements.
The ability to represent a real life or world problem situation with a mathematical model is an art. The art of
problem formulation comes with practice, a good deal of patience and a thorough understanding of the
problem being modeled.
Identify the unknowns or decision variables of the problem, Xj. Let X1 be…. Let X2 be ….. and so forth.
(i) Identify the resource availabilities for each of them, bi. How much do we have of each of the resources?
(ii) Relate resource availability to resource utilization, i.e. identify a ij. The per unit requirement of each
resource by each product.
(iii) Construct the model constraints. The constraints of the LP models can be measured in different
units. The constraints in matrix notation are: ∑aij*Xj≤ ≥ bi, where i = 1,2, …..,m and j = 1 to n
NOTE:
In performing the above six steps, it is often useful to combine the problem parameters in a tabular form
called a resource requirements table. After the formulation of the L.P. model, then we are ready for solving
the problem.
ILLUSTRATION
A furniture manufacturer makes chairs and tables. Each chair requires 8 man-hours to make whereas each
table requires 5 man-hours. The materials for a chair cost Sh.120, and those for a table cost Sh.150. The
profit that can be made on a chair is Sh.52.50, and on a table is Sh.45. The manufacturer has to abide by the
following restrictions:
(i) A contract to supply at least 15 chairs and 10 tables per week has to be met;
(ii) Only 320 man-hours per week are available from his labour force, and
(iii) His total weekly cost of materials for all chairs and tables produced must not exceed Sh.6, 000.
Problem: To find the number of chairs and tables to be made each week in order to maximize his expected
profits.
SOLUTION:
The manufacturer’s decision will be to make so many chairs and so many tables per week. The numbers to
be made are the unknowns of the problem, and we shall use letters c and t to denote them. Taking each piece
of information in the order it was given above, the following expressions involving c and t may be written
down:
Expression Explanation
(i) 8c + 5t (man-hours) Total number of man-hours to produce the chairs and tables.
(ii) 120c + 150t (Funds) Total cost of materials
(iii) 52.50c + 45t (Funds) = P Total profit to be made.
P is a function of c and t. It is called the objective function.
The constraints or restrictions due to contract, available man-hours and materials allowed may be expressed
in terms of inequalities on c and t, using the expressions above. One other natural restriction on c and t is
also involved called the non-negative restriction (both c and t cannot take negative values, c and t ≥ 0).
Inequality Explanation
inequalities.
APPLICATIONS
SOLUTION:
RESOURCE REQUIREMENTS TABLE
PRODUCT LABOUR MACHINE TIME MAX. PROD. PROFIT
MIN.PROD. (£/ UNIT)
(MIN. / UNIT) (MIN. / UNIT) (UNITS)
(UNITS)
Wooden toy 40 20 - - 4
Toy chest 20 25 12 - 3
Picture-frame 45 15 - 6 5
Available time (mins) 1815 1500
Decision Variables:
The objective of ART is to maximize total profit. Total profit consists of the sum of the individual profits
obtained from each of the three items being produced.
If we let Z = total profit per week, then our objective function is;
Max. Z = 4X 1 + 3X 2 + 5X 3.
If X1 wooden toys are produced, 40X1 minutes of labour are consumed, if X2 toy chests are produced, then
20X1 minutes are consumed, an if X3 picture frames are produced, then 45X3 minutes of labour are
consumed. Therefore, if X1, X2, X3 units of the respective items are produced simultaneously, then a total of
(40X1 + 20X2 + 45X3) minutes of labour are consumed. Since there is a total of 1815 minutes available for
the week, we must satisfy the condition:
One of the most successful applications of LP deals with the determination of optimal feed mix for
meeting the nutritional needs of an animal or a broiler at the least cost. The model assumes the
availability of certain foodstuffs or ingredients from which the feed is mixed. The nutritive content of
each ingredient is known.
The constraints of the model include: (i) daily nutrient requirements of the animal or broiler, and (ii)
physical or non-nutritive limitations such as supply, feed texture or ability of feed to be pelleted.
The objective is to minimize the total cost of a given batch size of the feed mix such that the nutritive
and physical constraints are satisfied.
EXAMPLE:
Suppose the required daily batch of the feed mix is 100 Kg. The diet must contain:
1) At least 0.8% but not more than 1.2% calcium;
2) At least 22% protein;
3) At most 5% crude fibre.
Suppose further that the main ingredients (feedstuffs) used include limestone (calcium carbonate), corn and
soya bean meal. The nutritive content of these ingredients is summarized below:
Kg per kg of ingredient
Formulate an LP model to determine the quantities of the various ingredients that should be mixed (blended)
to meet the established standards for the feed mix while minimizing cost.
SOLUTION:
Decision variables:
Let X1, X2 and X3 be the amounts (in kg) of limestone, corn and soya bean meal (blended) mixed in the feed
mix batch size of 100kgs respectively.
Calcium limitation:
At least 0.8% but not more than 1.2% of the batch size.
0.8% ≤ 0.380X1 + 0.001X2 + 0.02X3 ≤ 1.2% of the batch size.
OR
0.380X1 + 0.001X2 + 0.02X3 ≥ 0.8% = 0.008 ×100 kg = 0.8 kg
0.380X1 + 0.001X2 + 0.02X3 ≤ 1.2% = 0.012 × 100 = 1.2 kg
Protein limitation:
At least 22% of the batch size, i.e. 22 / 100 × 100 kg = 22 kg
0.09X2 + 0.50X3 ≥ 22
Fibre limitation:
At most 5% of the batch size, i.e. 5 / 100 ×100 kg = 5 kg
0.02X2 + 0.08X3 ≤ 5
Also, remember you cannot mix negative amounts of the ingredients X1, X2 and X3 ≥ 0
The complete LP model is given as:
Minimize C = 0.0164X1 + 0.0463X2 + 0.1250X3
Subject to
X1 + X2 + X3 = 100.
0.380X1 + 0.001X2 + 0.02X3 ≥ 0.8
0.380X1 + 0.001X2 + 0.02X3 ≤ 1.2
0.09X2 + 0.50X3 ≥ 22
0.02X2 + 0.08X3 ≤ 5
X1, X2 and X3 ≥ 0
A maximum of Sh.105, 000 may be invested in bonds of type X and a maximum of Sh.100, 000 may be
invested in bonds of type Y.
Muthoni is aware of the fact that there is a considerable amount of risk associated with investment in stock
X. She has therefore determined that she will not invest an amount in stock X that exceeds one-fourth of her
total investment. Also, the total amount invested in stock Y must be at least three times the amount invested
in stock X.
Additionally, Muthoni requires that her investment in bonds must be at least as great as one-half her
investment in stocks.
year. [Do the necessary construction and see whether you get the model given below]
Two methods are available for solving a LP model. These are the graphical and the simplex methods. The
purpose of LP as a quantitative technique is to help the decision maker obtain a solution to his / her problem.
Therefore, after completing the model formulation, the next step is to solve the model.
GRAPHICAL METHOD:
The purpose of the graphical method is to provide a grasp of the basic concepts that are used in the simplex
method. The simplex method is the major method of solving for LP models. To use the graphical method:
variables (2-dimensional) the graphical method representation involves the graphing of systems of linear
The Candy Serve Company produces mugs and snack plates for local souvenir shops. The mugs and snack
plates are manufactured in a two-stage process. There are 300 minutes of time available for the completion
of the first stage process and 400 minutes of time available for completion of the second stage process.
Additionally, mugs require hand painting that is restricted by a total of 150 minutes of available skilled
labour. The remaining production / profit information is given in the table below:
SOLUTION:
Always remember to construct the resources per unit requirement table first.
Decision variables:
Let X = the number of snack plates to be produced and sold.
Y = the number of mugs to be produced and sold.
Objective function:
Max. Z = 2X + 4Y
Constraints:
Stage 1: 2.5X + 3Y ≤ 300
Stage 2: 5X + 2Y ≤ 400
Painting: 2Y ≤150
Non-negativity conditions: X, Y ≥ 0
To graph the above inequalities (constraints), we first graph the corresponding equalities, i.e.
2.5X + 3Y = 300………..(1)
5X + 2Y = 400.……….(2)
2Y = 150………..(3)
X = 0 ……….(4)
Y = 0………….(5)
as lines in our two-dimensional graph. The lines may be graphed by identifying two points (X,Y) that satisfy
these equalities and drawing a line through these two points. If the lines do not pass through the point (0,0),
then the two points can be easily determined by identifying the X and Y intercepts.
For (1) above, 2.5X + 3Y = 300, when X =0, then Y = 100 and when Y = 0 then X = 120; that is;
For (2) above, 5X + 2Y = 400, when X = 0 then Y = 200 and when Y = 0 then X = 80; that is;
The unshaded area or region gives the feasible region, i.e. any point within the unshaded region or on the
Once the feasible region is identified, we can find the optimal solution to Candy Serve Company. Since an
optimal solution is a feasible solution, we must identify the best feasible solution in the feasible region.
Also, since there are an infinite number of feasible solutions, evaluating and comparing associated objective
function values is not possible. Therefore, we must develop a systematic procedure for determining the best
feasible solution.
A best production plan can only occur at a vertex (corner point) of the feasible area, and hence to find the
best production plan, all we do is finding or locating all the corner points of the feasible area. Substitute the
coordinates of the vertices in the objective function and select as optimal production plan, the vertex with
the “best” objective function value (maximization-highest while minimization-lowest).
Therefore, in order for Candy Serve Company to maximize profit, they should produce 30 snack plates and
75 mugs to get a maximum profit of £360.