Linear programing problem

16
Linear Programming Optimization Problem: Problems which seek to maximize or minimize a numerical function of a number of finite variables subject to certain constraints are called optimization problems Programming Problem: Programming problems deal with determining optimal allocations of limited resources to meet given objectives. The constraints or limited resources are given by linear or non-linear inequalities or equations. The given objective may be to maximize or minimize certain function of finite variables. Linear Programming and Linear Programming Problem: Suppose we have given m linear inequalities or equations in n variables and we wish to find non-negative values of these variables which will satisfy the constraints and maximize or minimize some linear functions of these variables (objective functions), then this procedure is known as linear programming and the problem which is described is known as linear programming problem. Mathematically it can be described as, suppose we have m linear inequalities or equations in n unknown variables of the form where for each constraint one and only one of the signs holds. Now we wish to find the non-negative values of , j = 1, 2,………,n. which will satisfy the constraints and maximize of minimize a linear function . Here , and are known constant. Application: (i) Linear programming problem is widely applicable in business and economic activities (ii) It is also applicable in government, military and industrial operations (iii) It is also extensively used in development of planning. Objective Function: In a linear programming problem, a linear function of the variables , j = 1, 2,………,n. which is to be optimized is called objective function. In a objective function no constant term will be appeared. i. e. we cannot write the objective function of the type Page | 1

Transcript of Linear programing problem

Page 1: Linear programing problem

Linear Programming

Optimization Problem: Problems which seek to maximize or minimize a numerical function of a number of finite variables subject to certain constraints are called optimization problemsProgramming Problem: Programming problems deal with determining optimal allocations of limited resources to meet given objectives. The constraints or limited resources are given by linear or non-linear inequalities or equations. The given objective may be to maximize or minimize certain function of finite variables.Linear Programming and Linear Programming Problem: Suppose we have given m linear inequalities or equations in n variables and we wish to find non-negative values of these variables which will satisfy the constraints and maximize or minimize some linear functions of these variables (objective functions), then this procedure is known as linear programming and the problem which is described is known as linear programming problem. Mathematically it can be described as, suppose we have m linear inequalities or equations in n unknown variables of the form

where for each constraint one and only one of the signs

holds. Now we wish to find the non-negative values of , j = 1, 2,………,n.

which will satisfy the constraints and maximize of minimize a linear function

. Here , and are known constant.

Application: (i) Linear programming problem is widely applicable in business and economic activities(ii) It is also applicable in government, military and industrial operations(iii) It is also extensively used in development of planning.

Objective Function: In a linear programming problem, a linear function of

the variables , j = 1, 2,………,n. which is to be optimized is called objective function.

In a objective function no constant term will be appeared. i. e. we cannot write the

objective function of the type

Page | 1

Page 2: Linear programing problem

Example of Linear Programming Problem:Machine Type Products

1 2 3 4Total Time Available Per Week

ABC

1.5 1 2.4 11 5 1 3.51.5 3 3.5 1

200080005000

Unit Profits 5.24 7.30 8.34 4.18

Suppose three types of machines A, B and C turns out four products 1, 2, 3, 4. The above table shows (i) the hours required on each machine type to produce per unit of each product (ii) total available machine hours per week, and (iii) per unit profit on sale of each of the product.Suppose (j = 1, 2, 3, 4) is the no. of units of product j produced per week. So we

have the following linear constraints;

Since the amount of production cannot be negative so, . The weekly

profit is given by . Now we wish to determine the values of

the variables for which (i), (ii), (iii) and (iv) will be satisfied and (v) will be

maximizedFormulation of Linear Programming Problem(i) Transportation Problem:Suppose given amount of uniform product are available at each of a no. of origins say warehouse. We wish to send specified amount of the products to each of a no. of different destinations say retail stores. We are interested in determining the minimum cost-routing from warehouse to the retail stores.Let use definem = no. of warehousesn = no. of retail stores

the amount of product shipped from the ith warehouse to the jth retail store.

Since negative amounts cannot be shipped so we have

= total no. of units of the products available for shipment at the ith (i= 1, 2,………

m)warehouse.

Page | 2

Page 3: Linear programing problem

= the no. of units of the product required at the jth retail store.

Since we cannot supply more than the available amount of the product from ith warehouse to the different retail stores, therefore we have

i= 1, 2,……..,m

We must supply at each retail store with the no. of units desired, therefore; j = 1, 2,………….,n

The total amount received at any retail store is the sum over the amounts received from each warehouse. The needs of the retail stores can be satisfied

Let us define is the per unit cost of shifting from ith warehouse to the jth retial

store, then the total cost of shifting

Now we wish to determine which minimize the cost subject to the

constraints

It is a linear programming problem in mn variables with (m+n) constraints.(2) The Diet ProblemSuppose we have given the nutrient content of a no. of different foods. We have also given the minimum daily requirement for each nutrient and quantities of nutrient contained in one of each food being considered. Since we know the cost per ounce of food, the problem is to determine the diet that satisfy the minimum daily requirement of nutrient and also the minimum cost diet.Let us definem = the no. of nutrientsn = the no. of foods

= the quantity (mg) of ith nutrient per (oz) of the jith food

= the minimum quantity of ith nutrient

= the cost per (oz) of the jth food

Page | 3

Page 4: Linear programing problem

= the quantity of jth food to be purchased

The total amount of ith nutrient contained in all the purchased foods cannot be less than the minimum daily requirementsTherefore we have

The total cost for all purchased foods is given by;

Now our problem is to minimize cost subject to the constraints

and

This is called the linear programming problem.Feasible Solution:

Any set of values of the variables which satisfies the constraints ,

where and are constant is called a solution to the linear programming problem

and any solution which satisfies the non-negative restrictions i. e. is called a

feasible solution.Optimal Feasible SolutionIn a linear programming problem there is an infinite no. of feasible solutions and out of all these solutions we must find one feasible solution which optimize the objective

function is called optimal feasible solution

In other words, any feasible solution which satisfies the following conditions;

(i)

(ii)

Page | 4

Page 5: Linear programing problem

(iii) optimize objective function , is called a optimal feasible solution.

Corner Point Feasible Solution:A feasible solution which does not lie on the line segment, connection any other two feasible solution is called a corner point feasible solution.Properties:(i) If there is a exactly one optimal solution of the linear programming problem, then it is a corner point feasible solution.(ii) If there are more than two optimal solutions of the given problem, then at least two of them are adjacent corner points.(iii) In a linear programming problem there are a finite number of corner points(iv) If a corner point feasible solution is better than its adjacent corner point solution, then it is better than all other feasible solutions.Methods for Solving Linear Programming Problems(1) Graphical Method(2) Algebraic Method(3) Simplex MethodGraphical Method:The graphical method to solve a linear programming problem involves two basic steps(1) At the first step we have to determine the feasible solution space. We represent the values of the variable to the X axis and the their corresponding

values of the variable to the Y axis. Any point lying in the first quadrant satisfies

and . The easiest way of accounting for the remaining constraints for

optimization objective function is to replace inequalities with equations and then plot the resulting straight linesGive an example:Next we consider the effect of the inequality. All the inequality does is to divide the

-plane into two spaces that occur on both sides of the plotted line: one side

satisfies the inequality and the other one dies not. Any point lying on or below the line satisfies the inequality. A procedure to determine the feasible side is to use the origin (0, 0) as a reference point.Step 2: At the second step we have to determine the optimal solution. Problem: Find the non-negative value of the variables

which satisfies the constraints

Page | 5

Page 6: Linear programing problem

And which maximize the objective function

Solution: We introduce an co-ordinate system. Any point lying in the first

quadrant has . Now we show the straight lines and on

the graph. Any point lying on or below the line satisfies the .

Similarly any point lying on or below the line satisfies the constraint

B(0,3) A(1.053, 2.368)

O C (5,0)

So, the region ABOC containing the set of points satisfying both the constraints and the non negativerestriction. So, the points in this region are the feasible solution. Now we wish to find the line with the largest value of which has at least one point in common

with the region of feasible solution. The line is drawn in the graph above. It shows that the value of and at the point A are the required solution.

Here and approximate.

Now from the objective function we get the maximum value of z which is given by

Algebraic Method: In LP problems, generally the constraints are not all equations. Page | 6

Page 7: Linear programing problem

Since equations are easy to handle as compared to inequalities, a simple conversion is needed to make the inequalities into equality. Let us consider first, the constraints having less than or equal signs ( ). Any constraint of this category can be written as

(1)

Let us introduce a new variable which satisfies that where

, to convert the inequalities to the equality such that

(2)

The new variable is the difference between the amount available of resource and

the amount actually used and it is called the slack variables.Next we consider the constraints having signs greater than or equal ( ). A typical inequality in this set can be written as;

(3)

Introducing a new variable , the inequality can be written as equality which is

given by; (4)

Here the variable is called the surplus variable, because it is the difference

between resources used and the minimum amount to be produced is called the surplus.Therefore using algebraic method for solving a linear programming problem, the linear programming problem with original constraints can be transformed into a LP problem with constraints of simultaneously linear equation form by using slack and surplus variableExample: Considering the LP problem

St

Now introducing two new variables , the problem can be written as;

Page | 7

Page 8: Linear programing problem

St:

Here is the slack variable and is the surplus variable.

Effect of Introducing Slack and Surplus VariablesSuppose we have a linear programming problem such that

Optimize (1)

Subject to the condition (2)

Where one and only one of the signs in the bracket hold for each constraintThe problem is converted to another linear programming problem such that

(3)

Subject to the condition (4)

Where and ( j = 1, 2,…….,m) is the jth column of A.

We claim that optimizing (3) subject to (4) with is completely equivalent to

optimizing (1) subject to (2) with

To prove this, we first note that if we have any feasible solution to the original constraints, then our method of introducing slack or surplus variables will yield a set of non-negative slack or surplus variables such that equation (4) is satisfied with all variables non-negative consequently if we have a feasible solution to (4) with all variables non-negative, then its first n components will yield a feasible solution to (2) .Thus there exist one –to-one correspondence between the feasible solutions to the original set of constraints and the feasible solution to the set of simultaneous linear equations. Now if

is a feasible optimal solution to linear programming then the

first n components of that is is an optimal solution by annexing the

Page | 8

Page 9: Linear programing problem

slack and surplus variables to any optimal solution to we obtain an optimal

solution to

Therefore, wet may conclude that if slack and surplus variables having a zero cost are introduced to convert the original set of constraint into a set of simultaneous linear equations, so the resulting problem is equivalent to the original problem. Existence of Extreme Basic Feasible Solution: Reduction of any feasible solution to a basic feasible solutionLet us consider a linear programming problem with m linear equations in n unknowns such that AX = b

Which has at least one basic feasible solution without loss of generality suppose that Rank(A) = m and let be as feasible solution. Further suppose that

and that . And let be the respective columns

of A corresponding to the variables . If are linearly independent

then X is a basic feasible solution. in such case . If p=m from the theory of system of linear equation, the solution is non-degeneracy basic feasible solution.If p<m, the system have a degenerate basic feasible solution with (m-p) of the basic variables are equal to zero.If are dependent then there exist scalars with at least one

positive such that

Considering the following point with

where

If , then , since both and are positive. If , then by the definition of

we have . Thus

FurthermorePage | 9

Page 10: Linear programing problem

. Hence has at most (p-1) positive components.

Also,

Thus we have a constructed feasible solution since , with at most (p-1) positive components. If the columns of A corresponding to these positive components are linearly independent then is basic feasible solution. Otherwise the process is repeated. Eventually a basic feasible solution (BFS) will be obtained. Example: Consider the following inequalities

Find basic solution, BFS and extreme points.Solution. By introducing slack variables , the problem is put into the following

standard format

So, the constraint matrix A is given by;

= , Rank(A) = 2

Therefore, the basic solutions corresponding to finding a basis B. Following are the possible ways of extracting B out of A

(i) , , ,

(ii) , Since |B|=0, it is not possible to find and hence

(iii) ;

Page | 10

Page 11: Linear programing problem

(iv)

(v) ; ;

(vi) ; ;

Hence we have the following five basic solutions

; ; ; ;

Of which except are BFS because it violates non-negativity restrictions. The BFS

belong to a four dimensional space. These basic feasible solutions are projected in the space gives rise to the following four points.

From the graphical representation the extreme points are (0, 0), (0, 3), (3, 3) and (6,0) which are the same as the BFSs. Therefore the extreme points are precisely the BFS. The no. of BFS is 4 less than 6.

The Simplex Method:General Mathematical Formulation for Linear Programming Let us define the objective function which to be optimized

We have to find the values of the decision variables on the basis of the

following m constraints;

and

Page | 11

Page 12: Linear programing problem

The above formulation can be written as the following compact form by using the summation sign;

Optimize (maximize or minimize)

Subject to the conditions;

and

The constants are called the cost coefficients; the constants

are called stipulations and the constants are

called structural coefficients. In matrix notation the above equations can be written as;Optimize z = CXSubject to the conditions

Where

; ; ;

Where, A is called the coefficient matrix, X is called the decision vector, B is called the requirement vector and C is called the cost vector of linear programming problemThe Standard Form of LP ProblemThe use of basic solutions to solve the general LP models requires putting the problem in standard form. The followings are the characteristics of the standard form (i) All the constraints are expressed in the form of equations except the non-negative restrictions on the decision variables which remain inequalities(ii) The right hand side of each constraint equation is non-negative(iii) All the decision variables are non-negative(iv) The objective function may be of the maximization or the minimization typeConversion of Inequalities into Equations:The inequality constraint of the type can be converted to an equation by adding

or subtracting a variable from the left-hand sides of such constraints. These new Page | 12

Page 13: Linear programing problem

variables are called the slack variables or simply slacks. They are added if the constraints are of the types and subtracted if the constraints are of the types. Since in the cases of type the subtracted variables represent the surplus of the left-hand side over right-hand side, it is commonly known as the surplus variables and is in fact a negative slack.For example

Is equivalent to

If

Is equivalent to

The general LP problem that discussed above can be expressed as the following standard form;

Subject to the conditions

And

In the matrix notation, the general LP problem can be written as the following standard form;Optimize z = CXSubject to the conditions

Example: Express the following LP problem in a standard form;Maximize

Subject to the conditions;

Solution: Introducing slack and surplus variables, the problem can be expressed as the standard form and is given below;Maximize

Page | 13

Page 14: Linear programing problem

Subject to the conditions;

Conversion of Unrestricted Variable into Non-negative VariablesAn unrestricted variable can be expressed in terms of two non-negative variables

by using substitution such that ;

For example, if , then . If , then .

The substitution is effected in all constraints and in the objective function. After solving the problem in terms of and , the value of the original variable is then

determined through back substitution.Example: Express the following linear programming problem in the standard form;Maximize,

Subject to

Solution: Here and are restricted to be non-negative while is unrestricted. Let

us express as, where, . Now introducing slack and surplus

variable the problem can be written as the standard form which is given by;Maximize,

Subject to the conditions;

Conversion of Maximization to Minimization:The maximization of a function is equivalent to the minimization of

in the sense that both problems yield the same optimal values of

and

Page | 14