Student Guide 3
Student Guide 3
LECTURE 3
Linear Programming
1
Linear Programming
Linear programming is a mathematical optimization technique that helps find the best possible
solution to a problem with linear constraints. It is widely used in various fields, including operations
research, economics, engineering, and management.
In simple terms, linear programming involves maximizing or minimizing a linear objective function
while satisfying a set of linear constraints. The objective function represents the goal or objective to
be achieved, such as maximizing profits or minimizing costs, while the constraints represent the
limitations or restrictions on the variables involved.
The variables in linear programming are typically real numbers representing quantities or decisions
to be made. The objective function and constraints are expressed as linear equations or inequalities
involving these variables. The goal is to find the values of the variables that optimize the objective
function while satisfying all the constraints.
Step 2: Identify the constraints on the decision variables and express them as linear equations
/inequations. This will set up our region in the n-dimensional space within which the objective
function needs to be optimized. Don’t forget to impose the condition of non-negativity on the
decision variables, i.e. all of them must be positive since the problem might represent a physical
scenario, and such variables can’t be negative.
Step 3: Express the objective function as a linear equation in the decision variables.
§ Linearity: The objective function and constraints are linear, which involve only simple
mathematical operations such as addition, subtraction, and multiplication by a constant.
§ Additivity: The objective function is the sum of the individual contributions of the variables, and
the constraints represent the combined restrictions on the variables.
§ Certainty: Linear programming assumes that all the parameters in the model, such as
coefficients and constraints, are known with certainty and do not vary.
2
The solution to a linear programming problem is typically a set of values for the variables that
optimize the objective function while satisfying all the constraints. These values provide insights
into the best decisions or allocations that can be made to achieve the desired objective.
§ Additivity: The value of the objective function and the total amount of each resource used (or
supplied) must be equal to the sum of the decision variables' respective individual
contributions (profit or cost).
For example, the total profit earned from the sale of two products, A and B, must be equal to
the sum of the profits earned separately from A and B. Similarly, the amount of a resource
consumed for producing A and B must be equal to the total sum of resources used for A and
B individually.
§ Linearity (or proportionality): The amount of each resource used (or supplied), and its
contribution to the profit (or cost) in objective function must be proportional to the value of
each decision variable.
For example, if producing one product unit uses 5 hours of a particular resource, then making
3 units of that product uses 3×5 = 15 hours of that resource.
§ Divisibility (or continuity): The solution values of decision variables are allowed to assume
continuous values.
For instance, it is possible to collect 6.254 thousand litres of milk from a milk dairy, and such
variables are divisible. But, it is not desirable to produce 2.5 machines, and such variables are
not divisible and, therefore, must be assigned integer values. Hence, the LP model is no
longer applicable if any variables can assume only integer values or are limited to a discrete
number of values.
1. Resource Allocation: Linear programming is widely used for optimizing resource allocation
problems. It helps organizations efficiently allocate limited resources such as labour,
materials, and machinery.
3
For example, it can be used to determine the optimal production quantities of different
products to maximize profit while considering resource constraints.
7. Energy and Utility Management: Linear programming is employed in energy and utility
management to optimize resource allocation and decision-making. It helps determine the
optimal generation schedules, fuel allocations, and distribution plans to minimize costs,
maximize efficiency, and meet energy demand while considering various operational and
environmental constraints.
4
Examples of LP Model Formulation
Question 1: A company has two plants, each producing and supplying two products, A and B. The
plants can each work up to 16 hours a day.
In plant 1, it takes three hours to prepare and pack 1,000 gallons of A and one hour to prepare
and pack one quintal of B. In plant 2, it takes two hours to prepare and pack 1,000 gallons of A
and 1.5 hours to prepare and pack a quintal of B.
In plant 1, it costs ₹15,000 to prepare and pack 1,000 gallons of A and ₹28,000 to prepare and
pack a quintal of B, whereas, in plant 2, these costs are ₹18,000 and ₹26,000, respectively. The
company is obliged to produce daily at least 10,000 gallons of A and 8 quintals of B.
Formulate this problem as an LP model to determine how the company should organize its
production so that the required amounts of the two products are obtained at the minimum cost.
Solution:
A B
Decision variables
5
Question 2: An electronic company produces three types of parts for automatic washing
machines. It purchases casting of the parts from a local foundry and then finishes the part on
drilling, shaping and polishing machines.
The selling prices of parts A, B and C are ₹8, ₹10 and ₹14, respectively. All parts made can be
sold. Castings for parts A, B and C cost ₹5, ₹6 and ₹10. The shop possesses only one of each type
of casting machine.
Costs per hour to run each of the three machines are ₹20 for drilling, ₹30 for shaping and ₹30 for
polishing. The capacities (parts per hour) for each part on each machine are shown in the table:
A B C
Drilling 25 40 25
Shaping 25 20 30
Polishing 40 30 40
The management of the shop wants to know how many parts of each type it should produce per
hour to maximize profit for an hour’s run. Formulate this problem as an LP model to maximize
total profit to the company
Solution:
Let x1, x2 and x3 = numbers of type A, B and C parts to be produced per hour, respectively. Since
25 type A parts per hour can be run on the drilling machine for ₹20, then ₹20/25 = Re 0.80 is the
drilling cost per type A part.
6
On the drilling machine, one type A part consumes 1/25th of the available hour, a type B part
consumes 1/40th, and a type C part consumes 1/25th of an hour. Thus, the drilling machine
constraint is
The LP Model
Question 3: A businessman is opening a new restaurant and has budgeted ₹8,00,000 for
advertisement, for the coming month. He is considering four types of advertising:
1. 30-second television commercials,
2. 30-second radio commercials,
3. Half-page advertisement in a newspaper
4. Full-page advertisement in a weekly magazine which will appear four times during the coming
month.
The owner wishes to reach families (a) with income over ₹50,000 and (b) with income under
₹50,000. The amount of exposure of each media to families of type (a) and (b) and the cost of each
media is shown below:
7
Media Cost of Advertisement ₹ Exposure to families with Exposure to Families
50,000 (a) annual income over ₹ with annual income
50,000 (b) under
To have a balanced campaign, the owner has determined the following four restrictions:
1. There should be no more than four television advertisements
2. There should be no more than four advertisements in the magazine
3. There should not be more than 60 per cent of all advertisements in newspapers and magazines
put together
4. There must be at least 45,00,000 exposures to families with an annual income of over ₹50,000.
Formulate this problem as an LP model to determine the number of each type of advertisement to be
given to maximize the total number of exposures.
Solution
8
Linear Programming: The Graphical Method
For LP problems that have only two variables, it is possible that the entire set of feasible
solutions can be displayed graphically by plotting linear constraints on a graph paper to locate
the best (optimal) solution. The graphic solution method for an LP problem with two variables is
used to identify the optimal solution.
Important Definitions
1. Solution: The set of values of decision variables xj( j = 1, 2, . . ., n) that satisfies the constraints of
an LP problem is said to constitute the solution to that LP problem.
2. Feasible solution The set of values of decision variables xj( j = 1, 2, . . ., n) that satisfies all the
constraints and non-negativity conditions of an LP problem simultaneously is said to constitute
the feasible solution to that LP problem.
3. Infeasible solution The set of values of decision variables xj ( j = 1, 2, . . ., n) that do not satisfy all
the constraints and non-negativity conditions of an LP problem simultaneously is said to
constitute the infeasible solution to that LP problem.
5. Basic feasible solution A feasible solution to an LP problem which is also the basic solution, is
called the basic feasible solution. That is, all basic variables assume non-negative values. A
basic feasible solution is of two types:
a. Degenerate A basic feasible solution is called degenerate if the value of at least one basic
variable is zero.
b. Non-degenerate A basic feasible solution is called non-degenerate if the value of all m
basic variables is non-zero and positive.
6. Optimum basic feasible solution A basic feasible solution that optimizes (maximizes or
minimizes) the objective function value of the given LP problem is called an optimum basic
feasible solution.
7. Unbounded solution A solution that can increase or decrease infinitely the value of the
objective function of the LP problem is called an unbounded solution
9
Examples of LP Problem
1. Maximization
Solution:
Let x1 as the horizontal axis and x2 as the
vertical axis.
For example, when x1 = 0, we get 6x2 = 360 or x2 = 60. Similarly, when x2 = 0, 4x1 = 360, x1 = 90.
These two points are connected by a straight line. Any point above the constraint line violates the
inequality condition. But any point below the line does not violate the constraint. Thus, the
inequality and non-negativity condition can only be satisfied by the shaded area (feasible region)
10
Since the optimal value of the objective function occurs at one of the extreme points of the
feasible region, it is necessary to determine their coordinates. The coordinates of extreme points
of the feasible region are O = (0, 0), A = (60, 0), B = (60, 20), C = (30, 40), and D = (0, 40).
Evaluate objective function value at each extreme point of the feasible region
2. Minimization
Question 1: Use the graphical method to solve the following LP problem.
Solution
Plot on a graph each constraint by first
treating it as a linear equation. Then use the
inequality condition of each constraint to mark
the feasible region by the shaded area. This
region is bounded from below by extreme
points A, B, C and D.
11
Extreme Point Coordinates Objective Function Value
(x1, x2) Z=3x1+2x2
The minimum (optimal) value of the objective function Z = 13 occurs at the extreme point C (1, 5).
Hence, the optimal solution to the given LP problem is: x1 = 1, x2 = 5, and Min Z = 13.
3. Mixed Constraints
Question 1: 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 metal X and not more than 35 quintals of metal Y. The firm can purchase the scrap from
two suppliers (A and B) in unlimited quantities. The percentage of X and Y metals in weight in the
scrap supplied by A and B is below.
X 25% 75%
Y 10% 20%
The price of A’s scrap is ₹200 per quintal, and that of B is ₹400 per quintal. The firm wants to
determine the quantities it should buy from the two suppliers to minimise the total cost.
Solution
Let us define the following decision variables: x1 and x2 = quantity (in quintals) of scrap to be
purchased from suppliers A and B, respectively.
12
Plot on a graph each constraint by treating it as a linear equation. Then use the inequality sign of
each constraint to mark the feasible solution space (or region) by the shaded area. The feasible
region is bounded by the corners A, B and C. The coordinates of the extreme points of the feasible
region are A = (100, 100), B = (250, 50), and C = (50, 150). The value of objective function at each of
these extreme points are:
Since minimum (optimal) value of objective function, Z = ₹60,000 occurs at the extreme point A
(100, 100), firms should buy x1 = x2 = 100 quintals of scrap each from suppliers A and B.
References:
§ Hillier, F. S., & Lieberman, G. J. (2013). Introduction to operations research. New York, NY: McGraw-Hill.
§ Winston, W. L. (2014). Operations research: Applications and algorithms. Boston, MA: Cengage Learning.
§ Taha, H. A. (2016). Operations research: An introduction. Upper Saddle River, NJ: Pearson.
13