## Chapter 12 Linear Programming

## LINEAR PROGRAMMING

The mathematical experience of the student is incomplete if he never had the opportunity to solve a problem invented by himself. - G. POLYA

### 12.1 Introduction

In earlier classes, we have discussed systems of linear equations and their applications in day to day problems. In Class XI, we have studied linear inequalities and systems of linear inequalities in two variables and their solutions by graphical method. Many applications in mathematics involve systems of inequalities/equations. In this chapter, we shall apply the systems of linear inequalities/equations to solve some real life problems of the type as given below:

A furniture dealer deals in only two items-tables and chairs. He has Rs 50,000 to invest and has storage space of at most 60 pieces. A table costs Rs 2500 and a chair Rs 500 . He estimates that from the sale of one table, he can make a profit of Rs 250 and that from the sale of one

L. Kantorovich chair a profit of Rs 75 . He wants to know how many tables and chairs he should buy from the available money so as to maximise his total profit, assuming that he can sell all the items which he buys.

Such type of problems which seek to maximise (or, minimise) profit (or, cost) form a general class of problems called optimisation problems. Thus, an optimisation problem may involve finding maximum profit, minimum cost, or minimum use of resources etc.

A special but a very important class of optimisation problems is linear programming problem. The above stated optimisation problem is an **example of** linear programming problem. Linear programming problems are of much interest because of their wide applicability in industry, commerce, management science etc.

In this chapter, we shall study some linear programming problems and their solutions by graphical method only, though there are many other methods also to solve such problems.

### 12.2 Linear Programming Problem and its Mathematical Formulation

We begin our discussion with the above **example of** furniture dealer which will further lead to a mathematical formulation of the problem in two variables. In this example, we observe

(i) The dealer can invest his money in buying tables or chairs or combination thereof. Further he would earn different profits by following different investment strategies.

(ii) There are certain overriding conditions or constraints viz., his investment is limited to a maximum of Rs 50,000 and so is his storage space which is for a maximum of 60 pieces.

Suppose he decides to buy tables only and no chairs, so he can buy $50000 \div 2500$, i.e., 20 tables. His profit in this case will be Rs $(250 \times 20)$, i.e., Rs $\mathbf{5 0 0 0}$.

Suppose he chooses to buy chairs only and no tables. With his capital of Rs 50,000, he can buy $50000 \div 500$, i.e. 100 chairs. But he can store only 60 pieces. Therefore, he is forced to buy only 60 chairs which will give him a total profit of Rs $(60 \times 75)$, i.e., Rs 4500.

There are many other possibilities, for instance, he may choose to buy 10 tables and 50 chairs, as he can store only 60 pieces. Total profit in this case would be Rs $(10 \times 250+50 \times 75)$, i.e., Rs $\mathbf{6 2 5 0}$ and so on.

We, thus, find that the dealer can invest his money in different ways and he would earn different profits by following different investment strategies.

Now the problem is: How should he invest his money in order to get maximum profit? To answer this question, let us try to formulate the problem mathematically.

#### 12.2.1 Mathematical formulation of the problem

Let $x$ be the number of tables and $y$ be the number of chairs that the dealer buys. Obviously, $x$ and $y$ must be non-negative, i.e.,

$ \begin{aligned} & x \geq 0 \\ & y \geq 0 \end{aligned} \text{ (Non-negative constraints) } $

The dealer is constrained by the maximum amount he can invest (Here it is Rs 50,000 ) and by the maximum number of items he can store (Here it is 60).

Stated mathematically,

or

$$ 2500 x+500 y \leq 50000 \text{ (investment constraint) } $$

and

$$ 5 x+y \leq 100 $$

$$ x+y \leq 60(\text{ storage constraint }) $$

The dealer wants to invest in such a way so as to maximise his profit, say, $Z$ which stated as a function of $x$ and $y$ is given by

$Z=250 x+75 y$ (called objective function)

Mathematically, the given problems now reduces to:

Maximise $Z=250 x+75 y$

subject to the constraints:

$$ \begin{aligned} 5 x+y & \leq 100 \\ x+y & \leq 60 \\ x \geq 0, y & \geq 0 \end{aligned} $$

So, we have to maximise the linear function $Z$ subject to certain conditions determined by a set of linear inequalities with variables as non-negative. There are also some other problems where we have to minimise a linear function subject to certain conditions determined by a set of linear inequalities with variables as non-negative. Such problems are called Linear Programming Problems.

Thus, a Linear Programming Problem is one that is concerned with finding the optimal value (maximum or minimum value) of a linear function (called objective function) of several variables (say $x$ and $y$ ), subject to the conditions that the variables are non-negative and satisfy a set of linear inequalities (called linear constraints). The term linear implies that all the mathematical relations used in the problem are linear relations while the term programming refers to the method of determining a particular programme or plan of action.

Before we proceed further, we now formally define some terms (which have been used above) which we shall be using in the linear programming problems:

Objective function Linear function $Z=a x+b y$, where $a, b$ are constants, which has to be maximised or minimized is called a linear objective function.

In the above example, $Z=250 x+75 y$ is a linear objective function. Variables $x$ and $y$ are called decision variables.

Constraints The linear inequalities or equations or restrictions on the variables of a linear programming problem are called constraints. The conditions $x \geq 0, y \geq 0$ are called non-negative restrictions. In the above example, the set of inequalities (1) to (4) are constraints.

Optimisation problem A problem which seeks to maximise or minimise a linear function (say of two variables $x$ and $y$ ) subject to certain constraints as determined by a set of linear inequalities is called an optimisation problem. Linear programming problems are special type of optimisation problems. The above problem of investing a
given sum by the dealer in purchasing chairs and tables is an **example of** an optimisation problem as well as of a linear programming problem.

We will now discuss how to find solutions to a linear programming problem. In this chapter, we will be concerned only with the graphical method.

#### 12.2.2 Graphical method of solving linear programming problems

In Class XI, we have learnt how to graph a system of linear inequalities involving two variables $x$ and $y$ and to find its solutions graphically. Let us refer to the problem of investment in tables and chairs discussed in Section 12.2. We will now solve this problem graphically. Let us graph the constraints stated as linear inequalities:

$$ \begin{aligned} 5 x+y & \leq 100 \\ x+y & \leq 60 \\ x & \geq 0 \\ y & \geq 0 \end{aligned} $$

The graph of this system (shaded region) consists of the points common to all half planes determined by the inequalities (1) to (4) (Fig 12.1). Each point in this region represents a feasible choice open to the dealer for investing in tables and chairs. The region, therefore, is called the feasible region for the problem. Every point of this region is called a feasible solution to the problem. Thus, we have,

Feasible region The common region determined by all the constraints including non-negative constraints $x, y \geq 0$ of a linear programming problem is called the feasible region (or solution region) for the problem. In Fig 12.1, the region OABC (shaded) is the feasible region for the problem. The region other than feasible region is called an infeasible region.

Feasible solutions Points within and on the boundary of the feasible region represent feasible solutions of the constraints. In Fig 12.1, every point within and on the boundary of the feasible region $OABC$ represents feasible solution to the problem. For example, the point $(10,50)$ is a feasible solution of the problem and so are the points $(0,60),(20,0)$ etc.

Any point outside the feasible region is called an infeasible solution. For example, the point $(25,40)$ is an infeasible solution of the problem.

Fig 12.1

Optimal (feasible) solution: Any point in the feasible region that gives the optimal value (maximum or minimum) of the objective function is called an optimal solution.

Now, we see that every point in the feasible region $OABC$ satisfies all the constraints as given in (1) to (4), and since there are infinitely many points, it is not evident how we should go about finding a point that gives a maximum value of the objective function $Z=250 x+75 y$. To handle this situation, we use the following theorems which are fundamental in solving linear programming problems. The proofs of these theorems are beyond the scope of the book.

Theorem 1 Let $R$ be the feasible region (convex polygon) for a linear programming problem and let $Z=a x+b y$ be the objective function. When $Z$ has an optimal value (maximum or minimum), where the variables $x$ and $y$ are subject to constraints described by linear inequalities, this optimal value must occur at a corner point* (vertex) of the feasible region.

Theorem 2 Let $R$ be the feasible region for a linear programming problem, and let $Z=a x+b y$ be the objective function. If $R$ is bounded**, then the objective function $Z$ has both a maximum and a minimum value on $R$ and each of these occurs at a corner point (vertex) of R.

Remark If $R$ is unbounded, then a maximum or a minimum value of the objective function may not exist. However, if it exists, it must occur at a corner point of R. (By Theorem 1).

In the above example, the corner points (vertices) of the bounded (feasible) region are: $O, A, B$ and $C$ and it is easy to find their coordinates as $(0,0),(20,0),(10,50)$ and $(0,60)$ respectively. Let us now compute the values of $Z$ at these points.

We have

Vertex of the Feasible region | Correasponding calue of Z (in Rs) |
---|---|

O(0,0) | 0 |

C(0,60) | 4500 |

B(10,50) | $ \mathbf{6 2 5 0} $ |

A(20,0) | 5000 |

- A corner point of a feasible region is a point in the region which is the intersection of two boundary lines.

** A feasible region of a system of linear inequalities is said to be bounded if it can be enclosed within a circle. Otherwise, it is called unbounded. Unbounded means that the feasible region does extend indefinitely in any direction.

We observe that the maximum profit to the dealer results from the investment strategy $(10,50)$, i.e. buying 10 tables and 50 chairs.

This method of solving linear programming problem is referred as Corner Point Method. The method comprises of the following steps:

**1.** Find the feasible region of the linear programming problem and determine its corner points (vertices) either by inspection or by solving the two equations of the lines intersecting at that point.

**2.** Evaluate the objective function $Z=a x+b y$ at each corner point. Let $\mathbf{M}$ and $m$, respectively denote the largest and smallest values of these points.

**3.** (i) When the feasible region is bounded, $M$ and $m$ are the maximum and minimum values of $Z$.

(ii) In case, the feasible region is unbounded, we have:

**4.** (a) $M$ is the maximum value of $Z$, if the open half plane determined by $a x+b y>M$ has no point in common with the feasible region. Otherwise, $Z$ has no maximum value.

(b) Similarly, $m$ is the minimum value of $Z$, if the open half plane determined by $a x+b y<m$ has no point in common with the feasible region. Otherwise, $Z$ has no minimum value.

We will now illustrate these steps of Corner Point Method by considering some examples:

**Remark** Observe that in the above example, the problem has multiple optimal solutions at the corner points $C$ and $D$, i.e. the both points produce same maximum value 180 . In such cases, you can see that every point on the line segment CD joining the two corner points $C$ and $D$ also give the same maximum value. Same is also true in the case if the two points produce same minimum value.

### Summary

A linear programming problem is one that is concerned with finding the optimal value (maximum or minimum) of a linear function of several variables (called objective function) subject to the conditions that the variables are non-negative and satisfy a set of linear inequalities (called linear constraints). Variables are sometimes called decision variables and are non-negative.

### Historical Note

In the World War II, when the war operations had to be planned to economise expenditure, maximise damage to the enemy, linear programming problems came to the forefront.

The first problem in linear programming was formulated in 1941 by the Russian mathematician, L. Kantorovich and the American economist, F. L. Hitchcock, both of whom worked at it independently of each other. This was the well known transportation problem. In 1945, an English economist, G.Stigler, described yet another linear programming problem - that of determining an optimal diet.

In 1947, the American economist, G. B. Dantzig suggested an efficient method known as the simplex method which is an iterative procedure to solve any linear programming problem in a finite number of steps.

L. Katorovich and American mathematical economist, T. C. Koopmans were awarded the nobel prize in the year 1975 in economics for their pioneering work in linear programming. With the advent of computers and the necessary softwares, it has become possible to apply linear programming model to increasingly complex problems in many areas.