Optimization Using Linear Programming
Optimization Using Linear Programming
Example # 14.1
Consider you as the marketing manager have two different types of tooth pastes to sell, and for our
convenience we name them 1 and 2 . Now the respective incomes per unit item from the two
products are 1 and 2 , and for ease of understanding and explanation one assumes that income is a
proxy for the difference of the selling price (SP) and the cost price (CP) of the respective products,
where by CP implies the cumulative cost incurred for making a unit product. Moreover consider the
input consumption of raw materials for both the type of toothpaste is fixed say and the utilization of
raw materials for per unit manufacturing of 1 and 2 are 1 and 2 respectively. Given this our
main concern is to decide on the optimal quantities of 1 and 2 produced such that one is able to
maximize the profit. Given this background for the problem, let us first denote the quantities of 1
and 2 produced as 1 and 2 , then the simple optimization problem function would be to
: 1 1 + 2 2 , given 1 1 + 2 2 . There are various mathods to solve this problem,
and that would be the main focus of this module, but before that we will discuss few important
assumptions which are applicable for this types of problems.
Thus the concept of Operations Research (OR) can be defined very simply as the scientific approach
to decision making, such that one is able to obtain the optimal decision for the system (e.g.,
production process and control (PPC), investment strategy for an investor, formulation of diet for
patients in a hospital, minimum distance travelled by a truck which must deliver goods at few fixed
location, but in some order or preference, etc.) under some set constraints/impediments which cannot
be violated or some rules which have to be adhered to. The main development of OR took place
during World War II (WW-II), and the father of OR can be considered as G. Dantzig. Other pioneers,
Page 2 of 31
who helped in developing this area, are, Koopmans, Russell A. Ackoff, Richard Karp, T. Magnanti,
etc. Now the question is, what are those important or vital steps which are to be considered in a macro
framework such that one can understand as well as solve the problem such that the goal or objective is
achieved. Before that we very briefly discuss the following schematic diagram (Figure 14.1) which
will motivate the reader on the variety of methods facets for optimization problem.
Optimization
Problem
Classical Heuristics
Methods
Simplex Algorithm
Genetic Algorithm
Steepest Descent
SQP
Newtons Method
ACO
Conjugate gradient
Simulated
Branch and Bound etc. Annealing etc.
Figure 14.1: Schematic disgram to show the variety of methods available to solve Optimization
problems
An optimization problems are made up of three basic ingredients (we will see what are these three
ingredients very soon), which are: (i) An objective function which we want to minimize or
maximize, for instance, in a manufacturing process, we might want to maximize the profit or
minimize the cost, or say in fitting an experimental data to a user-defined model, we might minimize
the total deviation of observed data from predictions based on the model, while in designing an
automobile panel, we might want to maximize its crash strength, (ii) a set of unknowns or variables
which affect the value of the objective function, say for example in the manufacturing problem, the
variables might include the amounts of different resources used or the time spent on each activity, or
else in fitting-the-data problem, the unknowns are the parameters that define the model, and in the
panel design problem the variables used can be taken as the shape and dimensions of the panel and
finally (iii) a set of constraints that allow the unknowns to take on certain values but exclude others,
Page 3 of 31
so for the manufacturing problem, it does not make sense to spend a negative amount of time on any
activity, so we constrain all the "time" variables to be non-negative, while in the panel design
problem, we would probably want to limit the weight of the product and to constrain its shape within
some desirable and feasible range.
So in simple terms the general goal of an optimization problem can be stated as the goal to find the
optimal combination of parameters, denoted as variables, which optimizes a given quantity, usually
denoted by the objective function, subject to some constraints under allowable range. Thus we have,
given a function : from some set to the real numbers we seek an element 0 in such that
(0 ) () for all in ("minimization") or such that (0 ) () for all in
("maximization") given the desired set of constraints.
s.t: ( ) 0 = 1, 2, . . ,
= 1, 2, . . ,
The objective function can be optimized using one of the techniques mentioned in the above figure, or
we can employ other methods also to solve the optimization problem. So one can add, that the
technique used for the optimization depends upon the properties of the objective function and the
constraints. Suppose the objective function is multimodal, such that there is one global maximum and
many local maxima. In this case we cannot apply the traditional methods to solve the optimization
problem because it may get struck to local maxima and we may not be able to reach the global
maximum.
For e.g., consider a function f = sin(x) + cos(x) + tan(x) (Figure 14.2) with the constraint that < x
<, then it is obvious that that the function has two local maxima but only one global maximum.
Therefore, traditional methods to optimize this function may not be suitable for this problem as they
may get stuck to some local points. In such cases we resort to heuristics and meta heuristics which try
to find out the global maxima/minima (as the case may be), and these techniques would just be named
here, without going into how these meta-heuristics techniques work.
Page 4 of 31
Figure 14.2: Plot of the function sin(x)+cos(x)+tan(x)
We know that the techniques for optimization depend upon other properties of objective function and
constraints (such as whether they are convex or concave), number of variables in the problem, etc. For
e.g., if we have an objective function which is concave then, we cannot apply any of the classical
methods (such as simplex algorithm, we will discuss about simplex method within few minutes) of
optimization to such an objective function. In such cases we have to resort to the meta heuristics for
optimizing the objective function, so there is no fixed rule as to which technique is to be used for
optimization given a particular problem and in many cases it comes by experience to know which of
the technique is to be used to solve the problem. But it is also imperative to mention here that the
formulation, i.e., how the optimization has been formulated also dictates the general solution
methodology employed, and this science of formulating the optimization problem comes from
experience and is more of an art than science.
Page 5 of 31
5) Select a suitable alternative
6) Present the results
7) Implement and evaluate the recommendations
Example # 14.2
A company in its despatch shop fills up the cartons with either 100 gms or 500 gms jam bottles, and
there are two different automatic cartons filling up machines which does this job of filling up the
empty cartons. The machines are denoted as X and Y, and each of these X and Y machines can fill up
the cartons with either 100 gms or 500 gms bottles. The carton filling rates are given below
Machine 100 gms bottle 500 gms bottle
X 80 per 5 minutes 30 per 5 minutes
Y 40 per 5 minutes 50 per 5 minute
X and Y can run for 8 hours per shift of the day and for 5 days a week. Profit for 100 gms bottle is Rs.
10, while for 500gms it is Rs. 40 respectively. The weekly filling up rate cannot exceed 500000 gms
in total (i.e., combining the weights of the 100 gms and 500 gms bottles) due to storage capacity in the
warehouse from where these bottles filled up cartons are dispatched to different distributors. Also the
market has limitation on the demand and a marketing survey of the demand of these two types of
bottles have shown that maximum/minimum demands are 2500 and 500 respectively for 100 gms and
500 gms bottles respectively. What is the companys maximum profit?
Step # 1: Let x1 and x2 denote the number of 100 gms and 500 gms bottles which are filled up and
dispatched per week to the distributors.
Step # 2: The objective is to maximize profit which is given by (10*x1 + 40*x2)
Step # 3:
Constraint # 1: x1/80 + x2/30 8*12*5
Constraint # 2: x1/40 + x2/50 8*12*5
Constraint # 3: 100*x1 + 500*x2 500000
Constraint # 4a: x1 2500 and x2 500
Constraint # 4b: x1 2500 and x2 500
So the LP is as follows
Max z (10*x1 + 40*x2)
s.t: x1/80 + x2/30 8*12*5
x1/40 + x2/50 8*12*5
100*x1 + 500*x2 500000
x1 2500 and x2 500
Page 6 of 31
i.e.,
Max z (10*x1 + 40*x2)
s.t: x1/80 + x2/30 8*12*5
x1/40 + x2/50 8*12*5
100*x1 + 500*x2 500000
x1 2500 and x2 500
Example # 14.3
A paint company manufactures two different types of paints, P1 and P2, from the raw materials, M1
and M2. The following table provide the basic data for our example
Tons of raw materials per ton of Maximum daily
P1 P2 availability (tons)
Raw material M1 6 4 24
Raw material M2 1 2 6
Profit per ton ($ 1000) 5 4
A marketing survey indicates that the daily demand for P2 cannot exceed that of P1 by more than 1
ton. Also the maximum daily demand of P2 is 2 tons. The company would like to determine the
optimal mix of the two paints in order to maximize its daily profit.
Step 1: To determine the amount to be produced of P1 and P2 we denote x1 as the amount of P1 paint
and x2 as the amount of P2 paint.
Step 2: To construct the objective function the company wants to increase its profit as much as
possible. If we denote the profit function as z, then we need to maximize z = 5*x1 + 4*x2.
Step 3: The constraints, that restricts the raw materials and demand is related by the fundamental
principle that {usage of raw materials for both the paints} {maximum raw materials available}
Thus we have from the table we have the following constraints:
6*x1 + 4*x2 24 1*x1 + 2*x2 6 1 + 2 1 2 2
With the problem as given, the schematic diagram (Figure 14.3) will make one understand the
pictorial representation for the two dimentional case. In case we have the problem in higher
dimension it may become difficult to represent the problem, but the general philosophy of pictorial
illustration will remains the same.
Page 7 of 31
Maximize = 51 + 42
s.t: 61 + 42 24 (14.1a)
11 + 22 6 (14.1b)
1 + 2 1 (14.1c)
01 + 2 2 (14.1d)
x1, x2 0 (14.1e)
Here the area A-B-C-D-E-A is the common area considered if one looks at the constraints and our
task if to find some point (x*1, x*2) such that we are able to maximize the objective function.
x2
1a
1b 1c
A B
1d C
C 1e
E D 1e
x1
Page 8 of 31
9) Basis of a matrix
10) Multiplication of matrices
11) Gauss Jordan method
12) Convex set/function
13) Concave set/Function
14) Hyper plane
15) Hyper space
14.3.1 Vector
It is a one dimensional array and in general signifies to have both unit as well as some director. In the
mathematical sense as used in Operations Research we see that a vector as an array and is denoted by
a column or a row as shown below. Suppose we have a 3-D plot and a point is represented by the co-
ordinates x=10, y=25, z=5, then in vecore notation it will be represented as = (10,25,5), else it can
10
also be represented as = 25.
5
14.3.3 Matrix
A matrix (for which the plural is matrices) is a rectangular arrangment of numbers, symbols,
equations, etc., arranged in rows and columns. The individual items in a matrix and the numbers,
symbols, equations, etc., are called entries or elements of the matrix. The nomenclature of defining
the matrix is by defining the number of rows and columns, i.e., in case we have a matrix of size 3 3,
10 3 0 10
the matrix then an example of it can be as 25 15 5 . Thus the first colums is 25, while the
5 5 100 5
last row is (5 5 100). Hence the 2 row and 3 element is 5, which gives us the idea that the
elements are generally identifies as , , suh that 6 coulmn will be the set of elements which are
1,6 , 2,6 , , ,6 provided we have number of rows. Similarly the 14 row would consist of
elements which are 14,1 , 14,2 , , 14, when one considers number of coulms.
Page 9 of 31
1,1 1,
The rank of a matrix = signifies the system of linear equations and linear
,1 ,
transformation encoded by A. In general it is the largest collection of linearly independent
columns/rows of , i.e., the maximum number of rows/columns which are independent and none of
these can be explained as a linear combination of the other rows/columns. The rank fo a marix is
5 10 0
denoted by rank(A). For example suppose = 4 8 5 . We can easily discern that 2 = 2
9 18 100
10 3 0
1 , thus the rank would not be 3 here, but for the case when = 25 15 5 , then the rank is the
5 5 100
maximum number of rows/columns, hence in this rank(B)=3.
Page 10 of 31
14.3.7 Transpose of a Matrix
5 10 0 5 4 9
Given a matrix = 4 8 5 , its transpose is given as = 10 8 18 . Few relevant
9 18 100 0 1 100
properties of transpose are:
1) ( ) = = .
2) ( + ) = + .
3) () = .
4) () = , where is a scalar number.
5) ( ) = ().
6) ( )1 = (1 ) .
Page 11 of 31
need coefficients (referred to as vector components) which gives the relationship of the combination.
1 0 0
In the 3-D case, i.e., the Cartesian co-ordinate system, if 1
= 0, 2 = 1 and 3 = 0, then
0 0 1
anh vector or co-ordinate can be expresses as a combination of 1 , 2 and 3 . Hence a point (2,4,3) is
1 0 0
actually formed as follows, i.e., 2 0 + 4 1 +3 0 = 21 + 42 + 33 . This gives an example
0 0 1
of what we mean by a basis.
Page 12 of 31
Figure 14.4: Convex set in 2-D
14.3.13 Concave Set/Function
Concave function is the negative of a convex function. Thus a function () is concave over a convex
set iff () is a convex function over the set. As already mentioned, for the case of LP problem, in
order to have solution/feasible space the set or function over which one would work is convex in
nature and not concave. For the interested reader we give few simple examples of concave set, and
Figure 14.5 shows examples of concave set in 2-D.
Page 13 of 31
z
C
y
B
x
Figure 14.6: Hyper plane when we have the space as 3D
Page 14 of 31
14.5 Few important definition for Linear Programming
1) Feasible set: This is a solution for which all the constraints are satisfied. For example the area A-
B-C-A (Figure 14.7) is the feasible set and any one point in that is the optimal soltuion
Obj Fun.
C
B
A
2) Optimal Solution: If one refers to Figure 14.8 then the optimal solution is a feasible solution that
has the most favourable value of the objective function, be it maximum or minimum.
Obj Fun.
C
B
A
3) Unbounded solution: The concept of unbounded solution states that as we continue with the
optimization programming for the LP the optimal solution keeps increasing/decreasing with each
iteration as the case may be depending on whether one is solving the maximization/minimization
problem. Thus in Figure 14.9 we encounter such a case when finding the maximization. As the
objective function continues to improve with each iteration we see that it attains a value of
infinity, which in technical term means we are able to obtain a feasible solution that is infinite.
For the ease of understanding we should note how the objective function keeps on increasing
reaching a value of infinity in the long run.
Page 15 of 31
Obj Fun.
4) Multiple Solutution: When solving the optimization problem we may not get an optimal or
unique solution. In that case we obtan multiple solution such that none of them is either worse or
better than the other solution. For example in Figure 14.10 all the points along the line A-E are
optimal feasible solution as can be visualized by the fact that when the objective asses through
the boundary E-A it crosses each and every point at the same time, thus making all of them
optimal solution. Hence one of them are unique.
5) Shadow Prices: Assuming there are no other changes to the input parameters, the change to the
objective function value per unit increase to a right hand side of a constraint is called the Shadow
Price.
6) Sunk costs: The shadow price is the value of an extra unit of the resource, since the cost of the
resource is not included in the calculation of the objective function coefficient.
7) Included costs: The shadow price is the premium value above the existing unit value for the
resource, since the cost of the resource is included in the calculation of the objective function
coefficient.
Page 16 of 31
Obj Fun.
E
D
B A
Note: Remember the row and column operations are performed using the simple concept of Gauss-
Jordan principle. Let us again refer back to the simple diagram (Figure 14.11) which shows how the
we have already discussed before, though we may have done that very briefly.
Page 17 of 31
Obj Fun. D
B
A
Figure 14.11: Pictorial representation of simplex methodology search for the optimal solution
Example # 14.4
Mayank Singh who is a DJ and the group leader of Halla Gulla music club is very health conscious
about himself and his group members. Remember it is a large music group with many members and
all the group members follow a strict diet regime. They are only allowed to take special variety of
mixed salad and a specially prepared paneer kofta as advised by their nutritionist Arjun Ravindra
Khular. They use at least 800 kgs of this combined special food daily. Yes we do agree the amount is
huge but remember the group members like to eat. The nutrient contents and the costs are given below
in the chart.
Kg per kg of food
Type of food Protein Fibre Cost (Rs.)
Mixed salad 0.09 0.02 0.30
Paneer kofta 0.60 0.06 0.90
The dietary requirement of this special type of food entails an intake of at least 30% protein and at
most 5% fibre. Solve the problem and help Arjun (who has no clue of how to solve an optimization
problem) such that the aim to minimize the total cost is met.
Page 18 of 31
s.t.: + (14.2b)
. + . . ( + ) (14.2c1)
. . (14.2c2)
. + . . ( + ) (14.2d1)
. . (14.2d2)
, (14.2e1, 14.2e2)
(Eqn: 14.2e1)
(Eqn: 14.2d)
2
(Eqn: 14.2a)
A
(Eqn: 14.2c)
B (Eqn: 14.2b)
Eqn: 14.2e2)
0,0 1
Example # 14.5
Sumit Kumar is a high profile person who has just become the CEO of Ghotala Bank Inc. in India,
after completing his MBA from Roopnagar University with flying colours. He is in the process of
devising a loan policy for his bank and the amount involves a maximum of Rs.120 crores. The
following table provides the pertinent data about the available types of loans.
Type of Loan Interest Rate Bad Debt Ratio
Personal 0.140 0.10
Car 0.130 0.07
Home 0.120 0.03
Page 19 of 31
Farm 0.125 0.05
Commercial 0.100 0.02
Note
Bad debts are unrecoverable and produce no interest revenue.
Competition with other banks requires that Ghotala Bank Inc. allocates at least 40% of the
To assist housing industry in the country home loans must equal at least 50% of the personal,
The bank also has a stated policy of not allowing the overall ratio of bad debts on all loans to
exceed 4%.
4 + 5 0.4(1 + 2 + 3 + 4 + 5 ) (14.3b1)
0.41 + 0.42 + 0.43 0.64 0.65 0 (14.3b2)
3 0.5(1 + 2 + 3 ) (14.3c1)
0.51 + 0.52 0.53 0 (14.3c2)
Page 20 of 31
0.11 + 0.072 + 0.033 + 0.054 + 0.025 0.4(1 + 2 + 3 + 4 + 5 ) (14.3d1)
0.061 + 0.032 0.013 + 0.014 + 0.025 0 (14.3d2)
1 , 2 , 3 , 4 , 5 0 (14.3e)
Example # 14.6
Harpreet Singh & Associates produces both interior and exterior paints from two raw materials M1
and M2. The following table provides the basic data for the problem.
Raw Material Tons of raw material per ton of Maximum daily
Exterior Paint Interior Paint availability (tons)
M1 6 4 24
M2 1 2 6
Profit per ton ( 1000) 5 4
A marketing survey has revealed that the daily demand for interior paint cannot exceed that of
exterior paint by more than 1 ton, also the maximum daily demand of interior paint is 2 tons. Help
Harpreet Singh & Associates to solve this optimization problem using simple method (tableau based
solution only).
The starting tableau is as give
Step # 1
Basic z x1 x2 s1 s2 s3 s4 Solution
Z 1 -5 -4 0 0 0 0 0
s1 0 6 4 1 0 0 0 24
s2 0 1 2 0 1 0 0 6
s3 0 -1 1 0 0 1 0 1
s4 0 0 1 0 0 0 1 2
Thus the calculations yields
2 1 2 5
(1, 5, 4,0,0,0,0,0) (5) 0,1, , , 0,0,0,4 = 1,0, , , 0,0,0,20
3 6 3 6
1 2 1
(0,6,4,1,0,0,0,24) = 0,1, , , 0,0,0,4
6 3 6
2 1 4 1
(0,1,2,0,1,0,0,6) 1 0,1, , , 0,0,0,4 = 0,0, , , 1,0,0,2
3 6 3 6
2 1 5 1
(0, 1,1,0,0,1,0,1) (1) 0,1, , , 0,0,0,4 = 0,0, , , 0,1,0,5
3 6 3 6
2 1
(0,0,1,0,0,0,1,2) (0) 0,1, , , 0,0,0,4 = (0,0,1,0,0,0,1,2)
3 6
These calculations would be used for the 2nd tableau which is given below
Step # 2
Basic z x1 x2 s1 s2 s3 s4 Solution
Page 21 of 31
z 1 0 -2/3 5/6 0 0 0 20
x1 0 1 2/3 1/6 0 0 0 4
s2 0 0 4/3 -1/6 1 0 0 2
s3 0 0 5/3 1/6 0 1 0 5
s4 0 0 1 0 0 0 1 2
Thus the calculations yields
2 5 2 1 3 3 3 1
1,0, , , 0,0,0,20 0,0,1, , , 0,0, = 1,0,0, , , 0,0,21
3 6 3 8 4 2 4 2
2 1 2 1 3 3 1 1
0,1, , , 0,0,0,4 0,0,1, , , 0,0, = 0,1,0, , , 0,0,
3 6 3 8 4 2 4 2
4 1 3 1 3 3
0,0, 3 , 6 , 1,0,0,2 4 = 0,0,1, 8 , 4 , 0,0, 2
5 1 5 1 3 3 3 5 5
0,0, , , 0,1,0,5 0,0,1, , , 0,0, = 0,0,0, , , 1,0
3 6 3 8 4 2 8 4 2
1 3 3 1 3 1
(0,0,1,0,0,0,1,2) (1) 0,0,1, , , 0,0, = 0,0,0, , , 0,1,
8 4 2 8 4 2
These would be used for the 3rd tableau which is given below
Step # 3
Basic z x1 x2 s1 s2 s3 s4 Solution
z 1 0 0 0 0 21
x1 0 1 1 - 0 0 3
x2 0 0 1 -1/8 0 0 3/2
s3 0 0 0 3/8 -5/4 1 0 5/2
s4 0 0 0 1/8 -3/4 0 1
Page 22 of 31
Example # 14.7
Ankita Hemant Sahare Industries, a nationally known manufacturer of clothing, produces four
varieties of ties. One is an expensive, all-silk tie, one is an all-polyester tie, and two are blends of
polyester and cotton. The following table illustrates the cost and availability (per monthly production
planning period) of the three materials used in the production process:
Material Cost/meter (XYZ units) Material Available/Monthly (meters)
Silk 21 800
Polyester 6 3,000
Cotton 9 1,600
The firm has some fixed contracts with several major department store chains to supply ties. The
contracts require that Ankita Hemant Sahare Industries supply a minimum quality of each tie but
allow for a larger demand if Ankita Hemant Sahare Industries chooses to meet that demand, subject to
a condition that it should not exceed the maximum requirement. The following table summarizes the
contract demand for each of the four styles of ties, the selling price per tie, and the fabric requirements
of each variety.
Variety of Tie S.P. per tie Monthly Monthly Material Type of
(XYZ units) contract contract requirement Material
(Minimum) (Maximum) per tie requirement
All Silk 6.70 6,000 7,000 0.125 100% silk
All polyester 3.55 10,000 14,000 0.080 100% ploy
Poly cotton 4.31 13,000 16,000 0.100 50% poly and
Blend 1 50% cotton
Poly cotton 4.81 6,000 8,500 0.100 30% poly and
Blend 2 70% cotton
Formulate the optimization problem for Ankita Hemant Sahare Industries.
Page 23 of 31
For all polyester ties (x2), each requires 0.080 yard of polyester, at a cost of 6/yard. Therefore,
the cost per tie is 0.48. The selling price per polyester tie is 3.55, leaving a net profit of (3.55-
0.48)=3.07 per unit of x2.
For all blend 1 poly cotton ties (x3), each requires 0.050 yard of polyester, at a cost of 6/yard
and 0.050 yard of cotton, at a cost of 9/yard. Therefore, the cost per tie is 0.75. The selling price
per polyester tie is 4.31, leaving a net profit of (4.31-0.75)=3.56 per unit of x3.
For all blend 2 poly cotton ties (x4), each requires 0.030 yard of polyester, at a cost of 6/yard
and 0.070 yard of cotton, at a cost of 9/yard. Therefore, the cost per tie is 0.81. The selling price
per polyester tie is 4.81, leaving a net profit of (4.81-0.81)=4.00 per unit of x4.
Example # 14.8
A soap manufacturing company produces a particular brand of soap from four (4) chemicals, namely
A1, A2, A3 and A4. The three (3) ingredients in the soap are B1, B2 and B3. On any one day the
company must produce 1000 kgs of that particular brand of soap and it is know that by weight (i) at
least 10% of the soap must be B1, (ii) at least 5% of the soap must be B2 and (iii) at least 4% of the
soap must be B3. The cost structure for manufacturing per kg of the soap as well as the amount of
each ingredients is as follows
If is it necessary that at least 125 kgs of chemical A3 be used, then formulate the problem as a LP
problem, where the aim is to find the cheapest way of producing the soap in a single day? Does the
Page 24 of 31
problem change if we have to find the cheapest way of manufacturing the soap in a month, if in a
month the number of working days in the shop floor is 30? For solving part two of the problem do
you need to make some assumptions, then, state them clearly.
Example # 14.9
Koshagar bank is planning to invest its total assets and deposits (that its customers have deposited
with the bank) which amounts to INR 50 crores in different investments (such as personal loans,
vehicle loans, house loans, etc.) as well adhere to the Reserve Bank of Indian (RBI) rules/regulations
and policies, as applicable. The table provides the type of loan it is planning to invest in or has to
invest as per RBI regulations, and also the percentage the bank has to disburse in order to meet the
criteria
One should remember that bad debts cannot be recovered and earn no interest rates. There is
competition in the commercial/farm sector from other banks, hence the bank decides that it has to
invest at least 30% of its total assets plus deposits in commercial/farm loans. Home loans are the new
thrust area for the bank, hence Koshagar has decided that home loans must be 45% of all the
combined loans disbursed to personal, automobile and home loans combined together. As per the
policy of the bank the difference in the total interest in personal and CRR should be more than INR
5.6 crores. Also the total amount of bad debts cannot exceed 10% of the loan disbursed. Model this
problem so that the bank is able to invest such amounts in the different categories keeping in mind
that it maximizes its profit earned from the interest rates.
Page 25 of 31
Optimal solution
Dual
Optimal solution
Primal
Example # 14.10
Primal Problem Formulation
Maximize 5x1 + 12x2 + 4x3
s.t:
x1 + 2x2 + x3 10
2x1 - x2 + 3x3 = 8
x1, x2, x3 10
Hence we have
Maximize 5x1 + 12x2 + 4x3 + 0x4
s.t:
x1 + 2x2 + x3 + x4 = 10
2x1 - x2 + 3x3 + 0x4 = 8
x1, x2, x3, x4 10
Page 26 of 31
Dual Problem Formulation
Minimize 10y1 + 8y2
s.t:
y1 + 2y2 5
2y1 - y2 12
y1 + 3y2 4
y1 + 0y2 0
y1, y2 are unrestricted
Example # 14.11
Write the dual of Example 14.5
Example # 14.12
Write the dual of Example 14.6
14.6.4 General Primal and Dual Problem and the concepts of Economics
General primal problem General dual problem
n
c x
m
Maximize
j =1
j j Minimize b y
i =1
i i
s.t : s.t :
n m
a x
j =1
ij j bi i = 1,2,, m a ij yi c j j = 1,2,, n
i =1
xj 0 j = 1,2,, n yi 0 i = 1,2,, m
Thus if the primal is the resource allocation of ( = 1,2, . , ) number of resources for ( =
1,2, . , ) number of activities, such that we are interested to find the maximum, then the dual is the reverse
of the primal. Here is the maximum availability of resource.
Thus the dual variable , denotes the worth per unit of resource . Hence the shadow price of
resource replaces the name worth per unit and it signifies the worth of addition or subtracting the
resource per unit. Now in case of the equality constraint (for the constraint) being true in the
primal, would imply that the resource utilization has been done at its best level hence is zero, which
would mean that there are no unused resources for the ith resource. This concept of shadow prices,
dual solution has a huge amount of implication for LP as well as for the case when we know we have
DRTS, CRTS or IRTS and the general solution strategy which we have discussed so far is for the case
Page 27 of 31
of CRTS. Similar concept of dual problems and the concept of shadow prices has also been proved for
the case of NLP.
For network flows we have different algorithm to solve the max flow and min cut problems, but we
will not discuss those due to paucity of time
Page 28 of 31
n
Maximize c x
j =1
j j
s.t :
n
a x
j =1
ij j bi i = 1,2,, m
x j 1,2, j = 1,2,, n
Step # 3: Starting from the continuous optimum point ass the constraints that iterative modify the LP ti ILP
and continue doing this step till all the integer variables have been accounted for.
Step # 1: Obtain an optimal solution to the given LP ignoring the restriction of integers.
Step # 2: Test the integrability of the optimum solution obtained in step # 1 and there can be two cases of the
same.
(a) If the solutions are integers, then the current solution is the optimal one
(b) If the solutions are not all integers, then go to step # 3
Step # 3: Consider the objective function as upper bound and obtain the lower bound by rounding off to
integers the decision variables
Step # 4: Let the optimum value xj*, i.e., the decision variables, be not an integer, then sub-divide the LP into
two classes, one with LP with the constraint xj* [xj*] (sub-problem # 1) and other LP with the constraint xj*
[xj*] +1 (sub-problem # 2)
Step # 5: Solve both the sub-problems and there can be three cases.
Case # 1: The optimum solutions of both are integers, then choose the one which is more (in case of
maximization)
Page 29 of 31
Case # 2: Optimum solution of one is integer and other is infeasible, then choose the one which is
feasible and integer
Case # 3: Optimum solution of one is integer and other is feasible but non-integer, then repeat steps # 3
to # 4 for the non-integer problem
Step # 7: Choose the one solution for which the optimum value of the objective function is as desired
(maximum for maximization problem while minimum for minimization problem)
We will see one problem solution from the finance perspective and give its solutions only.
14.11 Lagrangian Method (For Solving NLP when the constraints are equality constraints)
Consider you have the following n dimensional problem for xi, i = 1,2, n , such that we have
Maximize f ( x1 , x2 ,, xn )
s.t:
g j ( x1 , x2 ,, xn ) = c j j = 1,2, m
Now consider the Lagrangian multipliers, j, ( j = 1,2, m ) , such that we have the following
Lagrangian given as
L( x1 , x2 ,, xn , 1 , 2 ,, m ) = f ( x1 , x2 ,, xn ) j {g j ( x1 , x2 ,, xn ) c j }
m
j =1
Now if we pay a close attention to the above equation then it becomes obvious that what we are
( )
interested in finding is the set x1* , x2* ,, xn* , 1* , *2 ,, *m which will maximize f ( x1 , x2 ,, xn ) , i.e.,
( )
f x1* , x2* ,, xn* , say f * , such that the following will hold, i.e.,
L
(x1 , x2 ,, xn , 1 , 2 ,, m ) = 0 and i = 1,2, n
xi
L
(x1 , x2 ,, xn , 1 , 2 ,, m ) = 0 j = 1,2, m
j
Page 30 of 31
This is to say we are now solve an unconstrained maximization problem, where the objective function
is L( x1 , x2 ,, xn , 1 , 2 ,, m )
s.t :
n
a x
j =1
ij j bi i = 1,2,, m
x j1 1,2, j1 = 1,2,, l
x j2 0 j1 = l + 1, l + 2,, n
s.t :
n
a x
j =1
ij j bi i = 1,2,, m
x j1 1,2, j1 = 1,2,, l
x j2 0 j1 = l + 1, l + 2,, n
Page 31 of 31