0% found this document useful (0 votes)
5 views

Topic 2 Linear Programming

The document is a chapter on Linear Programming (LP) from the AST3231 Operations Research course at the University of Rwanda. It covers the definition, standard forms, assumptions, solving methods, and terminology related to LP, along with examples and graphical methods for solving LP models. The chapter aims to provide a comprehensive understanding of LP and its applications in optimizing resource allocation.

Uploaded by

irumvavalent
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Topic 2 Linear Programming

The document is a chapter on Linear Programming (LP) from the AST3231 Operations Research course at the University of Rwanda. It covers the definition, standard forms, assumptions, solving methods, and terminology related to LP, along with examples and graphical methods for solving LP models. The chapter aims to provide a comprehensive understanding of LP and its applications in optimizing resource allocation.

Uploaded by

irumvavalent
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

AST3231 Operations Research

– CHAP 2 –
Linear Programming

School of Economics;
University of Rwanda

Academic Year 2024/25

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 1 / 64
Content

1 What is a Linear Programming (LP)


2 Standard Forms of LP
3 Assumptions of Linear Programming
4 Solving LP Modes
5 Terminology for Solutions of LP Model
6 Formulation of a Linear Problem
7 Graphical Method for Solving LP Models
8 Simplex Method for Solving LP Models
9 Duality Theory
10 Take-Home Task - 2

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 2 / 64
What is a Linear Programming (LP)

LP uses a mathematical model to describe the problem of concern.


Linear: all the mathematical functions in the model have to be linear functions.
Programming: it is a synonym for planning.

LP involves the planning of activities to obtain an optimal result result that


reaches the specified goal which is the best among all feasible alternatives.
The application of LP involves the general problem of allocating limited resources
among competing activities in a best possible (optimal) way.
LP problem involves selecting the level of certain activities that compete for scarce
resources that are necessary to perform those activities.
The choice of activity levels dictates how much of each resource will be used by each
activity.

Example
GABI LTD (Gisagara Agro-Business Industries ltd) produces three products: UNO
fruit juice, BORA fruit juice, and GABI beer/ Urwagwa. Producing these products
requires some quantity of agricultural products (i.e., banana, sorghum), labor, and
number of working hours per week. Given the financial capacity of GABI LTD, the
amount of banana, sorghum, and labor force that GABI can afford is limited. Also the
production is limited to the possible working hours per week. Thus, GABI’s problem is
to find out how resources affordable within its financial capacity can be allocated to
the production of its three products to maximize its Profit.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 3 / 64
Standard Forms of LP Models

A maximization problem is in standard form if:

Maximize z = c1 x1 + c2 x2 + ... + cn xn , Objective function


s.t. a11 x1 + a12 x2 + ... + a1n xn ≤ b1
.. (1)
. Constraints
am1 x1 + am2 x2 + ... + amn xn ≤ bm
xj ≥ 0, ∀j ∈ N. Nonnegativity constraints

A minimization problem is in standard form if:

Minimize w = c1 x1 + c2 x2 + ... + cn xn , Objective function


s.t. a11 x1 + a12 x2 + ... + a1n xn ≥ b1
.. (2)
. Constraints
am1 x1 + am2 x2 + ... + amn xn ≥ bm
xj ≥ 0, ∀j ∈ N. Nonnegativity constraints

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 4 / 64
Assumptions of Linear Programming

1 Proportionality assumption: The contribution of each decision variable to the


value of the objective function Z is proportional to the value of the decision
variable xj , as represented by the cj xj term in the objective function. Similarly,
the contribution of each decision variable to the left-hand side of each functional
constraint is proportional to the value of the activity xj , as represented by the
aij xj term in the constraint.

2 Additivity assumption: Every function in a linear programming model (whether


the objective function or the function on the left-hand side of a functional
constraint) is the sum of the individual contributions of the respective decision
variables.

3 Divisibility assumption: Decision variables in a LP model are allowed to have any


values, including noninteger values, that satisfy the functional and nonnegativity
constraints. Thus, these variables are not restricted to just integer values.

4 Certainty assumption: The value assigned to each parameter of a LP model is


assumed to be a known constant.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 5 / 64
Solving LP Models

1 Graphic Method and Gaussian Elimination: works for small LP models with at
most two decision variables.

2 Fourier-Motzkin Elimination (FME): A simple (but not yet most efficient) process
to solve linear programs.

3 Simplex Method: works for even large LP models with more than two decision
variables.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 6 / 64
Terminology for Solutions of LP Model

In LP, solution is any specification of values for the decision variables solution,
regardless of whether it is a desirable or even an allowable choice.

Different types of solutions in LP;


1 Feasible solution: a solution for which all the constraints are satisfied, where feasible
region is the collection of all feasible solutions;
2 Infeasible solution: a solution for which at least one constraint is violated;
3 Optimal solution: a feasible solution that has the most favorable value of the objective
function, where it is is the largest value if the objective function is to be maximized or
the smallest value if the objective function is to be minimized;
4 Multiple optimal solutions: existence of an infinite number of optimal solutions all
producing the same optimal value of the objective function;
5 No optimal solutions: occurs only if (i) it has no feasible solutions or (ii) is an
unbounded Z or an unbounded objective where the constraints do not prevent
improving the value of the objective function (Z ) indefinitely in the favorable direction
(positive or negative);
6 Corner-point feasible (CPF) solution: also called extreme points or vertices is a solution
that lies at a corner of the feasible region. CPF solution plays a key role when the
simplex method searches for an optimal solution.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 7 / 64
Formulation of a Linear Problem: Example - 1

A manufacturer of computer system components assembles two types of graphics


terminals, model A and model B. The amounts of materials and labor required
for each assembly, and the total amounts available, are shown in the table below.
The profits that can be realized from the sale of each terminal are $22 and $28
for the model A and B, respectively, and we assume there is a market for as many
terminals as can be manufactured.

Resources Required per unit (A) Resources Required per unit (B) Resources Available
Materials 8 10 3400
Labor 2 3 960

The manufacturer would like to determine how many of each model to assemble
in order to maximize profits.
Formulation
Objective criterion: maximize z = 22xA + 28xB
Constraints:
materials 8xA + 10xB <= 3400
Labor 2xA + 3xB <= 960
Finally, as it would be meaningless to have a negative number of terminals
manufactured, we also include the constraints xA >= 0 and xB >= 0

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 8 / 64
Formulation of a Linear Problem: Example - 2

A space agency planning team wishes to set up a schedule for launching satellites
over a period of 3 years. Experimental payloads are of two types (say, Tl and
T2), and each launch carries only one experiment. Externally negotiated agency
policies dictate that at most 88 of payload type Tl and 126 of type T2 can be
supported. For each launch, type Tl payloads will operate successfully with
probability 0.85 and type T2 payloads with probability 0.75. In order for the
program to be viable, there must be a total of at least 60 successful deployments.
The agency is paid $1.5 million for each successful Tl payload, and $1.2 million
for each successful T2 payload. The costs to the agency to prepare and launch
the two types of payloads are $1.05 million for each Tl and $0.7 million for each
T2. One week of time must be devoted to the preparation of each T2 launch
payload and 2 weeks are required for Tl launch payloads. The agency, while
providing a public service, wishes to maximize its expected net income from the
satellite program.
Formulation
The objective is then to maximize z = 0.225x1 + 0.2x2
Problem constraints in this case are of various types. Agency policies impose the
two simple constraints: x1 <= 88 and x2 <= 126
The successful deployment quota yields the constraint 0.85x1 + 0.75x2 >= 60
If we assume that 52 weeks per year (for 3 years) can be applied to the satellite
program, then the launch preparation time constraint is 2x1 + 1x2 <= 156
we include the non-negativity constraints x1 >= 0 and x2 >= 0

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 9 / 64
Formulation of a Linear Problem: Example - 3
A company wishes to minimize its combined costs of production and inventory
over a 4-week time period. An item produced in a given week is available for
consumption during that week, or it may be kept in inventory for use in later
weeks. Initial inventory at the beginning of week 1 is 250 units. The minimum
allowed inventory carried from one week to the next is 50 units. Unit production
cost is $15, and the cost of storing a unit from one week to the next is $3. The
following table shows production capacities and the demands that must be met
during each week.
Production Period Production Capacity Demand
1 800 900
2 700 600
3 600 800
4 800 600

A minimum production of 500 items per week must be maintained. Inventory


costs are not applied to items remaining at the end of the 4th production period,
nor is the minimum inventory restriction applied after this final period.
Formulation
The objective is to minimize z = $15(x1 + x2 + x3 + x4 ) + $3(A1 + A2 + A3 ).
Constraints:
Minimum inventory constraints are expressed as Ai >= 50 for i = 1,2, and 3, and
A4 >= 0.
Production capacities and minima during each period are enforced with the constraints
500 <= x1 <= 800; 500 <= x2 <= 700; 500 <= x3 <= 600; 500 <= x4 <= 800.
Finally, Xi > 0 for i = 1, ..., 4.
AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 10 / 64
Graphic Method for Solving LP Models: Graphic Solution

Maximize z = 3x1 + x2 ,
s.t. x2 ≤ 5
x1 + x2 ≤ 10 (3)
− x1 + x2 ≥ −2
x1 ≥ 0, x2 ≥ 0,

Figure 1: Graphic Solution (The points labeled A, B, C, D, and E are called extreme points of the
feasible region)
AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 11 / 64
Graphic Method for Solving LP Models: Example - 1

Consider the following Linear Programming problem: maximize z = 4x + 5y


subject to:
x + y <= 20
3x + 4y <= 72
x, y >= 0
Generate the graphical solution of this Linear Programming problem with clear
steps on how you obtained extreme points of the feasible region.
Calculate the optimal value (Hint: use Gaussian Elimination Method). Show all
steps clearly.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 12 / 64
Graphic Method for Solving LP Models: Example - 1

Figure 2: Solution for Quiz-1


AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 13 / 64
Graphic Method for Solving LP Models: Example - 2

Consider the following Linear Programming problem: maximize z = 8x1 + 5x2


subject to:
x1 <= 150
x2 <= 250
2x1 + x2 <= 500
x, y >= 0
Generate the graphical solution of this Linear Programming problem with clear
steps on how you obtained extreme points of the feasible region.
Calculate the optimal value (Hint: use Gaussian Elimination Method). Show all
steps clearly.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 14 / 64
Graphic Method for Solving LP Models: Example - 2

Figure 3: Solution forAST3231


Class Exercise
Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 15 / 64
Graphic Method for Solving LP Models: Unbounded Feasible Region

Minimize z = x1 + x2 ,
s.t. 3x1 + x2 ≥ 6
x2 ≥ 3 (4)
x1 ≤ 4
x1 ≥ 0, x2 ≥ 0,

Figure 4: Unbounded feasible region


AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 16 / 64
Graphic Method for Solving LP Models: Multiple Optimal Solutions

Minimize z = x1 + 2x2 ,
s.t. − x1 + x2 ≤ 2
x1 + 2x2 ≤ 8 (5)
x1 ≤ 6
x1 ≥ 0, x2 ≥ 0,

Figure 5: Multiple optimal solutions

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 17 / 64
Graphic Method for Solving LP Models: No Optimal Solution

Minimize z = 3x1 + x2 ,
s.t. x1 + x2 ≥ 4
− x1 + x2 ≤ 4 (6)
− x1 + 2x2 ≥ −4
x1 ≥ 0, x2 ≥ 0,

Figure 6: No optimal solution


AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 18 / 64
Graphic Method for Solving LP Models: No Feasible Solution

Minimize z = 3x1 + x2 ,
s.t. x1 + x2 ≥ 4
− x1 + x2 ≥ 4 (7)
− x1 + 2x2 ≤ −4
x1 ≥ 0, x2 ≥ 0,

Figure 7: No feasible solution


AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 19 / 64
Simplex Method: Preparation

1. Express the linear programming problem in standard form:


Maximize z = c1 x1 + c2 x2 + ... + cn xn ,
s.t. a11 x1 + a12 x2 + ... + a1n xn =b1
.. (8)
.
am1 x1 + am2 x2 + ... + amn xn =bm
xj ≥ 0, ∀j ∈ N.

Decision variables x1 , ..., xn are non-negative;


Constants b1 , ..., bm on the right hand sides (RHS) of the constraints are also
non-negative.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 20 / 64
Simplex Method: Preparation

2. Rewriting the objective function:


If you start with a maximization problem, then there is nothing to change;
If you start with a minimization problem, convert it to a maximization problem by
multiplying the objective function by −1
min f (x) subject to given constraints is equivalent to max −f (x) subject to the
same constraint.
Any solution to the minimization problem is a solution to the maximization
problem and conversely;
The value of the maximization problem is −1 times the value of the minimization
problem.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 21 / 64
Simplex Method: Preparation

3. Rewriting constraints:
Equality constraints require no modification;
Less-than-or-equal-to (<=) inequalities require the introduction of slack variables
to equate the left and right sides of the inequalities,
For example, a constraint such as 3x1 + 4x2 <= 7 becomes the equality
3x1 + 4x2 + s1 = 7 where the introduced slack variable s1 satisfies non-negativity
condition s1 >= 0.
Greaterthan-or-equal-to (>=) constraints are modified by introducing surplus
variables.
For example, the constraint 14x1 + 3x2 >= 12 becomes the equality
14x1 + 3x2 − s2 = 12, where s2 is the non-negative surplus variable.
Slack and surplus variables are treated exactly like any other decision variable
throughout the solution process.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 22 / 64
Simplex Method: Preparation

4. Write Simplex Method in Tabular Form:


The tabular form of the simplex method records only the following essential
information;
Coefficients of the variables,
Constants on the right-hand sides of the equations, and
Basic variable appearing in each equation.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 23 / 64
Simplex Method: Work with Simplex Tableau

Summary of the Simplex Method:


Initialization. Introduce slack variables and select the decision variables to be the
initial nonbasic variables (set equal to zero) and the slack variables to be the
initial basic variables
Optimality Test. The current basic feasible (BF) solution is optimal if and only if
every coefficient in row 0 (of objective function) is nonnegative (≥ 0). If it is,
stop; otherwise, go to an iteration to obtain the next BF solution, which involves
changing one nonbasic variable to a basic variable and vice versa and then solving
for the new solution.
Iteration. If the current basic feasible (BF) solution is non optimal use steps of
iteration to obtain the next BF solution, which involves changing one nonbasic
variable to a basic variable and vice versa and then solving for the new solution.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 24 / 64
Simplex Method: Work with Simplex Tableau

Working with iterations can be summarized in the following steps:


Step 1. Select as the non-basic variable to enter the basis that variable
corresponding to the most negative coefficient in the top row. This identifies the
pivot column.
Step 2. Examine the coefficients in the pivot column. If all elements are <= 0,
then this problem has an unbounded solution (no optimal solution); stop.
Otherwise go to Step 3.
Step 3. Apply the minimum ratio test by calculating the ratios Θi = bi /aik for all
i = 1, ..., m for which aik > 0, where aik is the i-th element in the pivot column k.
Then select Θ = minΘi . This identifies the pivot row and defines the variable
that will leave the basis. The pivot element is the element in the pivot row and
pivot column.
Step 4. To obtain the next tableau (which will represent the new basic feasible
solution), divide each element in the pivot row by the pivot element. Use this row
now to perform row operations on the other rows in order to obtain zeros in the
rest of the pivot column, including the z row. This constitutes a pivot operation,
performed on the pivot element, for the purpose of creating a unit vector in the
pivot column, with a coefficient of one for the variable chosen to enter the basis.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 25 / 64
Simplex Method: Solved Example - 1

Consider the following data for Dakota Furniture which makes desks, tables, and
chairs and maximize weekly revenue.

Resource Desk Table Chair Max Avail.


Lumber (board ft.) 8 6 1 48
Finishing hours 4 2 1.5 20
Carpentry hours 2 1.5 0.5 8
Max Demand unlimited 5 unlimited
Price ($) 60 30 20

The corresponding linear programming model can be rewrite as follows;

Maximize z = 60x1 + 30x2 + 20x3 ,


s.t. 8x1 + 6x2 + x3 ≤ 48
4x1 + 2x2 + 1.5x3 ≤ 20
(9)
2x1 + 1.5x2 + 0.5x3 ≤ 8
x2 ≤ 5
x1 , x2 , x3 ≥ 0,

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 26 / 64
Simplex Method: Solved Example - 1

Introduce slack variables and convert the Linear Programming problem to the
standard form and write a canonical form

R0 z −60x1 −30x2 −20x3 0s1 0s2 0s3 0s4 =0


R1 8x1 +6x2 x3 +s1 = 48
R2 4x1 +2x2 +1.5x3 +s2 = 20
R3 2x1 +1.5x2 +0.5x3 +s3 =8
R4 x2 +s4 =5

Initial Table

Line Basis z x1 x2 x3 s1 s2 s3 s4 RHS Ratio


L0 z 1 -60 -30 -20 0 0 0 0 0
L1 s1 0 8 6 1 1 0 0 0 48 6
L2 s2 0 4 2 1.5 0 1 0 0 20 5
L3 s3 0 2 1.5 0.5 0 0 1 0 8 4
L4 s4 0 0 1 0 0 0 0 1 5 -

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 27 / 64
Simplex Method: Solved Example - 1

First Tableau

Line Basis z x1 x2 x3 s1 s2 s3 s4 RHS Ratio


′ ′
L0 = L0 + 60 × LP3 z 1 0 15 -5 0 0 30 0 240
′ ′
L1 = L1 − 8 × LP3 s1 0 0 0 -1 1 0 -4 0 16 -
′ ′
L2 = L2 − 4 × LP3 s2 0 0 -1 0.5 0 1 -2 0 4 8
P′
L3 = L3 /2 x1 0 1 0.75 0.25 0 0 0.5 0 4 16

L4 = L4 s4 0 0 1 0 0 0 0 1 5 -

Second and optimal tableau

z x1 x2 x3 s1 s2 s3 s4 RHS Ratio
1 0 5 0 0 10 10 0 280
s1 0 0 -2 0 1 2 -8 0 24
x3 0 0 -2 1 0 2 -4 0 8
x1 0 1 1.25 0 0 -0.5 1.5 0 2
s4 0 0 1 0 0 0 0 1 5

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 28 / 64
Simplex Method: Solved Example - 2

Consider the following modified Dakota Furniture Objective Function:


maximize z = 60x1 + 35x2 + 20x3
Use constraints from the original Dakota Furniture LP Model (in Solved Example - 1)
and find the maximum value of this modified Objective function.
After solving: z ∗ = 280 (The maximun remain the same because x2 = 0 in both
situations)

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 29 / 64
Simplex Method: Solved Example - 3

maximize z = 8x1 + 5x2


subject to:
(1): x1 <= 150
(2): x2 <= 250
(3): 2x1 + x2 <= 500 and (4): x1 , x2 >= 0
The standard form for this problem is
maximize z = 8x1 + 5x2 + 0s1 + os2 + 0s3
subject to:
(1): x1 + s1 = 150
(2): x2 + s2 = 250
(3): 2x1 + x2 + s3 = 500

In this example, the objective function equation is rewritten as:


1z − 8x1 − 5x2 − 0s1 − os2 − 0s3 = 0
After solving: The decision variables are: x1 = 125 and x2 = 250. Then the
optimal objective function value is 2250

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 30 / 64
Simplex Method: Artificial Variables

ARTIFICIAL VARIABLES
In the original presentation of the Simplex algorithm in previous slides, the sample
problems were ones in which all constraints were of the less-than-or-equal (<=)
type. In that case, we observed that by adding slack variables (in order to achieve
equality constraints), we fortuitously also obtained an initial feasible set of basic
variables. The coefficients of the slack variables provided the required unit
vectors, embedded in the matrix of coefficients of the linear system of equations.
By ARTIFICIAL VARIABLES, we will see how to obtain an initial basic feasible
solution for problems with more general forms of constraints, and to then use the
Simplex method to solve such problems.
Recall that all right-hand sides bi of constraints must be non-negative. Any
constraint with a negative constant on the right-hand side can be multiplied by -1
in order to satisfy this requirement. For example:
an equality constraint such as −3x1 + 4x2 = −6 can be replaced by the constraint
3x1 − 4x2 = 6
an equality constraint such as 5x1 − 8x2 <= −10 can be replaced by the constraint
−5x1 + 8x2 >= 10

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 31 / 64
Simplex Method: Artificial Variables

ARTIFICIAL VARIABLES
A typical linear programming problems in standard form contains equality
constraints involving only the original decision variables as well as constraints that
include slack variables and surplus variables. Slack variables can conveniently be
used as basic variables; however, basic variables corresponding to equality
constraints and greater-than-or-equal (⩾) constraints are not always immediately
available. Although it may be possible, by trial-anderror, to obtain a feasible
starting basis for some problems, it is preferred to use an approach that is
straightforward and simple, and that can be used predictably in all cases.
This situation is dealed with by introducing additional variables, called artificial
variables, solely for the purpose of obtaining an initial basis. These variables have
no real meaning in the problem being solved, and will not be a part of the final
solution. They merely provide a mechanism that allows to create a starting basic
solution configuration, and then to apply the Simplex algorithm to the problem.
(Note that it may not be necessary to add an artificial variable to every
constraint; a constraint with a slack variable does not need an artificial variable. )

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 32 / 64
Simplex Method: Artificial Variables

ARTIFICIAL VARIABLES: Illustration - 1


maximize z = x1 + 3x2
subject to:
(1): 2x1 − x2 <= −1
(2): x1 + x2 = 3
x1 , x2 >= 0
Multiply the first constraint by -1, to obtain −2x1 + x2 ⩾ 1, and then create an
equality constraint by adding a (non-negative) surplus variable s, with a
coefficient of-1. Now, the set of constraints
−2x1 + x2 − s1 = 1
x1 + x2 = 3
is in standard form, but since there is no obvious starting solution (as there would
have been if we had added slack variables in each constraint), we will introduce
two artificial variables, R1 and R2 for this purpose. The constraint set becomes

−2x1 +x2 −s1 +R1 =1


x1 +x2 +R2 =3

where x1 , x2 , s1 , R1 , R2 ⩾ 0. We now have initial basic variables R1 and R2 for this


enlarged problem; however, we must realize that the original equality constraint
set is satisfied only if both R1 and R2 have values of zero. Therefore, the artificial
variables must play only a temporary role in the solution.
AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 33 / 64
Simplex Method: Artificial Variables

ARTIFICIAL VARIABLES: Illustration - 1


There are two primary approaches that we can use to ensure that the artificial
variables are not in the final solution. One method, commonly called the Big-M
method, achieves this end by creating a modified objective function with huge
negative coefficients −M on the artificial variables.
In the above illistration, the modified objective function would be
zM = x1 + 3x2 + 0s1 − MR1 − MR2
When the Simplex method is applied to maximize this function, the heavy
negative weights on the artificial variables will tend to drive R1 and R2 out of the
basis, and the final solution will typically involve only the decision variables x, and
the slack or surplus variables.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 34 / 64
Simplex Method: Artificial Variables

Big-M method: Example - 1


Bevco manufactures an orange flavored soft drink called Oranj by combining
orange soda and orange juice. Each ounce of orange soda contains 0.5 oz of
sugar and 1 mg of vitamin C. Each ounce of orange juice contains 0.25 oz of
sugar and 3 mg of vitamin C. It costs Bevco 2¢ to produce an ounce of orange
soda and 3¢ to produce an ounce of orange juice. Marketing department has
decided that each 10 oz bottle of Oranj must contain at least 20 mg of vitamin C
and at most 4 oz of sugar. Use LP to determine how Bevco can meet marketing
dept.’s requirements at minimum cost.
Linear Program Model
Let x1 and x2 be the quantity of ounces of orange soda and orange juice (respectively)
in a bottle of Oranj.
min z = 2x1 + 3x2
subject to:
0.5x1 + 0.25x2 <= 4 (sugar const.)
x1 + 3x2 >= 20 (vit. C const.)
x1 + x2 = 10 (10 oz in bottle)
x1 , x2 >= 0

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 35 / 64
Simplex Method: Artificial Variables

Big-M method: Example - 1


1. Modify the constraints so that the RHS of each constraint is nonnegative
In the example the RHS of each constraint is nonnegative (satisfied)
2. Convert each inequality constraint to standard form
z −2x1 −3x2 =0
0.5x1 +0.25x2 +s1 =4
x1 +3x2 −e2 =20
x1 +x2 =10

3. Add Ri to the constraints identified as > or = const.s


z −2x1 −3x2 =0 Row 0
0.5x1 +0.25x2 +s1 =4 Row 1
x1 +3x2 −e2 R2 =20 Row 2
x1 +x2 R3 =10 Row 3

4. Add MRi to the objective function (min problem)


min z = 2x1 + 3x2 + MR2 + MR3
Row 0 will change to: z − 2x1 − 3x2 − MR2 − MR3 = 0
5. Since each artificial variable are in our starting bfs, they must be eliminated from
Row 0
NewRow 0 = Row 0 + M ∗ Row 2 + M ∗ Row 3 ⇒
z + (2M–2)x1 + (4M–3)x2 –Me2 = 30M

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 36 / 64
Simplex Method: Solved Example - 4

Big-M method: Example - 1


Initial tableau: In a min problem, entering variable is the variable that has the
“most positive” coefficient in row 0!
z x1 x2 s1 e2 R2 R3 RHS BV Ratio
1 2M-2 4M-3 0 -M 0 0 30M z = 30M
0 0.5 0.25 1 0 0 0 4 s1 = 4 16
0 1 3 0 -1 1 0 20 R2 = 20 20/3
0 1 1 0 0 0 1 10 R3 = 10 10

First tableau
z x1 x2 s1 e2 R2 R3 RHS BV Ratio
1 (2M-3)/3 0 0 (M-3)/3 (3-4M)/3 0 20+3.3M z = 30M
0 5/12 0 1 1/12 -1/12 0 7/3 s1 28/5
0 1/3 1 0 -1/3 1/3 0 20/3 x2 20
0 2/3 0 0 1/3 -1/3 1 10/3 R3 5

Optimal tableau
z x1 x2 s1 e2 R2 R3 RHS BV Ratio
1 0 0 0 -1/2 (1-2M)/2 (3-2M)/2 25 z = 25
0 0 0 1 -1/8 1/8 -5/8 1/4 s1 = 1/4
0 0 1 0 -1/2 1/2 -1/2 5 x2 = 5
0 1 0 0 1/2 -1/3 3/2 5 x1 = 5

Report: In a bottle of Oranj, there should be 5 oz orange soda and 5 oz orange


juice. In this case the cost would be 25¢.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 37 / 64
Simplex Method: Solved Example - 5

Big-M method: Example-2


Solve the following Linear Program Model using Big-M method
min z = 2x1 + 3x2
subject to:
0.5x1 + 0.25x2 <= 4 (sugar const.)
x1 + 3x2 >= 36 (vit. C const.)
x1 + x2 = 10 (10 oz in bottle)
x1 , x2 >= 0

Report: After solving this LP model you will see that it is impossible to produce
Oranj under given conditions.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 38 / 64
Simplex Method: Artificial Variables

ARTIFICIAL VARIABLES: Illustration - 1


For two reasons, the Big-M method is not considered to be a practical approach.
1. If the Simplex method terminates with an optimal solution (or with an indication
that the linear program is unbounded), and at least one of the artificial variables is basic
(positive) in the solution, then the original problem has no feasible solution. Moreover,
in order to discover that no solution exists, we have had to solve an entire large
(because of the additional artificial variables) linear programming problem.
2. A more serious difficulty with this method arises from a computational standpoint.
The value of M must be chosen to be overwhelmingly large relative to all other problem
parameters, in order to be sure that artificial variables do not remain in the basis of a
feasible problem.
The Big-M method is very poorly suited for computer implementation, and
nowadays is rarely seen in commercial software.
The more practical alternative to solving linear programming problems having
artificial variables is found in the two-phase Simplex method.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 39 / 64
Simplex Method: Artificial Variables

The Two-Phase Simplex Method


Suppose we have a linear programming problem in standard form with artificial
variables in the initial basic solution. Before expending the computational effort
to solve the whole enlarged problem, it would be useful to know whether a
feasible solution to the original problem exists. That is, we would like to know
whether there is a solution, within the enlarged feasible region, in which the
artificial variables are zero.
In order to make this determination, we first use the Simplex method to solve the
problem of minimizing the sum of the artificial variables. If this sum can be
minimized to zero, then there exists a solution not involving the artificial
variables, and thus the original problem is feasible. Furthermore, in this case, we
can use the final solution obtained from this computation as a starting solution
for the original problem, and dispense with the artificial variables. On the other
hand, if the optimized sum of the artificial variables is greater than zero, then at
least one of the artificial variables remains basic, and we, therefore, know that the
original problem constraint set cannot be satisfied.
The two phases of this method can be summarized as follows.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 40 / 64
Simplex Method: Artificial Variables

The Two-Phase Simplex Method


The two phases of this method can be summarized as follows.
Phase 1: Create a new objective function consisting of the sum of the artificial
variables. Use the Simplex method to minimize this function, subject to the problem
constraints. If this artificial objective function can be reduced to zero, then each of the
(non-negative) artificial variables must be zero. In this case, all the original problem
constraints are satisfied and we proceed to Phase 2. Otherwise, we know without
further computation that the original problem is infeasible.
Phase 2: Use the basic feasible solution resulting from Phase 1 (ignoring the artificial
variables which are no longer a part of any solution) as a starting solution for the
original problem with the original objective function. Apply the ordinary Simplex
method to obtain an optimal solution.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 41 / 64
Simplex Method: Solved Example - 6

The Two-Phase Method: Example-1 (Let us use example from Illustration-1)


maximize z = x1 + 3x2
subject to:
(1): 2x1 − x2 <= −1
(2): x1 + x2 = 3
x1 , x2 >= 0
Multiply the first constraint by -1, to obtain −2x1 + x2 ⩾ 1, and then create an
equality constraint by adding a (non-negative) surplus variable s, with a
coefficient of-1. Now, the set of constraints
−2x1 + x2 − s1 = 1
x1 + x2 = 3
is in standard form, but since there is no obvious starting solution (as there would
have been if we had added slack variables in each constraint), we will introduce
two artificial variables, R1 and R2 for this purpose. The constraint set becomes

−2x1 +x2 −s1 +R1 =1


x1 +x2 +R2 =3

where x1 , x2 , s1 , R1 , R2 ⩾ 0. We now have initial basic variables R1 and R2 for this


enlarged problem; however, we must realize that the original equality constraint
set is satisfied only if both R1 and R2 have values of zero. Therefore, the artificial
variables must play only a temporary role in the solution.
AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 42 / 64
Simplex Method: Solved Example - 6

The Two-Phase Method: Example-1


In Phase 1, we seek to:
maximize zR = R1 + R2
which is equivalent to maximizing ZR = −R1 − R2 . (Note that we minimize this sum
regardless of whether the original problem is a minimization or a maximization problem.)
The top row of the tableau represents the equation: ZR + R1 + R2 = 0
Initial Table
x1 x2 s1 R1 R2 Solution
zR 0 0 0 1 1 0
R1 -2 1 -1 1 0 1
R2 1 1 0 0 1 3
First Table
x1 x2 s1 R1 R2 Solution
zR 1 -2 1 0 0 -4
R1 -2 1 -1 1 0 1
R2 1 1 0 0 1 3

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 43 / 64
Simplex Method: Solved Example - 6

The Two-Phase Method: Example-1


Apply two iterations of the Simplex method to obtain the following two tableaus.

x1 x2 s1 R1 R2 Solution
zR -3 0 -1 2 0 -2
R1 -2 1 -1 1 0 1
R2 3 0 1 -1 1 2

x1 x2 s1 R1 R2 Solution
zR 0 0 0 1 1 0
R1 0 1 -1/3 1/3 2/3 7/3
R2 1 0 1/3 -1/3 1/3 2/3

This is the optimal solution for the Phase 1 problem, and since R1 and R2 are
zero and non-basic, this solution gives us a basic feasible starting solution for the
original problem.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 44 / 64
Simplex Method: Solved Example - 6
The Two-Phase Method: Example-1
In Phase 2, artificial variables need not be considered and can be removed from
the tableau.
The top row of the starting tableau is replaced with the coefficients for the
original (maximization) objective function.
x1 x2 s1 Solution
z -1 -3 0 0
x2 0 1 -1/3 7/3
x1 1 0 1/3 2/3
Perform row operations to obtain an appropriate objective function row for a
starting basis, and the Phase 2 tableau, becomes
x1 x2 s1 Solution
z 0 0 -2/3 23/3
x2 0 1 -1/3 7/3
x1 1 0 1/3 2/3
Now we apply the ordinary Simplex method, and in one iteration obtain the
optimal solution shown in the final tableau:
x1 x2 s1 Solution
z 2 0 0 9
x2 1 1 0 3
s1 3 0 1 2
AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 45 / 64
Simplex Method: Information in Tableau

Based on information that appears within the tableau, we can deduce certain
characteristics of the linear programming problem being solved. These include
linear programming problems with:
multiple optimal solutions;
unbounded solutions;
degenerate solutions.
1. Multiple Optimal Solutions
When the line corresponding to the objective function is parallel to one of the
straight lines bounding the feasible region, then the objective function can be
optimized at all points on that edge of the feasible region.
Thus, instead of a unique optimal solution, we have infinitely many optimal solutions
from which to choose, thereby permitting management to select on the basis of
secondary factors that do not appear in the model.
If a zero appears in the objective function row corresponding to a non-basic
variable, then that non-basic variable can enter the basis without changing the
value of the objective function. In other words, there are two distinct adjacent
extreme points that yield .the same value of z.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 46 / 64
Simplex Method: Information in Tableau

2. Unbounded Solution
When the feasible region of a linear programming problem is unbounded, then it
is also possible that the objective function value can be increased without bound.
If in any tableau the constraint coefficients corresponding to a non-basic variable
are all either negative or zero, then that non-basic variable can be increased
arbitrarily without violating any constraint. Thus, the feasible region is
unbounded in the direction of that variable.
If that variable is eligible to enter the basis, then increasing this variable’s value
will increase the objective function. And because this variable can be increased
indefinitely, so can the objective function value. Thus, the Simplex algorithm
terminates and we can recognize that the problem has an unbounded solution.
Unbounded Solution: Example-1
maximize z = 5x1 + 6x2
subject to:
(1): −x1 + x2 <= 2
(2): x2 <= 2
x1 , x2 >= 0

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 47 / 64
Simplex Method: Information in Tableau

Figure 8: The initial tableau

Figure 9: Unbounded solution

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 48 / 64
Simplex Method: Information in Tableau

Unbounded Solution: Example-2

z x1 x2 x3 s1 s2 z RHS BV Ratio
1 0 2 -9 0 12 4 100 z = 100
0 0 1 -6 1 6 -1 20 x4 = 20 None
0 1 1 -1 0 1 0 5 x1 = 5 None

Since ratio test fails, the Linear Programming under consideration is an


unbounded Linear Programming.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 49 / 64
Simplex Method: Information in Tableau
3. Degenerate Solution
A solution to a linear programming problem is said to be degenerate if one or
more of the basic variables has a value of zero.
The presence of a degenerate solution indicates that the linear programming
formulation contains at least one redundant constraint.
Degenerate Solution: Example-1
maximize z = 3x1 + 2x2
subject to:
(1): x1 <= 3 ; (2): 2x1 + x2 <= 6 ; (3): x2 <= 2 ; (4): x1 + x2 <= 3 ; x1 , x2 >= 0

Figure 10: Degenerate solution


AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 50 / 64
The Dual Problem

A linear programming problem and its dual are related in the sense that both
problems are based on the same problem data, and an optimal solution to either
one of the problems prescribes the optimal solution to the other.
Consider any linear programming formulation that is in the form of a
maximization problem with constraints of the less-than-or-equal type or equality
constraints. (A constraint in which the inequality is a >= type can be multiplied
by -1 to reverse the direction of the inequality sign, resulting possibly in a
negative right-hand-side value.) We will call this the primal problem.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 51 / 64
The Dual Problem

Steps for constructing the corresponding dual problem:


The dual problem is a minimization problem.
For every variable Xi in the primal problem, there is a constraint in the dual problem. If
Xi >= 0 in the primal, the constraint is a >= inequality in the dual. If Xi is
unrestricted in sign, the i-th constraint is an equality in the dual.
For every constraint in the primal problem, there is a variable yi in the dual. If the
constraint is <=, then yi >= 0 in the dual problem. If the constraint is an equality,
then yi is unrestricted in sign in the dual.
The right-hand sides in the primal are the objective function coefficients in the dual.
The objective function coefficients in the primal are the right-hand sides in the dual.
The coefficient matrix in the primal is ”transposed” to form the coefficient matrix for
the dual.

and the variables yl ..., ym are non-negative.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 52 / 64
The Dual Problem

Primal Problem:
Maximize z = c1 x1 + c2 x2 + ... + cn xn ,
s.t. a11 x1 + a12 x2 + ... + a1n xn ≤ b1
.. (10)
.
am1 x1 + am2 x2 + ... + amn xn ≤ bm
xj ≥ 0, ∀j ∈ N.

Dual Problem:
Minimize w = b1 y1 + b2 y2 + ... + bm ym ,
s.t. a11 y1 + a21 y2 + ... + am1 ym ≥ c1
.. (11)
.
a1n y1 + a2n y2 + ... + anm yn ≥ cn
yj ≥ 0, ∀j ∈ N.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 53 / 64
The Dual Problem: Example-1

Consider the primal problem:


maximize 3x1 + 2x2 − 6x3
subject to:
: 4x1 + 8x2 − x3 <= 5
: 7x1 − 2x2 + 2x3 >= 4
x1 , x2 , x3 >= 0
Corresponding dual problem:
The second constraint can be rewritten as −7x1 + 2x2 − 2x3 <= −4
minimize 5y1 − 4y2
subject to:
: 4y1 − 7y2 >= 3
: 8y1 + 2y2 >= 2
: −y1 − 2y2 >= −6
y1 , y2 >= 0

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 54 / 64
The Dual Problem: Example-2

Consider the primal problem:


maximize 4x1 − 3x2
subject to:
: 2x1 − 4x2 <= 5
: 5x1 − 6x2 >= 9
: 3x1 + 8x2 = 2
: x1 + 2x2 <= 1
x1 >= 0
x2 unrestricted in sign
Corresponding dual problem:
The second constraint can be rewritten as −5x1 + 6x2 <= −9
minimize 5y1 − 9y2 + 2y3 + y4
subject to:
: 2y1 − 5y2 + 3y3 + y4 >= 4
: −4y1 + 6y2 + 8y3 + 2y4 = −3
y1 , y2 , y4 >= 0
y3 unrestricted in sign

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 55 / 64
The Dual Problem: Consequences

Any feasible solution to the dual can be used to develop a bound on the optimal
value of the primal objective function.
If the primal is unbounded, then the dual problem is infeasible.
If the dual is unbounded, then the primal is infeasible.
How to read the optimal dual solution from Row 0 of the optimal tableau if the
primal is a max problem:
‘optimal value of dual variable yi ’
= ‘coefficient of si in optimal Row 0’ (if constraint i is a <= constraint)
= –‘coefficient of ei in optimal Row 0’ (if constraint i is a >= constraint)
= ‘coefficient of ai (artificial variable) in optimal Row 0’ –M (if constraint i is a =
constraint)
How to read the optimal dual solution from Row 0 of the optimal tableau if the
primal is a min problem:
‘optimal value of dual variable xi ’
= ‘coefficient of si in optimal Row 0’ (if constraint i is a <= constraint)
= –‘ coefficient of ei in optimal Row 0’ (if constraint i is a >= constraint)
= ‘coefficient of ai (artificial variable) in optimal Row 0’ +M (if constraint i is a =
constraint)

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 56 / 64
The Dual Problem: Example-3

Consider the primal problem:


maximize z = 3x1 + 2x2 + 5x3
subject to:
: x1 + 3x2 + 2x3 <= 15
: 2x2 − x3 >= 5
: 2x1 + x2 − 5x3 = 10
x1 , x2 , x3 >= 0

Figure 11: Optimal tableau for the above LP

Use this information to find the optimal solution to the corresponding dual LP.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 57 / 64
The Dual Problem: Example-3

Answer:
minimize w = 15y1 − 5y2 + 10y3
subject to:
: y1 + 2y3 >= 3
: 3y1 − 2y2 + y3 >= 2
: 2y1 + y2 − 5y3 = 5
y1 , y2 >= 0
y3 unrestricted in sign

w = 49.76, y1 = 51/23, y2 = −58/23, y3 = 9/23

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 58 / 64
The Dual Problem: Example-4

Consider the primal problem:


minimize w = 3y1 + 2y2 + y3
subject to:
: y1 + y2 + y3 >= 4
: y2 − y3 <= 2
: y1 + y2 − 2y3 = 6
: y1 , y2 , y3 >= 0

Figure 12: Optimal tableau for the above LP

Use this information to find the optimal solution to the corresponding dual LP.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 59 / 64
The Dual Problem: Example-3

Answer:
maximize z = 4x1 − 2x2 + 6x3
subject to:
: x1 + x3 <= 3
: x1 − x2 + x3 <= 2
: x1 + x2 + 2x3 <= 1
y1 , y2 >= 0
y3 unrestricted in sign

z = 6, x1 = 3, x2 = 0, x3 = −1

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 60 / 64
The Dual Problem: Economic Interpretation
maximize When the primal is a normal max problem, the dual variables are
related to the value of resources available to the decision maker.
For this reason, dual variables are often referred to as resource shadow prices.
Example:Dakota Furniture
Objective criterion: maximize (Profit) z = 60x1 + 30x2 + 20x3
Constraints:
8x1 + 6x2 + x3 <= 48 (Lumber constraint)
4x1 + 2x2 + 1.5x3 <= 20 (Finishing hour constraint)
2x1 + 1.5x2 + 0.5x3 <= 8 (Carpentry hour constraint)
x1 , x2 , x3 >= 0
DUAL LP
In the dual problem y1 , y2 , y3 are the resource prices (price paid for one board ft
of lumber, one finishing hour, and one carpentry hour).
w is the cost of purchasing the resources.
Resource prices must be set high enough to induce Dakota to sell. i.e. total
purchasing cost equals total profit.
Objective criterion: minimize (Cost) z = 48y1 + 20y2 + 8y3
Constraints:
8y1 + 4y2 + 2y3 >= 60 (Desk constraint)
6y1 + 2y2 + 1.5y3 >= 30 (Table constraint)
y1 + 1.5y2 + 0.5y3 >= 20 (Chair constraint)
y1 , y2 , y3 >= 0
AST3231 Operations Research – CHAP 2 – Linear Programming
School of Economics; University of Rwanda 61 / 64
Demonstration on Solving LP Problems with Excel Solver and Sensitivity
Analysis

One Example for a Maximization Problem


One Example for a Minimization Problem

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 62 / 64
Take Home Task - 2 & Quiz - 1

Take Home Task - 2 will take on methods for solving LP problems (Graphic
Method, Fourier-Motzkin Elimination, and Simplex Method). It will be posted on
and submitted via moodle platform.

Quiz - 1 will take on the Theory of LP. It will be posted on and submitted via
moodle platform.

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 63 / 64
Thank you
for
your kind attention
——————————————————–
———-
————
———-

?
Questions and Comments Are Welcome

AST3231 Operations Research – CHAP 2 – Linear Programming


School of Economics; University of Rwanda 64 / 64

You might also like