Linear Programming
Linear Programming
Applications of linear programming are every where around you. You use linear programming at
personal and professional fronts. You are using linear programming when you are driving from home
to work and want to take the shortest route. Or when you have a project delivery you make strategies
to make your team work efficiently for on time delivery.
Let’s say a FedEx delivery man has 6 packages to deliver in a day. The warehouse is located at point
A. The 6 delivery destinations are given by U, V, W, X, Y and Z. The numbers on the lines indicate
the distance between the cities. To save on fuel and time the delivery person wants to take the shortest
route.
So, the delivery person will calculate different routes for going to all the 6 destinations and then come
up with the shortest route. This technique of choosing the shortest route is called linear programming.
In this case, the objective of the delivery person is to deliver the parcel on time at all 6 destinations.
The process of choosing the best route is called Operation Research. Operation research is an approach
to decision-making, which involves a set of methods to operate a system. In the above example, my
system was the Delivery model.
Linear programming is used for obtaining the most optimal solution for a problem with given
constraints. In linear programming, we formulate our real life problem into a mathematical model. It
involves an objective function, linear inequalities with subject to constraints.
Is the linear representation of the 6 points above representative of real world? Yes and No. It is
oversimplification as the real route would not be a straight line. It would likely have multiple turns, U
turns, signals and traffic jams. But with a simple assumption, we have reduced the complexity of the
problem drastically and are creating a solution which should work in most scenarios.
Formulating a problem – Let’s manufacture some chocolates
Example: Consider a chocolate manufacturing company which produces only two types of chocolate
– A and B. Both the chocolates require Milk and Choco only. To manufacture each unit of A and B,
following quantities are required:
The company kitchen has a total of 5 units of Milk and 12 units of Choco. On each sale, the company
makes a profit of
Now, the company wishes to maximize its profit. How many units of A and B should it produce
respectively?
Solution: The first thing I’m gonna do is represent the problem in a tabular form for better
understanding.
A 1 3 Rs 6
B 1 2 Rs 5
Total 5 12
Let us define some terminologies used in Linear Programming using the above example.
Decision Variables: The decision variables are the variables which will decide my output. They
represent my ultimate solution. To solve any problem, we first need to identify the decision
variables. For the above example, the total number of units for A and B denoted by X & Y
respectively are my decision variables.
Objective Function: It is defined as the objective of making decisions. In the above example,
the company wishes to increase the total profit represented by Z. So, profit is my objective
function.
Constraints: The constraints are the restrictions or limitations on the decision variables. They
usually limit the value of the decision variables. In the above example, the limit on the availability
of resources Milk and Choco are my constraints.
Non-negativity restriction: For all linear programs, the decision variables should always take
non-negative values. Which means the values for decision variables should be greater than or
equal to 0.
Wheat 100 50 10