Docsity

Linear Programming and the Simplex Algorithm: A Comprehensive Guide, Study notes of Linear Programming

Toggle sidebar
bg1
THE SIMPLEX ALGORITHM.
LECTURE FOUR
LECTURE OBJECTIVES
At the end of the lecture, the student should :
๏‚ท Be able to solve a Linear Programming Problem using the Simplex Algorithm.
๏‚ท Interpret the optimal solution of a Linear programming Problem.
๏‚ท Understand the concept of Duality.
๏‚ท Formulate and solve a Dual problem.
INTRODUCTION
Algorithm is a set of rules or a systematic procedure for finding the solution to a problem.
A simplex algorithm is the method for determining the basic feasible solutions to a system of
solutions and testing the solutions for optimality.
The algorithm moves from one basic feasible solution to another, always improving upon the
previous solution until the optimal solution is achieved.
NUMERICAL EXAMPLE
๐‘€๐‘Ž๐‘ฅ=5๐‘ฅ1+3๐‘ฅ2
๐‘ .๐‘ก
6๐‘ฅ1+2๐‘ฅ2 โ‰ค 36
5๐‘ฅ1+5๐‘ฅ2โ‰ค40
2๐‘ฅ1+4๐‘ฅ2 โ‰ค 28
๐‘‹1 , ๐‘‹2 โ‰ฅ 0
The simplex process involves the following steps.
a) Rewrite the objective function in an implicit manner.
b) Convert the constraints into equations by adding slack(surpluses) variables
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Linear Programming and the Simplex Algorithm: A Comprehensive Guide and more Study notes Linear Programming in PDF only on Docsity!

THE SIMPLEX ALGORITHM.

LECTURE FOUR

LECTURE OBJECTIVES

At the end of the lecture, the student should :

๏‚ท Be able to solve a Linear Programming Problem using the Simplex Algorithm.

๏‚ท Interpret the optimal solution of a Linear programming Problem.

๏‚ท Understand the concept of Duality.

๏‚ท Formulate and solve a Dual problem.

INTRODUCTION

Algorithm is a set of rules or a systematic procedure for finding the solution to a problem.

A simplex algorithm is the method for determining the basic feasible solutions to a system of solutions and testing the solutions for optimality.

The algorithm moves from one basic feasible solution to another, always improving upon the previous solution until the optimal solution is achieved.

NUMERICAL EXAMPLE

๐‘€๐‘Ž๐‘ฅ = 5๐‘ฅ 1 + 3๐‘ฅ 2

๐‘ . ๐‘ก

6๐‘ฅ 1 + 2๐‘ฅ 2 โ‰ค 36

5๐‘ฅ 1 + 5๐‘ฅ 2 โ‰ค 40

2๐‘ฅ 1 + 4๐‘ฅ 2 โ‰ค 28

๐‘‹1 , ๐‘‹2 โ‰ฅ 0

The simplex process involves the following steps.

a) Rewrite the objective function in an implicit manner. b) Convert the constraints into equations by adding slack(surpluses) variables

Set up the initial simplex table which contains the coefficients of the constraints and a column vector of constraints all set above a row of indicators which comprises of the coefficients of the transformed objective function and a zero coefficient for each slack variable. The constant column entry in the row is zero corresponding to the value of the objective function at the origin.

Basis X 1 X 2 S 1 S 2 S 3 Constants

S 1 6 2 1 0 0 36

S 2 5 5 0 1 0 40

S 3 2 4 0 0 1 28

ฯ€ -5 -3 0 0 0 0

I. Every simplex table has an identity matrix from where a basic feasible solution is obtained.

The row of indicators will always indicate whether the solution is optimal or not. For a maximization problem, optimality is achieved when all elements in the row of indicators turn zero or positive.

II. The Basis column will indicate which variables are in the current solution. The solution is taken by the variables under the identity matrix. Any variable that is not under the identity matrix has a current value of 0.

Basis X 1 X 2 S 1 S 2 S 3 Constants

S 1 6 2 1 0 0 36

S 2 5 5 0 1 0 40

S 3 2 4 0 0 1 28

ฯ€ -5 -3 0 0 0 0

The initial basic feasible solution is X 1 = 0 , X 2 = 0, S 1 = 36, S2= 40 , S 3 =

BASIS X1 X2 S1 S2 S3 CONSTANTS

X1 1 1/3^ 1/6^0 0

S 2 0 10/3 -5/6 1 0 10

S 3 0 10/3 -1/3 0 1 16

The solution at this stage is

X 1 = 6, X 2 =0, S 2 =10, S 3 =16, ฯ€ =

Since -4/3 appears in the row of indicators under X 2 , the solution is not yet optional. Since there is no other variable with a negative element in the row of indicator, X 2 is the only incoming variable.

The column under X 2 is now the pivot column.

Finding the displacement ratios and that becomes Row2 with the smallest ratio and hence the pivot row. S 2 therefore becomes the outgoing variable.

BASIS X1 X2 S1 S2 S3 CONSTANTS

X1 1 1/3^ 1/6^0 0

S 2 0 10/3 -5/6 1 0 10

S 3 0 10/3 -1/3 0 1 16

ฯ€ 0 -4/3 5/6 0 0 30

BASIS X1 X2 S1 S2 S3 CONSTANTS

X 1 1 1/3 1/6 0 0 6

X 2 0 1 -1/4 3/10 0 3

S 3 0 10/3 -1/3 0 1 16

ฯ€ 0 -4/3 5/6 0 0 30

BASIS X1 X2 S1 S2 S3 CONSTANTS

X 1 1 0 1/4 -1/10 0 5

X 2 0 1 -1/4 3/10 0 3

S 3 0 0 ยฝ -10 1 6

ฯ€ 0 0 ยฝ 2/5 0 34

The optimal solution therefore becomes , X 1 =5 , X 2 =3, S 3 =

SHADOW PRICES

As a shadow price the values indicate how much management is willing to pay over and above the normal price for each resource should an extra unit be availed.

For instance management is willing to pay 50cts over and above the normal price of the 2nd resource but nothing extra for the 3rd^ resource.

The values in the main body under the slack variables are referred to as substitution ratios. They indicate the impact on the optimal solution of a change in any one of the resource .E.g. the column under S 1 would measure the impact on the optimal solution of a change in the first resource.

Suppose four extra units of the first resource are availed. What would be the new optimal solution?

Current s1 4 extra ๐œ• New soln

X 1 =5 ยผ 4 1 X 1 =

X 2 =3 -1/4 4 -1 X 2 =

S 3 =6 ยฝ 4 2 S 3 =

ฯ€=34 ยฝ 4 2 ฯ€ =

transposed into a matrix of coefficients in the matrix of the dual problem.

๏‚ท The inequality sign in the primal problem is reversed, i.e. โ‰ค in a primal maximization problem becomes โ‰ฅ in the dual problem.

Note. 1. The non-negativity constraints remain unchanged.

  1. The decision variables will change say from Xi to Zj.

The dual problem therefore becomes, in matrix form:

๐‘€๐‘–๐‘› ๐‘„ = [๐‘ 1 ๐‘ 2 โ€ฆ ๐‘๐‘›] โŒˆ

Example

Let the primal problem be

๐‘€๐‘Ž๐‘ฅ ๐œ‹ = 5๐‘‹ 1 + 3๐‘‹ 2

๐‘ . ๐‘ก

6๐‘‹ 1 + 2๐‘‹ 2 โ‰ค 36

5๐‘‹ 1 + 5๐‘‹ 2 โ‰ค 40

2๐‘‹ 1 + 4๐‘‹ 2 โ‰ค 28

Rewriting into matrix

๐‘š๐‘Ž๐‘ฅ๐œ‹ = โŒŠ5 3โŒ‹ [

]

[

] [

] โ‰ค [

]

The dual will be,

๐‘€๐‘–๐‘› ๐‘„ = [36 40 28] [

]

[^6 5

] [

] โ‰ฅ [^5

]

In the linear form,

min ๐‘„ = 36๐‘ง 1 + 40๐‘ง 2 + 28๐‘ง 3

๐‘ . ๐‘ก

6 ๐‘ง 1 + 5๐‘ง 2 + 2๐‘ง 3 โ‰ฅ 5

2 ๐‘ง 1 + 5๐‘ง 2 + 4๐‘ง 3 โ‰ฅ 5

๐‘ง 1 ๐‘ง 2 ๐‘ง 3 โ‰ฅ 0

SOLUTIONS FOR THE DUAL PROBLEM

Consider the constraints for the primal and the constraints for the dual.

The solution to the dual is dependent on two important theorems. This are,