Linear Programming: Finding Basic Feasible Solutions and Entering/Leaving Variables, Lecture notes of Operational Research

The process of finding basic feasible solutions and entering/leaving variables in linear programming problems. It covers the concept of basic and non-basic variables, the use of slack variables, and the gauss jordan elimination method. An example of a linear programming problem and demonstrates how to find the initial basic feasible solution, select the entering variable, and determine the leaving variable.

Typology: Lecture notes

2011/2012

Uploaded on 08/06/2012

anagha
anagha 🇮🇳

4.4

(44)

129 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Maximize Z = 3x + 5y
Subject to the restrictions,
x + S1 = 40 (1)
y + S2 = 30 (2)
x + y + S3 = 60 (3)
and x, y > 0
The above form of representation of a linear programming problem is much more convenient for algebraic
manipulation and for identification of basic feasible solutions.
Referring to the restrictions in the above example, there are five variables x, y, S1, S2, and S3 all of them
being non-negative and their values are to be determined to find an optimal solution. We have only three equations
(1), (2) and (3) involving five variables. We cannot find a solution with the set of three equations in five unknowns.
We must have al least five linearly independent equations to solve for all the five variables so that they will have
unique values. Almost we can solve three variables in terms of the remaining two variables.
In general, if there are m equations in n variables (n > m), a basic solution is obtained by solving m
variables in terms of the remaining variables and letting (n - m) variables equal to zero. This assumes that such a
solution exists and is unique. A basic feasible solution is a basic solution where all m of these variables are non-
negative. A non-degenerate basic solution is a basic solution where these m variables are strictly > 0, (i.e.) positive.
The m variables chosen from among n variables are called as "basic" variables or as the variables in the "basis". The
remaining (n - m) variables are termed as "non-basic" variables and their values are zero.
Now, considering the example above, we can choose any three variables and refer to as the basic variables
and the remaining two as non-basic variables. A question may be asked at this juncture as to which three variables to
choose from the five variables. This leads to a combinatorial problem of selecting any three variables from among
five variables and we have 5 C3 (i.e.) 10 combinations. Ten such combinations can be listed and try with the
objective function with the combination selected and we can choose the optimal solution. All of them will be basic
solutions. But one or more of them may lead to the optimum objective function. But this is an exhaustive
enumeration process, which is time consuming.
In the simplex method, it is customary that we select the slack variables viz. S1, S2 and S3 (in the example
cited) to form the initial basic variables, letting x and y as non-basic variables. We can rewrite the above equation as
S1 = 40 - x
S2 = 30 - y
S3 = 60 - x - y
and the non-basic variables x and y are set equal to zero. Therefore, the initial basic feasible solution is
x = 0
y = 0
S1 = 40
S2 = 30
S3 = 60
and automatically the value of Z = 3x + 5y becomes 0.
Thus we have an initial solution for the linear programming problem with Z = 0. Since the objective
function is 0 the question now are any other solution that will be better than the current one. Thus we are forced to
find the next basic feasible solution, which will give more profit. This requires selection of a new basic variable to
docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Linear Programming: Finding Basic Feasible Solutions and Entering/Leaving Variables and more Lecture notes Operational Research in PDF only on Docsity!

Maximize Z = 3 x + 5 y Subject to the restrictions, x + S 1 = 40 (1) y + S 2 = 30 (2) x + y + S 3 = 60 (3) and x, y > 0

The above form of representation of a linear programming problem is much more convenient for algebraic manipulation and for identification of basic feasible solutions.

Referring to the restrictions in the above example, there are five variables x, y , S 1 , S 2 , and S 3 all of them being non-negative and their values are to be determined to find an optimal solution. We have only three equations (1), (2) and (3) involving five variables. We cannot find a solution with the set of three equations in five unknowns. We must have a l least five linearly independent equations to solve for all the five variables so that they will have unique values. Almost we can solve three variables in terms of the remaining two variables.

In general, if there are m equations in n variables ( n > m ), a basic solution is obtained by solving m variables in terms of the remaining variables and letting ( n - m ) variables equal to zero. This assumes that such a solution exists and is unique. A basic feasible solution is a basic solution where all m of these variables are non- negative. A non-degenerate basic solution is a basic solution where these m variables are strictly > 0, (i.e.) positive. The m variables chosen from among n variables are called as "basic" variables or as the variables in the "basis". The remaining ( n - m ) variables are termed as "non-basic" variables and their values are zero.

Now, considering the example above, we can choose any three variables and refer to as the basic variables and the remaining two as non-basic variables. A question may be asked at this juncture as to which three variables to choose from the five variables. This leads to a combinatorial problem of selecting any three variables from among five variables and we have 5 C 3 (i.e.) 10 combinations. Ten such combinations can be listed and try with the objective function with the combination selected and we can choose the optimal solution. All of them will be basic solutions. But one or more of them may lead to the optimum objective function. But this is an exhaustive enumeration process, which is time consuming.

In the simplex method, it is customary that we select the slack variables viz. S 1 , S 2 and S 3 (in the example cited) to form the initial basic variables, letting x and y as non-basic variables. We can rewrite the above equation as S 1 = 40 - x S 2 = 30 - y S 3 = 60 - x - y and the non-basic variables x and y are set equal to zero. Therefore, the initial basic feasible solution is x = 0 y = 0 S 1 = 40 S 2 = 30 S 3 = 60

and automatically the value of Z = 3 x + 5 y becomes 0.

Thus we have an initial solution for the linear programming problem with Z = 0. Since the objective function is 0 the question now are any other solution that will be better than the current one. Thus we are forced to find the next basic feasible solution, which will give more profit. This requires selection of a new basic variable to

be included and a variable to leave the basis. The new basic variable to be included is called 'the entering variable' and the variable we remove from the basis is called the 'leaving variable'.

How are the leaving variable and entering variable selected?

The entering variable is chosen by examining the objective function to estimate the effect of each alternative. In our example the objective function is to maximize Z = 3 x + 5 y and if the value of any one of the variables x and y is changed from the present value of 0, to a positive, there is an increase in the objective function (as the coefficients of x and y are positive on the right hand side). Therefore either x or y , or, x and y would increase Z by entering into the basis. Now the question is which to select x or y , or both x and y. There are many alternatives. But clearly we see that the objective function will reach a greater value if we choose that variable that has more positive coefficient. In the example we have the coefficient of x as 3 and the coefficient of y as 5. Since x increases Z at the rate of 3 per unit increase in x and y increases Z at the rate of 5 per unit increase in y, y should be the entering variable, even though both are potential entering variables and the objective function is written as

Z - 3 x - 5 y = 0

in which case we have to choose the variable whose coefficient is more negative on the left hand side of equation.

Having decided to choose y to enter the basis, we have to select the variable leaving the basis. As we have only three equations but five unknowns, only three variables can be solved in terms of the other two.

To decide the candidate to be removed from the basis, we choose the variable whose value reaches zero first as the value of the entering variable is increased.

The equations involving the slack variables may be rewritten as

S 1 = 40 – x (1) S 2 = 30 – y (2) S 3 = 60 - x – y (3)

Referring to the above equations, as the value of y is increased, S 1 will never become zero as the first equation does not involve y. This means that S 1 will not leave the basis. The second equation indicates that S 2 will be zero for the value of y = 30 and from the third equation we infer that S 3 will be zero for the value of y = 60. So among the three candidates S 1 , S 2 and S 3 , S 2 will reach zero first as the value of y is increased to 30 from zero. Therefore S 2 is chosen as the leaving variable.

Now, we have to find the values of the remaining basic variables. This is done by the use of the Gauss Jordan method of elimination in which the objective function is expressed only in terms of the non-basic variables.

This requires that each basic variable appears in exactly one equation and that this equation contains no other basic variable. Consider the original set of equations where the basic variables are indicated bold

Now a question may arise whether the above solution constitutes the best or optimal solution. Examining the objective function

Z + 2 S 2 + 3 S 3 = 240,

we observe that the coefficients of the non-basic variables S 2 and S 3 are positive on the left hand side and this is the indication to stop the iteration. Hence we conclude that Z = 240 will be the maximum value of Z and the solution set can be written as

Z* = x = 30 y = 30 S 1 = 40 S 2 = 0 S 3 = 0

PRESENTATION IN TABULAR FORM - (SIMPLEX TABLE)

The relevant information of first example may be presented in a concise form as what we call 'Simplex table' instead of writing down the set of equations in full symbols for the variables in each of the equations. The given linear programming problem is expressed in a standard form including slack variables. Then we write the coefficients of the variables and the right hand side in the table.

The above example is presented in the following tabular form. This is the initial table.

Equation No.

Basic Variable

Coefficient of Z x y S 1 S 2 S 3

RHS Ratio

0 - 1 -3 -5 0 0 0 0 - 1 S 1 0 1 0 1 0 0 40 ∞ 2 S 2 0 0 1 0 1 0 30 30 3 S 3 0 1 1 0 0 1 60 60

Solution:

Z = 0, S 1 = 40, S 2 = 30, S 3 = 60, x = y = 0

The basic procedure when using the simplex table is the same as before. We give below the steps of the simplex method that would be applied to prepare the next table from the initial table.

STEP 1

To select the entering basic variable: Consider the first row corresponding to the equation 0 of the table. If the problem is one to maximize the effectiveness (profit), the variable with the most negative coefficient is selected as the new entering basic variable. The column corresponding to the most negative coefficient -5 is 'y' and the same is marked as a key column indicating that y is the new entering basic variable.

STEP 2

To select the leaving basic variable: Now consider all the rows except the first row. Formulate the ratio in each row by taking right hand side of each row and dividing by the corresponding element of the key column. The ratios in this example are 40/0 = ∞, 30/1 = 30, 60/1 = 60. Select the least non-negative ratio. In this example the minimum non-negative ration corresponds to the row 2 indicating that S 2 is the leaving basic variable and this row containing S 2 as the basic variable is marked as a key row. The element at the intersection of key column and key row is called the key number or pivot number. In this example the key number is 1. If this is not 1, the same can be made 1 by dividing the same row suitably.

STEP 3

Elimination of coefficients in the key column: Gauss Jordan elimination requires that all the elements in the key column except the key row should vanish. Suitably multiplying coefficients of the key row and adding the same to the corresponding coefficients of the other rows achieve this result.

In this example, multiply the key row by 5 and add this resulting row to the row 0. To get rid of the coefficient of y in the second row, next multiply the key row by 0 and add to the row 1 and similarly multiply the key row by -1 and add to the row 3 to eliminate the coefficient of y in the third row. So all the key column elements are thus made 0 in all the rows except the key row. The resulting table is presented. Note that y has entered the basis and S 2 has left. This is the first iteration

Iteration I: y enters the basis and S 2 leaves the basis

Eqn. No.

Basic Variable

Coefficient of Z x y S 1 S 2 S 3

RHS Ratio Solution

0 - 1 -3 0 0 5 0 150 - Z = 1 S 1 0 1 0 1 0 0 40 40 S 1 = 2 y 0 0 1 0 1 0 30 ∞ y = 3 S 3 0 1 0 0 -1 1 30 30 S 3 =

STEP 4

Further improvement of solution: After every iteration, look at the objective function row (row 0). Scan if there is any negative coefficient among variables in this row for a maximization problem. If there is a negative coefficient, this is a clear indication that the problem has not reached the maximum value. Still there is a scope of improving the existing solution. In this example, we have the coefficient of x in the objective function row as -3 (a negative) indicating that x can be selected as the new entering basic variable. Mark this column as key column and another iteration is required. So find the ratio in each of the rows 1, 2 and 3. We have the ratios 40, ∞ and 30 as indicated in the table under the column ratio. Select the row corresponding to least non-negative value (i.e.) 30, (row 3). So S 3 is the leaving variable and this key row is marked and the same procedure of eliminating the coefficients of x in the key column is performed by multiplying the key row by 3, -1 and 0 and adding to the row 0, 1 and 2 respectively. The result is presented in the table below.

STEP 5