0% found this document useful (0 votes)
52 views42 pages

Optimization Models in Game Theory

The document discusses mathematical programming and game theory, focusing on optimization models used for decision making. It outlines the components of optimization models, including objective functions, decision variables, and constraints, and explains linear programming problems and their applications. Additionally, it covers the graphical method for solving linear programming problems and provides examples and exercises for formulating and solving these problems.

Uploaded by

moesikatlego25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views42 pages

Optimization Models in Game Theory

The document discusses mathematical programming and game theory, focusing on optimization models used for decision making. It outlines the components of optimization models, including objective functions, decision variables, and constraints, and explains linear programming problems and their applications. Additionally, it covers the graphical method for solving linear programming problems and provides examples and exercises for formulating and solving these problems.

Uploaded by

moesikatlego25
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MAT361

Mathematical Programming and Game Theory

1
1 Model Building-Optimization
Optimization and in most cases referred as Operations research is simply a scientific ap-
proach to decision making that seeks to best design and operate a system, usually under
conditions that must be satisfied.

1.1 Optimization Models

Most models discussed here, will be prescriptive or optimization models.


Prescriptive models describes the behaviour for an organization that will enable it to best
meet its goal(s). The components of an optimization model include:

• objective function(s)
• decision variables
• constraints.

1.1.1 Objective Function

Here, the intention is to attain any set goal or a set of objectives, the ultimate. In any
linear programming problem, the decision maker wants to maximize (usually revenue or
profits) or minimize (usually costs) some function of the decision variables. The function to
be maximized or minimized is called the objective function.

1.1.2 Decision Variables

These are the variables whose values are under control and influence the performance of the
system called decision variables. In most cases our work would be devoted to a discussion of
how to determine the value of the decision variables that maximize or minimize an objective
function.

1.1.3 Constraints

All the restrictions on the values of the decision variables are referred as constraints. Con-
straints possess the inequality signs and equality signs.

Before we can formally define a linear programming program, we have to define the concepts
of linear function and linear inequality.

1.2 Linear function

Definition 1 A function f (x1 , x2 , ..., xn ) of x1 , x2 , ..., xn is a linear function if and only if


for some set of constants c1 , c2 , ..., cn , f (x1 , x2 , ..., xn ) = c1 x1 + c2 x2 + · · · + cn xn .

As an example, f (x1 , x2 ) = 2x1 + x2 is a linear function of x1 and x2 , but f (x1 , x2 ) = x21 x2


is not a linear function of x1 and x2 .

2
That is, a function f (x) is said to be linear if

f (αx + βy) = αf (x) + βf (y), α, β ∈ IR

e.g: f (x) = 3x is linear since


f (αx + βy) = 3(αx + βy) = α(3x) + β(3y) = αf (x) + βf (y)
Exercise
Determine if the following functions are linear or not.
a) f (x) = 5x + 1 b) f (x, y) = 2x − 5y
c) f (x, y) = xy d) f (x) = x2

The transformation T (X) = AX, (where A is an m × n) matrix and Xis a n × 1 vector) is


linear.
T (αX + βY ) = A(αX + βY ) = αAX + βAY = αT (X) + βT (Y ).

1.2.1 Linear Inequality

Definition 2 For any linear function f (x1 , x2 , ..., xn ) and any number b, the inequalities
f (x1 , x2 , ..., xn ) ≤ b and f (x1 , x2 , ..., xn ) ≥ b are linear inequalities.

Thus, 2x1 + 3x2 ≤ 3 and 2x1 + x2 ≥ 3 are linear inequalities, but x21 x2 ≤ 3 is not a linear
inequality.

1.3 Mathematical programming Models

Here programming means planning, these are mathematical methods for planning, also
called Optimization models.
A linear programming problem (LP) is an optimization problem for which we do the
following:

(a) We attempt to maximize (or minimize) a linear function of the decision variables.
(b) The values of the decision variables must satisfy a set of constraints. Each equation
must be a linear equation or linear inequality.
(c) A sign restriction is associated with each variable. For any variable xi must be non-
negative (xi ≥ 0).

1.3.1 Feasible Region and Optimal Solution

Definition 3 Feasible Region The feasible region for an LP is the set of all points that
satisfies all the LP’s constraints and sign restrictions.

Definition 4 Optimal Solution For a maximization problem, an optimal solution to an


LP is a point in the feasible region with the largest objective function value. Similarly, for a
minimization problem, an optimal solution is a point in the feasible region with the smallest
objective function value.

Applications of LP problem

3
• Production Planning

• Food mix
• Water quality management
• Inventory control

1.4 Objectives

By the end of the unit one should be able to:

• formulate a simple linear programming problems in terms of an objective function to


be minimized or maximized subject to the a set of constraints.
• find the feasible region and locate feasible solutions for maximization or minimization
with the use of the graphical method.

• solve maximization problem using Simplex method.


• construct the Dual of a linear programming problem.
• solve minimization linear programming problems by maximizing their dual.

1.5 Formulation of an LPP

A general linear programming problem (LPP) can be expressed as:


Minimize or Maximize P = c1 x1 + c2 x2 + ... + cn xn · · · · · · · · · (1)
Subject to
a11 x1 + a12 x2 + ... + a1n xn (≤, =, ≥) b1 ,
a21 x1 + a22 x2 + ... + a2n xn (≤, =, ≥) b2 ,
··· ··· ··· ··· ··· ··· ··· ··· ···
am1 x1 + am2 x2 + ... + amn xn (≤, =, ≥) bm ,
x2 , ..., xn ≥ 0
where cj , aij , and bi are constants. The cj , j = 1, 2, ..., n are called cost coefficients and
eqn (1) is the objective function. The nonnegative xj are decision(which needs to be found)
variables.
The general LP problem can also be expressed in matrix notation as:
Minimize f (X) = cX
Subject to AX = b and X ≥ 0
Where c = (c1 , c2 , ..., cn ), X = (x1 , x2 , ..., xn )T , A = (aij ), i = 1, 2..., m, j = 1, 2, ..., n b=
(b1 , b2 , ..., bm )T .

It is called a linear programming program because both the objective function and the con-
straints are linear functions. The equality in the constraints can be replaced by inequalities.

4
In formulating the LPP as a mathematical model, one should follow the steps:
Steps:

1. Identify the decision variables and assign them symbols, i.e., x1 , x2 , ..., xn
2. Identify a set of constraints and express them in terms of their inequalities.
3. Identify the objective function and express it in terms of the decision variables.
4. Add the nonnegative constraint of the decision variables.

Consider the example of the product mix to illustrate the formulation of an LPP.

Example 1 . A paint manufacturer produces two types of paint, one type is of standard
quality and the other is of top quality. To make these paints, he needs two ingredients, the
pigment and the resin. The standard quality paint requires 2 units of pigment and 3 units of
resin for each unit made, and it is sold at a profit of P 1 per unit. Top quality paint requires
4 units of pigment and 2 units of resin for each unit made, and is sold at a profit of P 1.50
per unit. He has stocks of 12 units of pigment and 10 units of resin. Formulate the above
problem as a linear programming problem to maximize profit.

To formulate the problem, we follow the above steps.

• Decision variables: our decision is based on products made, that is standard and top
quality paint. Hence let x1 represent the standard paint and x2 the top quality paint.
• Constraints: The available stock is obviously our constraint, thus any combination can
never surpass the available stock. Hence 2x1 +4x2 ≤ 12 for pigment and 3x1 +2x2 ≤ 10
for resin.
• Objective function: What is our main aim, to maximize profit given that 1 unit of
standard quality has profit of P 1 and 1 unit of top quality accrues a profit of P 1.50
per unit. Hence, Max: P = x1 + 1.5x2
• Nonnegative condition: x1 , x2 ≥ 0.

We can now write the complete mathematical model of the problem as:

Maximize: P = x1 + 1.5x2
Subject to: 2x1 + 4x2 ≤ 12
3x1 + 2x2 ≤ 10
x1 ≥ 0, x2 ≥ 0.

The above problem is an example of a maximization LPP which are usually identified by
(≤) in all constraints.

Example 2 A pharmaceutical wishes to mix two types of medicines M 1 and M 2 in such


a way that the vitamin content of the mixture contain at least 8 units of vitamin B and 11
units of vitamin C. Medicine M 1 costs P 60 per liter and M 2 costs P 80 per liter. Medicine
M 1 contains 3 units per liter of vitamin B and 5 units per liter of vitamin C while M 2
contains 4 units per liter of vitamin B and 2 units per liter of vitamin C. Formulate this
problem as an LPP to minimize the cost of the mixture.

5
Exercise 1 Truckco manufacturers two types of trucks: A and B. Each truck must go
through the painting shop and assembly shop. If the painting shop were completely devoted
to painting type A trucks, then 800 per day could be painted; if the painting shop were
completely devoted to painting type B trucks, then 700 per day could be painted. If the
assembly shop were completely devoted to assembling truck type A engines, then 1, 500 per
day could be assembled; if the assembly shop were completely devoted to assembling truck
type B engines, then 1, 200 per day could be assembled. Each type A contributes P 3000 to
profit; each type B contributes P 5000. Formulate an LP that will maximize Truckco’s profit.

Example 3 Maximize x + y
subject to x, y ≥ 0

Example 4 Minimize x + y + z
Subject to x ≥ 1, y ≥ 2, z > 0

Example 5 Maximize 45x1 + 80x2


Subject to
5x1 + 20x2 ≤ 400
10x1 + 15x2 ≤ 450
x1 ≥ 0, x2 ≥ 0

The set of values over which the objective function is minimized/maximized is called the
feasible region. The solution in the feasible region that minimize/maximize the objective
function is called the optimal solution.
The solution of an LP has three possibilities:

1. There exists an optimal solution, either uniquely or among infinitely many others.
2. LP is infeasible, which means that a feasible solution does not exist.
3. LP is unbounded, which means that(for maximization problem) for any real number
K, there always exists a feasible solution x such that f (x) > K. In that case, the
optimal objective value is said to be ∞.

Example 6 Maximize x
subject to 2 ≤ x ≤ 3

Soln: maximum value= 3 and is reached when x = 3.

Example 7 minimize x − y
Subject to x ≥ 0, y ≥ 0, z ≥ 0

Soln: solution is unbounded for large values of y, x-y becomes very large and negative.

Example 8 Minimize 3x + y
subject to x + y < −2, x ≥ 0, y ≥ 0

Soln: There are no feasible solutions.

NB: The problem


Maximize x4 + y 4 + z 4
subject to |x| < 1, |y| < 2
is not a linear problem.

6
1.6 The Graphical Method of Solution

The graphical method of solving LPP is used when there are only two decision variables. If
the problem has three or more decision variables, the method is not suitable. In that case,
we would have to use the Simplex method which would be discussed in the next section.
When solving LPP it is very important to be aware of the following definitions and concepts.

• Solution A set of all values of decision variables satisfying all the constraints of an
LPP.
• Feasible Solution Any solution which also satisfies the non-negativity restrictions of
the problem.
• Optimal feasible Solution Any feasible solution which maximizes or minimizes the
objective function.
• Feasible region the common region determined by all the constraints and non-
negativity restrictions of an LPP.
• Corner point A corner point of the feasible region is a point in the feasible region
that is the intersection of two boundary lines.

1.6.1 Graphical method of solving LPP

Theorem 1 If the optimal value of the objective function in a linear programming problem
exists, then that value must occur at one (or more) of the corner points of the feasible region.

Consider the given steps to attain a solution of an LLP of two decision variables.

1. Formulate the LPP.


2. Graph the feasible region and find the corner points.
3. Construct a table listing the values of the objective function at each corner point.
4. Determine the optimal solution from the table.

We would now use this above procedure to solve some LPP where the model has already
been determined, as in Example 1 and 2.
Step2
As, for example 1, the boundary of the feasible region consists of the lines obtained from
changing the inequalities to equalities, i.e. The lines
2x1 + 4x2 = 12 and 3x1 + 2x2 = 10.
Step 3
The corner points (or extreme points) and their corresponding objective functional values
are:
extreme values Profit P = x1 + 1.5x2
(0, 0) 0
( 10
3 , 0) 10
3
(2, 2) 5
(0, 3) 4.5

7
1. Graphically construct some examples of each of the following types of two variable
linear programs:
(a) Infeasible.
(b) With a unique optimal solution.
(c) With more than one optimal solution.
(d) Feasible with bounded feasible region.
(e) Feasible and bounded but with unbounded feasible region.
(f) Unbounded
2. Draw the feasible region of the LP problems:
(a) Minimize 2x1 + 3x2
Subject to
x1 + x2 ≤ 4
3x1 + x2 ≥ 4
x1 + 5x2 ≥ 4
x1 ≤ 3
x2 ≤ 3
x1 , x 2 ≥ 0
(b) Maximize x1 − x2
Subject to
x1 + x2 ≥ 10
3x1 + 5x2 ≤ 15
x1 , x 2 ≥ 0
(c) Maximize Z = 2.5x1 + x2
Subject to
3x1 + 5x2 ≥ 15
5x1 + 2x2 ≥ 10
x1 , x2 ≥ 0.
(d) A furniture dealer deals in only two itemstables and chairs. He has P 50000 to
invest and has storage space of at most 60 pieces. A table costs P 2500 and a
chair P 500. He estimates that from the sale of one table, he can make a profit
of P 250 and that from the sale of one chair a profit of P 75. He wants to know
how many tables and chairs he should buy from the available money so as to
maximize his total profit, assuming that he can sell all the items which he buys.
(e) Solve the following LPP graphically.
Minimize and Maximize

C = 3x1 + 9x2
Subject to : x1 + 3x2 ≤ 60
x1 + x2 ≥ 10
x1 ≤ x2
x1 , x2 ≥ 0

8
2 Convex Sets
Definition 5 Convex Sets
A set C is convex if and only if ∀x1 , x2 ∈ C we have that λx1 + (1 − λ)x2 ∈ C, 0 ≤ λ ≤ 1.
It may be simply put, as a set of points C is a convex set if the line segment joining any
two points in C is wholly contained in C.

Definition 6 For any convex set C, a point P in C is an extreme point if each line
segment that lies completely in C and contains the point P has P as the endpoint of the line
segment.

Example
The set of points on the line L : 2x − y = 1 is a convex set.
Proof:
Let (x1 , y1 ) and (x2 , y2 ) be any points on the line L. We show that the point λ(x1 , y1 ) +
(1 − λ)(x2 , y2 ) = (λx1 + (1 − λ)x2 , λy1 + (1 − λ)y2 ) also lies on the line L. Since (x1 , y1 )and
(x2 , y2 ) lie on L we have that 2x1 − y1 = 1 and 2x2 − y2 = 1. Therefore,

2[λx1 + (1 − λ)x2 ] − [λy1 + (1 − λ)y2 ] = 2λx1 + 2(1 − λ)x2 − λy1 − (1 − λ)y2


= λ(2x1 − y1 ) + (1 − λ)(2x2 − y2 )
= λ+1−λ=1

A point x in C is called a convex combination of points x1 , x2 , ..., xn


n
X n
X
if x = α1 x1 + a2 x2 + · · · + αn xn = αi xi , where αi ’s are constants such that ai = 1
i=1 i=1
and αi ≥ 0.

9
Convex and Nonconvex sets

a b

c d

Exercise 2 State whether the following sets are convex or not.


a) IR b) IR2 c) rationals d) [0, 1] e) {0, 1}
f ) {x ∈ IR : x ≥ 3 and x ≤ 5} g) {3}

Examples of convex sets


C = {(x1 , x2 , x3 ) ∈ IR3 : x1 − 2x2 + x3 = 3}. This is a plane in IR3 ( or Hyperplane).

Theorem 2 The intersection of a finite number of convex sets in IRn is convex.

n
\
Proof 1 Let C1 , C2 , ..., Cn ⊆ IRn be a finite collection of convex sets. Let C = Ci
i=1
be the set formed from the intersection of these sets. Choose x1 , x2 ∈ C and λ ∈ [0, 1].
Consider x = λx1 + (1 − λ)x2 . We know that x1 , x2 ∈ C1 , C2 , ..., Cn by definition of C. By
convexity of each set we know that x ∈ C1 , C2 , ..., Cn .
Therefore x ∈ C.
Hence C is convex.

10
Theorem 3 The feasible region of any linear program is a convex set.

Proof 2 The constraint can be written in matrix notation as Ax = b ( the case where we
have ≤ or ≥ instead of = can be dealt with in a similar way)
Suppose there are at least two solutions X1 and X2 , then we have that AX1 = b and AX2 = b.
For 0 < λ < 1, let X = λX1 + (1 − λ)X2 be any convex combination of X1 and X2 . Then,

AX = A(λX1 + (1 − λ)x2 )
= λAX1 + (1 − λ)AX2
= λb + (1 − λ)b = b

Definition 7 A point U in a convex set C is called an extreme point(or vertex or corner


point) if it can not be expressed as a convex combination of any two points in C
In 2-D a bounded convex set will take the shape of a polygon while in high dimension it will
be a polyhedron.
The extreme points are the corners of the polygon(polyhedron).

Definition 8 A point x is said to be a convex combination of the points x1 , x2 , ..., xn if there


exist scalars c1 , c2 , c3 , ..., cn such that x = c1 x1 + c2 x2 + ... + cn xn where c1 + c2 + ... + cn = 1.

Theorem 4 If K is a bounded convex polyhedron, then every point in K can be represented


as a convex combination of the extreme points of K.

Theorem 5 (a) The objective function assumes its minimum value at an extreme point
of the convex set K generated by the set of feasible solution to the LP problem.

(b) If it assumes its minimum at more than one extreme point then it takes on the same
value for every convex combination of those particular points.

Proof 3 (a) Let f (x) be the objective function and X̄1 , X̄2 , ..., X̄p be the extreme points and
X0 be the minimum feasible solution.
Pp HencePfp (X0 ) ≤ f (X) ∀X ∈ K. Assume X0 is not
an extreme point, then X0 = i=1 αi X̄i , i=1 αi = 1
Pp
f (X0 ) = f ( i=1 αi X̄i ) = f (α1 X̄1 + α2 X̄2 + · · · + αp X̄p
= α1 f (X̄1 ) + α2 f (X̄2 ) + · · · + αp f (X̄p )
= m (m is minK f (X))

It follows that if f (Xm ) is the minimum of the values f (X̄1 ), f (X̄2 ), ..., f (X̄p ), then
f (X0 ) ≥ α1 f (Xm ) + α2 f (Xm ) + · · · + αp f (Xm )
= (α1 + α2 + · · · + αp )f (Xm )
= f (Xm )
i.e f (X0 ) ≥ f (Xm ). Since we assumed that f (X0 ) ≤ f (X) ∀X ∈ K we must have that
f (X0 ) = f (Xm ) = m. Therefore X0 = Xm which is an extreme point, i.e there is an
extreme point at which the objective function assumes its minimum.

11
(b) Let f (X) assume its minimum at the extreme points
X̄1 , X̄2 , ..., X̄q ie f (X̄1 ) =Pf (X̄2 ) = · · · = f (X̄q ) = P
m. If X is any convex combination of
q
the above X̄i ’s, say X = i=1 αi X̄i for αi ≥ 0 and i=1 αi = 1 then

f (X) = f (α1 X̄1 + α2 X̄2 + · · · + αq X̄q


= α1 f (X̄1 ) + α2 f (X̄2 ) + · · · + αq f (X̄q )
= (α1 m + α2 m + · · · + αq m)
= (α1 + α2 + · · · + αq )m = m.

From the above we conclude that we need only investigate extreme points solutions.

Example 9 Sketch the feasible region and hence of the solve the LP problem:
Maximize 45x1 + 80x2
Subject to:
5x1 + 20x2 ≤ 400
10x1 + 15x2 ≤ 450
x1 , x 2 ≥ 0

Soln:
Corner Objective function value
(0,0) 45(0)+80(0)=0
(45,0) 45(45)+80(0)=2025
(0,20) 45(0)+80(20)=1600
(24,14) 45(24)+80(14)=2200

The maximum is 2200 which occurs when x1 = 24 and x2 = 14.

Linear Programming formulation:

1. Determine the specific objective


2. Assign variables to each of the unknown quantities

3. Find a mathematical expression which represents the objective in terms of the un-
knowns and state how it is to be optimized
4. Find the mathematical expression which represents any limited resources in terms of
the unknowns.
5. Add any additional restraints that are implicit to the nature of the problem.

Example 10 Ace Rubber Company Manufactures two types of tyres: Model P, the premium,
and Model R, the regular. Model P sells for P45 per tyre and cost P35 per tyre to make,
whereas Model R sells for P30 per tyre and cost P22 per tyre to make. To make one Model
P tyre, it requires 2 hours on Machine A and 4 hours on Machine B. On the other hand,
to make one Model R tyre, it takes 9 hours on Machine A and 3 hours on Machine B.
Production scheduling indicates that during the coming week Machine A will be available for
at most 36 hours and Machine B for at most 42 hours. How many of each tyre should the
company make in the coming week in order to maximize its profit? What is this maximum
profit?

12
Solution:

• We want to find the number of model P and Model R tyres to be made in order to
maximize profit
• Let
x-number of model P tyres to be made
y-number of model P tyres to be made.
• We want to choose x and y so as to maximize the profit. Profit from model P tyres
is 45 − 35 = 10. Profit from model R tyres is 30 − 22 = 8. Therefore the objective
function is 10x + 8y
• Resources:

Resources Model P Model R Total


Machine A 2hrs/tyre 9hrs/tyre at most 36 hrs
Machine B 4hrs/tyre 3hrs/tyre at most 42hrs
Constraints:
Machine A: 2x + 9y ≤ 36
Machine B: 4x + 3y ≤ 42
• The number of tyres can not be negative, x ≥ 0, y≥0

The LP problem is :
Maximize 10x + 8y
Subject to
2x + 9y ≤ 36
4x + 3y ≤ 42
x ≥ 0, y ≥ 0
Solution
Corner profit
(0,0) 10(0)+8(0)=0
(10,0) 10(10)+8(0)=100
(9,2) 10(9)+8(2)=106
(0,4) 10(0)+8(4)=32

The maximum profit is 100 which occurs when x = 10 and y = 0.

Exercise 3 (a) Badiri toys produces two types of toy cars for export in the SADC region
namely comet and Venus. Three machines A, B and C are required for each product.
A comet requires 2hrs on machine A, 1hr on machine B and 6hrs on machine C while
Venus requires 2hrs on A, 5hrs on B and 2hrs on C. In a given period A is available
for 24hrs, B for 44hrs and C for 60hrs. The profit per car on the comet is P6 and
on the Venus is P9. Assuming that the machines are available when they are required
how many toy cars of each type should be made in order to maximize the profit.
(b) A manufacturing company plans to make two products, chairs and tables, from its
available resources, which consists of 400 board feet of mahogany lumber and 450 labor

13
hours. It knows that to make a chair requires 5 board feet and 10 labor hours and
yields a profit of P45, while each table uses 20 board feet and 15 labor hours and has
a profit of P80. Determine how many chairs and tables must the company make in
order to maximize profits.

3 Duality
A standard minimum program is the one where the objective function is to be minimized,
all the main constraint are of the form ’≥’, and the variables are nonnegative. That is
minimize z = cT x
s.t: Ax ≥ b
x≥0 (1)
A standard maximum program is is one where the objective function is to be maximized,
all the main constraint are of the form ’less than or equal to constant’, and the variables
are nonnegative. That is,
maximize z = cT x
s.t: Ax ≤ b
x≥0 (2)
The above linear programs represented by equations (1) and (2) are said to be in canon-
ical form whenever all the inequality signs are of the form ’≥’ and ’≤’ respectively. It is
mandatory to extreme the primal in canonical form when writing its equivalent dual linear
program. Where there is an equality sign = within the constraints, it should be separated
into two inequality signs ’≤, ≥’ signs. Whenever there is an equality sign in the constraints
there must be an unrestricted variable in the dual of the primal problem.

Here, the original problem would be referred as the primal linear program. Consider the
primal linear program:
minimize z = cT x
s.t: Ax ≥ b
x ≥ 0. (3)
Its corresponding dual linear program is of the form:
maximize z = bT y
s.t: Ay ≥ c
y ≥ 0. (4)
For the primal maximization problem of given by:
maximize z = cT x
s.t: Ax ≤ b
x ≥ 0. (5)
it’s correspond dual is:
minimize z = bT y
s.t: Ay ≥ c
y ≥ 0. (6)

14
The number of constraints in the primal is equal to the number of variables in the dual.

Note the following:


Primal/dual constraint dual/primal variable
consistent with canonical form ⇔ variable ≥ 0
reversed from canonical form ⇔ variable ≤ 0
equality constraint ⇔ variable unrestricted.
Write the corresponding dual problems of the below examples.

Example 11 1. maximize 5x + 2y
Subject to
x + 3y ≤ 12
3x − 4y ≤ 9
7x + 8y ≤ 20
x, y ≥ 0

2. minimize g = 12w1 + 9w2 + 20w3


Subject to
w1 + 3w2 + 7w3 ≥ 5
3w1 − 4w2 + 8w3 ≥ 2
w1 , w2 , w3 ≥ 0
3. minimize z = 3x1 + 5x2
subject to
2x1 + 6x2 ≤ 140
x1 − x2 = 60
x1 ≥ 20
x1 , x2 ≥ 0.

Program(1) and (2) are called dual linear programs. Given a standard maximum(minimum)
program, the dual program is a standard minimum(maximum) program formed by :

1. Associate with each main constraint in the maximum program a variable. This vari-
ables are called dual variables.
2. The constants on the right hand side of the main program become coefficients of the
dual variables in the new objective function.
3. Coefficients of the first column of the original program become the coefficients of the
dual variables in the first constraint of the dual program. Similarly for the other
columns.

4. All inequalities are reversed.

NB: Simply put the raws of the original program become the columns in the dual and the
columns of the original program become the raws in the dual.
In matrix notation the primal and the dual can be expressed as follows:

15
Primal:
Maximize f (X) = cX
subject to AX ≤ b X ≥ 0

Dual:
minimize g(W ) = W b
Subject to W A ≥ c, W ≥ 0

Where c = (c1 , c2 , ..., cn ), X = (x1 , x2 , ..., xn )T , W = (w1 , w2 , ..., wm ), A = (aij ), i =


1, 2..., n, j = 1, 2, ..., m b = (b1 , b2 , ..., bm )T
Find the dual of the following linear programs:

(i) Minimize 2x1 − 3x2


Subject to
2x1 − x2 − x3 ≥ 3
x1 − x2 + x3 ≥ 2
x1 , x2 , x3 ≥ 0
maximize 3w1 + 2w2
Subject to
2w1 + w2 ≤ 2
−w1 − w2 ≤ −3
−w1 + w2 ≤ 0
w1 , w2 ≥ 0
then solve the dual graphically.
(ii) Maximize f = 5x − 2y
Subject to
3x + y ≤ 7
4x − 2y ≤ 3
x, y ≥ 0
(iii) Minimize f = 7x + y
subject to
3x − 4y ≤ 7
x+y ≥3
x, y ≥ 0

If the constraint is an equation instead of an inequality then the dual take the usual form ,
except that the dual variable associated with the equation is now unconstrained.(Exercise).
If one of the variables in the primal is unrestricted then the dual constraint corresponding
to that variable is an equation.
Consider the LP problem
Maximize 2x1 + x2
Subject to x1 + x2 = 2
2x1 − x2 ≥ 3
x1 − x2 ≤ 1
x1 ≥ 0 x2 unrestricted
We replace x2 by x02 − x002 , where x02 , x002 ≥ 0. The LP becomes:
Maximize 2x1 + x002 − x002

16
Subject to
x1 + x02 − x002 = 2
−2x1 + x02 − x002 ≤ −3
x1 − x02 + x002 ≤ 1
x1 , x02 , x002 ≥ 0
The dual becomes
Minimize 2w1 − 3w2 + w3
Subject to
w1 − 2w2 + w3 ≥ 2
w1 + w2 − w3 ≥ 1
−w1 − w2 + w3 ≥ −1
w2 , w3 ≥ 0, w1 unrestricted
Which is the same as
Minimize 2w1 − 3w2 + w3
Subject to
w1 − 2w2 + w3 ≥ 2
w1 + w2 − w3 = 1
w2 , w3 ≥ 0, w1 unrestricted

Theorem 6 Duality Theorem If a linear program has an optimal solution then so does its
dual. Furthermore , the optimal values of the two programs are the same.
If either program has an unbounded optimal solution then then the other has no feasible
solution.

Example 12 Solve the following linear programming problem by solving its dual graphical-
ly.
Maximize 24x1 + 42x2 + 36x3
Subject to
4x1 + 2x2 + x3 ≤ 5
3x1 + 3x2 + 4x3 ≤ 2
x1 , x2 , x3 ≥ 0

Solution:
Dual:
minimize 5w1 + 2w2
Subject to
4w1 + 3w2 ≥ 24
2w1 + 3w2 ≥ 42
w1 + 4w2 ≥ 36
w1 , w2 ≥ 0
Corner Objective function
(0,14) 5(0)+2(14)=28
(10,0) 5(12)+2(6)=72
(9,2) 5(36)+2(0)=180

Minimum value =28, Therefore Maximum value of the primal is 28.

17
Exercises

1. Consider the LP
Maximize −2x1 + 6x2
Subject to
x1 + x2 ≥ 2
−x1 + x2 ≤ 1
x1 , x2 ≥ 0
(a) (i) Is (2, 3) a feasible point of the above LP? What is the value of the objective
function at (2, 3)?
(ii) Solve the the above LP graphical method.
(iii) What can you say about the solution to the dual of this LP problem?
b) Find the dual of the above LP problem. Solve the dual to confirm your answer
to (a)(iii) above.
2. Consider the LP problem,
Maximize 5x + 2y
subject to
4x − y = 3
x+y ≥5
x, y ≥ 0 Find the dual the above LP problem showing clearly why the dual variable
corresponding to the first constraint is unrestricted.

18
4 Simplex method
This method is used to solve LP problems which contain two or more variables.

Before we start applying the Simplex method the following terminologies must be known:

• Basic Variables (BV), are the variables with coefficients One in the equations and
Zero in the other equations.
• Non Basic Variables (NBV), are the variables which coefficients are taking any of
the values, whether positive or negative or zero.
• Slack, Surplus and Artificial variables.

(i) If the inequality be ≤ (less than or equal), then we add a slack variable + s to
change ≤ to =.
(ii) If the inequality be ≥ (greater than or equal), then we subtract a surplus variable
- s to change ≥ to =.
(iii) If we have = we use artificial variables.

NB: Min f (x) = −Max(−f (x))

The general LP problem can be written in matrix notation as


Maximize f(X)=cX
subject to AX = b, X ≥ 0

where c = (c1 , c2 , ..., cn ), X = (x1 , x2 , ..., xn )T , A = (aij ), i = 1, 2..., m, j = 1, 2, ..., n b=


(b1 , b2 , ..., bm )T
Definitions:

• A feasible solution to the LP problem is a vector X = (x1 , x2 , ..., xn ) which satisfies


the constraints.
• A basic solution is a solution obtained by setting n−m variables equal to 0 and solving
for the remaining m variables. The m variables are called basic variables.
• A basic feasible solution is a basic solution which also satisfies xj ≥ 0, j = 1, 2, ..., n.

19
4.1 Algorithm: Simplex Method for Maximization Problem

Before you begin the algorithm make sure the LPP is in standard form. Then:

1. Choose the variable with the greatest Cj − Zj > 0 to enter the solution.

2. Determine the row to be replaced by selecting the one with smallest (non-negative)
ratio of quantity to pivot column.
3. Calculate the new values for the pivot row.
4. Calculate the new values for the other rows.

5. Calculate the Cj and Cj − Zj values for the tableau. If there are any Cj − Zj > 0,
return to step 1.
6. Optimality condition. If all Cj − Zj ≤ 0, then the optimal solution for the maxi-
mization problem has been attained. If all Cj − Zj ≥ 0, then the optimal solution for
the maximization problem has been attained.

To calculate Zj we use the formula


n
X
Zj = (CB )i · (aij ).
i=1

Example 13 Maximize profit = 45x1 + 80x2


subject to:
5x1 + 20x2 ≤ 400
10x1 + 15x2 ≤ 450
x1 , x2 ≥ 0.

This is converted to : Maximize profit = 45x1 + 80x2


subject to:
5x1 + 20x2 + s1 = 400
10x1 + 15x2 + s2 = 450
x1 , x2 , s1 , s2 ≥ 0,

where we have added the slack variables s1 and s2 . To find the basic variables we pick
from each main constraint one variable that occurs only in that equation and which has
coefficient 1.

45 80 0 0
CB Basis x1 x2 s1 s2 Soln Ratio
400
0 s1 5 20 1 0 400 20= 20
450
0 s2 10 15 0 1 450 15= 30
Zj 0 0 0 0 0
Cj − Zj 45 80 0 0

x2 entering variable and s1 leaving variable.

20
45 80 0 0
cB Basis x1 x2 s1 s2 Soln Ratio
1 1 20
80 x2 4 1 20 0 20 1/4 = 80
25 3 150
0 s2 4 0 −4 1 150 25/4 = 24
Zj 20 80 4 0 1600
Cj − Zj 25 0 -4 0
x1 entering variable and s2 leaving variable.

45 80 0 0
cB Basis x1 x2 s1 s2 Soln Ratio
2 1
80 x2 0 1 25 − 25 14
3 4
45 x1 1 0 − 25 25 24
zj 45 80 1 4 2200
zj − cj 0 0 -1 -4
All Cj − Zj ≤ 0, so we have reached a maximum solution. x1 = 24, x2 = 14, s1 =
0, s2 = 0, P = 80(14) = 45(24) = 2200

Exercise 4 Maximize z = 3x1 + 2x2 + x3


subject to:
2x1 + x2 + x3 ≤ 150
2x1 + 2x2 + 8x3 ≤ 200
2x1 + 3x2 + x3 ≤ 320
x1 , x2 , x3 ≥ 0.

4.2 Simplex Method for Minimization Problem

There are two different ways that the Simplex algorithm can be used to solve minimization
problems. We would illustrate these algorithms by solving the following LP:

Example 14 min z = 2x1 − 3x2


s.t. x1 + x2 ≤ 4
x1 − x2 ≤ 6
x1 , x2 ≥ 0.

4.2.1 Algorithm 1

The optimal solution to the LP is the point (x1 , x2 ) in the feasible region for LP that makes
z = 2x1 − 3x2 the smallest. Alternatively, we may say the optimal solution to the LP is the
point in the feasible region that makes −z = −2x1 + 3x2 the largest. This implies, we may
find the optimal solution to the minimization problem by using

min f (x) = −max (−f (x)).

21
4.2.2 Algorithm 2

A simple modification of the Simplex algorithm under maximization problem can also be
used to solve minimization problems. Thus,

1. Choose the variable with the least Cj − Zj < 0 to enter the solution.
2. Determine the row to be replaced by selecting the one with smallest (non-negative)
ratio of quantity to pivot column.
3. Calculate the new values for the pivot row.
4. Calculate the new values for the other rows.
5. Calculate the Cj and Cj − Zj values for the tableau. If there are any Cj − Zj < 0,
return to step 1.
6. Optimality condition. If all Cj − Zj ≥ 0, then the optimal solution for the maxi-
mization problem has been attained. If all Cj − Zj ≥ 0, then the optimal solution for
the maximization problem has been attained.

Example 15 Solve the LPP using Simplex method:


min : z = 2x1 − 3x2 + 6x3
s.t.: 3x1 − x2 + 2x3 ≤ 7
2x1 + 4x2 ≥ −12
−4x1 + 3x2 + 8x3 ≤ 10.

Example 16 Solve the following LP problem by simplex method.


min P = −4x1 + 3x2 − 2x3 (7)
s.t: 2x1 + x2 + x3 ≤ 12 (8)
− x1 + 2x2 + 3x3 ≤ 9 (9)
3x1 + 4x2 − x3 ≤ 6. (10)

Soln
We add slack variables to get
Minimize P = −4x1 + 3x2 − 2x3 + 0s1 + 0s2 + 0s3
subject to:
2x1 + x2 + x3 + s1 = 12
−x1 + 2x2 + 3x3 + s2 = 9
3x1 + 4x2 − x3 + +s3 = 6.

The initial tableau is


-4 3 -2 0 0 0
cB Basis x1 x2 x3 s1 s2 s3 Soln Ratio
0 s1 2 1 1 1 0 0 12
0 s2 -1 2 3 0 1 0 9
0 s3 3 4 -1 0 0 1 6
Zj 0 0 0 0 0 0 0
C j − Zj -4 3 -2 0 0 0

22
choose the most negative of Cj − Zj which is −4 and the least nonnegative ratio. Thus x1
enters and s3 leaves.

-4 3 -2 0 0 0
cB Basis x1 x2 x3 s1 s2 s3 Soln Ratio
0 s1 0 − 53 5
3 1 0 − 23 8 24/3=8
10 8 1 33
0 s2 0 3 3 0 1 3 11 8
4
-4 x1 1 3 − 13 0 0 1
3 2 -
Zj -4 − 16
3
4
3 0 0 − 43 -8
25
C j − Zj 0 3 − 10
3 0 0 4
3

-4 3 -2 0 0 0
cB Basis x1 x2 x3 s1 s2 s3 Soln Ratio
0 s1 0 − 15
4 0 1 − 85 − 87 9
8
5 3 1 33
-2 x3 0 4 1 0 8 8 8
7 1 3 27
-4 x1 1 4 0 0 8 8 8
Zj -4 − 21
2 -2 0 − 54 −1 − 87
4
27 5
C j − Zj 0 2 0 0 4 1

All the Cj − Zj ≥ 0, we have reached the optimal solution.


x1 = 27
8 , x2 = 0, x3 = 33
8 , s1 = 98 , s2 = 0, s3 = 0.
Minimum = −4( 8 ) + 3(0) − 2( 33
27 87
8 )=− 4 .

4.2.3 Unbounded Solution

Consider the LPP:

maximize P = 2x1 + x2
Subject to:
−x1 + x2 ≤ 1
x1 − 2x2 ≤ 2
x1 , x 2 ≥ 0

This can be written as

Minimize −2x1 − x2
Subject to −x1 + x2 + s1 = 1
x1 − 2x2 + s2 = 2
x1 , x 2 , s 1 , s 2 ≥ 0

The initial tableau is

23
-2 -1 0 0
cB Basis x1 x2 s1 s2 RHS Ratio
0 s1 -1 1 1 0 1
0 s2 1 -2 0 1 2
Zj 0 0 0 0 0
C j − Zj -2 -1 0 0

x1 enters the basis and s2 leaves.


-2 -1 0 0
cB Basis x1 x2 s1 s2 RHS Ratio
0 s1 0 -1 1 1 1 -
-2 x1 1 -2 0 1 2 -
Zj -2 4 0 -2 -4
C j − Zj 0 -5 0 2

x2 must enter the basis, but there is no ratio to compute. When this happens then the LP
has unbounded solution.

4.2.4 Alternate solutions

minimize P = −x1 − 12 x2
Subject to:
2x1 + x2 + s1 = 4
x1 + 2x2 + s2 = 3
x1 , x 2 , s 1 , s 2 ≥ 0

-1 − 21 0 0
cB Basis x1 x2 s1 s2 RHS Ratio
0 s1 2 1 1 0 4
0 s2 1 2 0 1 3
Zj 0 0 0 0 0
C j − Zj -1 − 12 0 0

x1 enters the basis, and s1 leaves.

-1 − 21 0 0
cB Basis x1 x2 s1 s2 RHS Ratio
1 1
-1 x1 1 2 2 0 2
3
0 s2 0 2 − 21 1 1
Zj -1 − 12 − 12 0 -2
1
C j − Zj 0 0 2 0

All Cj − Zj ≥ 0, therefore we have reached an optimum solution. The solution is x1 =


2, s2 = 1, x2 = s1 = 0, P = −2. x2 is not in the basis, but C2 − Z2 = 0 and so if x2 is
introduced in the basis it will not change the value of the objective function. If x2 enters
the basis then s2 leaves and this leads to

24
-1 − 12 0 0
cB Basis x1 x2 s1 s2 RHS Ratio
2 1 5
-1 x1 1 0 3 3 3
− 21 x2 0 1 − 13 2
3
2
3
Zj -1 − 12 − 12 0 -2
1
Cj − Zj 0 0 2 0
We get another optimal solution x1 = 53 , x2 = 32 , s1 = s2 = 0, P = −2.

4.2.5 Degeneracy

maximize P = 2x1 + x2
Subject to
3x1 + x2 ≤ 6
x1 − x2 ≤ 2
x2 ≤ 3
x1 , x 2 ≥ 0

This can be written as

Minimize −2x1 − x2
Subject to 3x1 + x2 + s1 = 6
x1 − x2 + s2 = 2
x2 + s3 = 3
x1 , x 2 , s 1 , s 2 , s 3 ≥ 0

The initial tableau is

-2 -1 0 0
cB Basis x1 x2 s1 s2 s3 RHS Ratio
0 s1 3 1 1 0 0 6
0 s2 1 -1 0 1 0 2
0 s3 0 1 0 0 1 3
Zj 0 0 0 0 0 0
C j − Zj -2 -1 0 0 0

x1 enters the basis and s2 leaves

-2 -1 0 0
cB Basis x1 x2 s1 s2 s3 RHS Ratio
0 s1 0 4 1 -3 0 0
-2 x1 1 -1 0 1 0 2
0 s3 0 1 0 0 1 3
Zj -2 2 0 -2 0 -4
C j − Zj 0 -3 0 2 0

The basic solution is x1 = 2, s1 = 0, s3 = 3, x2 = s2 = 0, P = −4


Note that this basic solution has a basic variable s1 which is equal to zero. When this occurs

25
we say that the basic solution is degenerate.

x2 enters the basis and s1 leaves.

-2 -1 0 0 0
cB Basis x1 x2 s1 s2 s3 RHS Ratio
1
-1 x2 0 1 4 − 43 0 0
1 1
-2 x1 1 0 4 4 0 2
0 s3 0 0 − 14 3
4 1 3
Zj -2 -1 − 34 1
4 0 -4
3
C j − Zj 0 0 4 − 41 0

s2 enters the basis and s3 leaves.

-2 -1 0 0 0
cB Basis x1 x2 s1 s2 s3 RHS Ratio
-1 x2 0 1 0 0 1 3
1
-2 x1 1 0 3 0 − 31 1
0 s2 0 0 − 13 1 4
3 4
Zj -2 -1 − 23 0 − 13 -5
C j − Zj 0 0 − 23 0 − 13

All Cj − Zj ≥ 0, therefore we have reached an optimum solution. The solution is x1 =


1, x2 = 3, s2 = 4, s3 = s1 = 0, P = −5.

Exercise 5 1. Suppose the following tableau was obtained in the course of solving a lin-
ear program with nonnegative variables x1 ; x2 ; x3 and two inequalities. The objective
function is maximized and slack variables s1 and s2 were added.
cB Basis x1 x2 x3 s1 s2 RHS Ratio
? 0 -2 2 1 3 c
? 1 -1 3 0 -5 3
C j − Zj 0 a b 0 4 82

Give conditions on a, b and c that are required for the following statements to be true:

(i) The current basic solution is a feasible basic solution.


Assume that the condition found in (i) holds in the rest of the exercise.
(ii) The current basic solution is optimal.
(iii) The linear program is unbounded (for this question, assume that b > 0).
(iv) The current basic solution is optimal and there are alternate optimal solutions
(for this question, assume a > 0).

26
2. Consider the linear program Maximize 5x1 + 3x2 + x3
Subject to
x1 + x2 + x3 ≤ 6
5x1 + 3x2 + 6x3 ≤ 15
x1 , x2 , x3 ≥ 0.

and an associated tableau

cB Basis x1 x2 x3 s1 s2 Soln Ratio


? 0 0.4 -0.2 1 -0.2 3
? 1 0.6 1.2 0 0.2 3
C j − Zj 0 0 5 0 1 15

(a) What basic solution does this tableau represent? Is this solution optimal? Why
or why not?
(b) Does this tableau represent a unique optimum. If not, find an alternative optimal
solution.

27
5 Artificial Basis Technique(Big M method)
So far the LP problem had an initial basis which was introduced by the slack variables.
If the constraints have ”≥” instead of”≤”, then to convert to an equation you subtrac-
t some positive quantity from the left hand side. The coefficient of that will now be -1
and so it can not be a basis. To introduce a basis in this case we add to each constraint
an artificial variable and assign a very large positive coefficient to it in the objective function.

5.1 Algorithm
• Modify the constraints so that the right hand side of each constraint is non-negative.
This requires that each constraint with negative right-hand side be multiplied by −1.
• Identify each constraint that is now an = or ≥. We will add an artificial variable to
each of these constraints. This means if constraint i is a ≤ constraint , we add the
slack variable si , and if constraint i is a ≥ constraint, we subtract an excess variable
ei .

• If constraint i is a ≥ or = constraint, add an artificial variable ai , also add the sign


restriction ai ≥ 0.
• Let M denote a very large positive number. If the LP is a min problem, add (for each
artificial variable) M ai to the objective function. If the LP is a max problem, add (for
each artificial variable) −M ai to the objective function.

• In choosing the entering variable, remember the M is a very large positive number.
For example, 4M − 2 is more positive than 3M − 900, and −6M − 5 is more negative
than −5M − 40. Now solve the transformed problem by the simplex. If all artificial
variables are equal to zero in the optimal solution, then we have found the optimal
solution to the original problem. If any artificial variables are positive in the optimal,
then the original problem is infeasible.

When the artificial variable leaves the basis, its column may be dropped from future tableau
because the purpose of an artificial variable is only to get a starting basic feasible solution.
Once an artificial variable leaves the basis, we no longer need it. Despite, this fact we may
keep them for future purposes.

28
Example 17 Minimize 2x1 + x2
Subject to:
3x1 + x2 ≥ 3
4x1 + 3x2 ≥ 6
x1 + 2x2 ≥ 2
x1 x2 ≥ 0.

First convert the inequality to equality by subtracting a positive quantities e1 , e2 and e3


from the left hand side. Form a basis by adding artificial variables a1 , a2 and a3 .
The program becomes: Minimize 2x1 + x2 + 0e1 + 0e2 + 0e3 + M a1 + M a2 + M a3
Subject to
3x1 + x2 − e1 + a1 = 3
4x1 + 3x2 − e2 + a2 = 6
x1 + 2x2 − e3 + a3 = 2
x1 x2 , e1 , e2 , e3 , a1 , a2 , a3 ≥ 0

Initial Step
2 1 0 0 0 M M M
cB Basis x1 x2 e1 e2 e3 a1 a2 a3 Soln Ratio
M a1 3 1 -1 0 0 1 0 0 3
M a2 4 3 0 -1 0 0 1 0 6
M a3 1 2 0 0 -1 0 0 1 2
Zj 8M 6M -M -M -M M M M 11M
C j − Zj 2-8M 1-6M M M M 0 0 0

Step 2
2 1 0 0 0 M M M
cB Basis x1 x2 e1 e2 e3 a1 a2 a3 Soln Ratio
1
2 x1 1 3 - 13 0 0 0 0 1
5 4
M a2 0 3 3 -1 0 1 0 2
5 1
M a3 0 3 3 0 -1 0 1 1
10 2 5 2
Zj 2 3 M + 3 3M − 3 -M -M M M 3M+2
1 10 2 5
C j − Zj 0 3 − 3 M 3 − 3M M M 0 0

Step 3
2 1 0 0 0 M M M
cB Basis x1 x2 e1 e2 e3 a1 a2 a3 Soln Ratio
2 x1 1 0 − 25 0 1
5 0 4
5
M a2 0 0 1 -1 1 1 1
1
1 x2 0 1 5 0 − 35 0 3
5
3
Zj 2 1 M− 5 -M M − 15 M M+ 7
5
3 1
C j − Zj 0 0 5 −M M 5 −M 0

29
Step 4
2 1 0 0 0 M M M
cB Basis x1 x2 e1 e2 e3 a1 a2 a3 Soln Ratio
2 x1 1 0 − 53 1
5 0 3
5
0 e3 0 0 1 -1 1 1
4
1 x2 0 1 5 − 53 0 6
5
Zj 2 1 − 25 − 15 0 12
5
2 1
C j − Zj 0 0 5 5 0
All the Cj − Zj ≥ 0 we have reached the optimal solution. x1 = 35 , x2 = 65 , e1 = 0, e2 =
0, e3 = 1

Exercise 6 Maximize P = x1 + 2x2 + 3x3 − x4


Subject to:
x1 + 2x2 + 3x3 = 15
2x1 + x2 + 5x3 = 20
x1 + 2x2 + x3 + x4 = 10
x1 x2 , x3 , x4 ≥ 0

In class!!!!!

30
6 Transportation Problem
A product is to be shipped in amounts a1 , a2 , ..., am respectively from m shipping origins
and received in amounts b1 , b2 , ..., bn respectively by each n shipping destinations.
The cost of shipping a unit amount from the ith origin to the j th destination is cij and is
known for all combinations (i,j). We want to determine the amounts xij to be shipped over
all routes (i,j) so as to minimize the cost of transportation.

D1 D2 D3 ... Dn Supplies
O1 C11 C12 C13 ... C1n a1
O2 C21 C22 C23 ... C2n a2
O3 C31 C32 C33 ... C3n a3
.. .. .. .. .. .. ..
. . . . . . .
Om Cm1 Cm2 Cm3 ... Cmn am
Demands b1 b2 b3 ... bn

Let xij be the amount of the the product shipped from origin i to destination j. The xij are
the unknown shipments to be determined. The problem can be stated as an LP problem as

Pm Pn
Minimize C(x11 , x12 , ..., xmn ) = i=1 j=1 cij xij
Subject
Pn to
Pmj=1 ij = ai ,
x i = 1, 2, ..., m
i=1 xij = bj , j = 1, 2, ..., n
and xij ≥ 0.

We consider a balanced transportation problem ie a problem where supply is equal to de-


mand. i.e
m
X X n
ai = bj .
i=1 j=1

Theorem 7 The balanced transportation problem has a feasible solution.

m n
X X ai bj
Proof 4 Since ai = bj = A, then we have a feasible solution xij = for all (i,j).
i=1 j=1
A
Each xij ≥ 0 and
n n n
X X ai bj ai X ai
xij = = bj = · A = ai
j=1 j=1
A A j=1
A
m m n
X X ai bj bj X bj
xij = = ai = · A = bj
i=1 i=1
A A i=1 A

Example 18 The Philips drugs company has three warehouses denoted by W1 , W2 , and
W3 . It sells primarily to four major distributors, D1 , D2 , D3 and D4 .Due to different
modes of transportation and to the different distances involved, the cost of shipping a truck
load of drugs from the different ware houses to the different markets vary and are given in
the following table.

31
D1 D2 D3 D4 Supplies
W1 22 36 24 23 10
W2 31 19 32 26 40
W3 25 25 16 22 50
Demands 20 30 30 20
Determine the shipping plan that minimizes the cost.

Problem formulation
Let xij be the amount shipped from warehouse i to distributor j.
Minimize C = 22x11 + 36x12 + 24x13 + 23x14 + 31x21 + 19x22 + 32x23 + 26x24 + 25x31 +
25x32 + 16x33 + 22x34
Subject to
x11 + x12 + x13 + x14 = 10
x21 + x22 + x23 + x24 = 40
x31 + x32 + x33 + x34 = 50
x11 + x21 + x31 = 20
x12 + x22 + x32 = 30
x13 + x23 + x33 = 30
x14 + x24 + x34 = 20
xij ≥ 0

NB: Here m = 3 and n = 4. equation 1 is redundant because if you subtract equation 2


and 3 from the sum of the last 4 equations you get equation 1. So you can ignore it from
the system. This meas that the transportation problem reduces to m + n − 1 independent
equations in mn unknowns.

Theorem 8 A solution of at-most m + n − 1 positive xij ’s exist.

Constructing a feasible solution(minimum entry method)

1. Go to the minimum entry in the cost matrix, say cij , and circle it. Ship as much as
you can from warehouse i to market j.
2. Adjust supply and demand to account for the shipment.
3. Cross out the row or column no longer in use as a result of the shipment(cross out
only one!).
4. Repeat the procedure using remaining cost matrix. Continue until you are down to
one raw or column. The remaining shipments will be determine by the remaining
supplies and demand.

D1 D2 D3 D4
W1 22 10 36 24 23 10
W2 31 10 19 30 32 26 0 40
W3 25 25 16 30 22 20 50
20 30 30 20
Therefore the initial shipment is: x11 = 10, x21 = 10, x22 = 30, x33 = 30, x24 = 0, x34 = 20

32
Example 19 Find an initial basic feasible solution using the minimum entry method for
each of the following transportation problems.
4 2 6 10
5 10 5 4 8 10 20
3 5 9 20
(a) 10 20 15 (b) 5 3 4 20 (c)
8 6 1 30
10 10 5 20 15
20 10 30
5 8 10 10 6 2 8 10 8 9 12 5
4 2 3 10 4 1 5 15 13 14 25 10
(d) (e) (f )
8 9 1 10 3 7 6 20 3 2 1 15
5 5 20 5 20 20 15 10 5

Introducing cells in the basis


Consider the Philips drug store company problem. Using the minimum entry method we
constructed the the initial feasible solution:
D1 D2 D3 D4
W1 22 10 36 24 23 10
W2 31 10−s 19 30 32 26 0+s 40
W3 25s 25 16 30 22 20−s 50
20 30 30 20

Cost=22(10)+31(10)+19(30)+26(0)+16(30)+22(20)=2020.

Is this an optimal solution? No!

To see this consider the effect of introducing cell (3,1)into the basis, i.e ship s units from
W3 to D1 . Where are these going to come from? from either (3,3) or (3,4), choose (3,4).
only 20 − s is being shipped to D4 but the demand is 20. To meet this demand s more
units are shipped via some circled cell in column 4. i.e (2,4)-s units from W2 to D4 . But
W2 is empty, so we need to take from some shipment in row 2, either from (2,1) or (2,2).
We choose (2,1).

Note: The cells where the shipment were adjusted form a ’cycle’, that is a path using circled
cell and a boxed cell that begins and ends in the same cell.

What did the adjustments do to our shipping cost? Change in shipping cost is:
25s − 22s + 26s − 31s = −2s

Introducing cell(3,1) decreased our cost by 2s, to get the largest possible decrease in
cost we should make s as large as possible. But all shipments must remain positive so
20 − s ≥ 0, 10 − s ≥ 0. The most s can be is 10. We get our new adjusted tableau as:

D1 D2 D3 D4
W1 22 10 36 24 23 10
W2 31 19 30 32 26 10 40
W3 25 10 25 16 30 22 10 50
20 30 30 20

33
Introducing cell (3,1) the transportation cost by 2s. In general introducing a cell results
in a change in the cost by some number k s. The number k is called the cycle value. So
introducing cell (3,1) into the basis resulted in a cycle value of -2.
Getting back to our original problem, suppose we introduced cell (1,2).
D1 D2 D3 D4
W1 22 10−s 36 s 24 23 10
W2 31 19 30−s 32 26 10+s 40
W3 25 10+s 25 16 30 22 10−s 50
20 30 30 20
Change in shipment cost is 36s − 22s + 25s − 22s + 26s − 19s = 24s
Examples
Find the new basis and the cost of the new shipment resulting from introducing the given
cell in the basis. Compare cost associated with the original shipment with that of the new
shipment. Which has lower cost?
6 5 12 3 8
(a) 10 20 10 10 Introduce cell (2,1)
5 13

2 6 8 16 9 15
(b) 3 5 5 4 15 20 Introduce cell (2,1)
6 5 24

8 8 6 2 10 10
3 2 3 9 6 9
(c) Introduce cell (3,3)
5 7 6 3 7
15 5 6

34
Finding Optimal Solution(The u-v method)
The method gives all the cycle values at once and hence we can tell whether the solution is
optimal or not.
Consider the transportation problem:

M1 M2
W1 C11 C12 a1
W2 C21 C22 a2
b1 b2
Assume that the total supply=total demand.
As an LP problem this becomes
Minimize u = c11 x11 + c12 x12 + c21 x21 + c22 x22
Subject to
x11 + x12 = a1
x21 + x22 = a2
x11 + x21 = b1
x12 + x22 = b2
xij ≥ 0

The dual of the problem is


Maximize W = a1 u1 + a2 u2 + b1 v1 + b2 v2
Subject to
u1 + v1 ≤ c11
u1 + v2 ≤ c12
u2 + v1 ≤ c21
u2 + v2 ≤ c22
ui vj are unrestricted To covert the inequalities to equality we add slack variables dij .
Recall the slackness condition dij ≥ 0. The equations can be written as dij = cij − (ui + vj ).
Therefore for feasibility we must have dij ≥ 0 or cij − (ui + vj ) ≥ 0 or c∗ij ≥ 0

• Assign a number ui to each row and vj to each column. This numbers are chosen such
that for each circled cell ui + vj = cij
• For each uncircled cell cij compute the quantity c∗ij = cij − (ui + vj ). c∗ij is the cycle
value of the cell (i,j).
• If all c∗ij ≥ 0 then we are at the optimal solution.

• If some c∗ij ≤ 0 introduce in the basis with the most negative c∗ij .
• Check if the new basic solution is optimal. Repeat the above procedure until all c∗ij
are non negative. At this point we have reached an optimal solution.

Example

The shipping costs per unit, and the supplies and demands in a transportation problem are
given in the following table.

35
M1 M2 M3 Supply
W1 6 2 8 10
W2 3 14 4 20
W3 10 6 12 15
Demand 10 20 15
Find the cheapest way of shipping the goods so as to meet the demands.
Solution
First find an initial solution by the minimum entry method. NB: n = 3 and m = 3,
m + n − 1 = 3 + 3 − 1 = 5.

M1 M2 M3
W1 6 2 10 8 10
W2 3 10 14 4 10 20
W3 10 6 10 12 5 15
10 20 15
7 2 8
0 6 s 2 10−s 8 10
-4 3 10−s 14 4 10+s 20
4 10 6 10+s 12 5−s 15
10 20 15
c∗11 = 6 − (7 + 0) = −1
c∗13 = 8 − (8 + 0) = 0
c∗22 = 14 − (−4 + 2) = 12
c∗31 = 10 − (7 + 4) = −1
We introduce cell c11 in the basis with s = 5, the new tableau becomes

6 2 7
0 6 5 2 5 8 10
-3 3 5 14 4 15 20
4 10 6 15 12 15
10 20 15
c∗13 = 8 − (7 + 0) = 1
c∗22 = 14 − (2 − 3) = 15
c∗31 = 10 − (6 + 4) = 0
c33 = 12 − (7 + 4) = 1
All c∗ij ≥ 0, so this is our optimal solution. x11 = 5, x12 = 5, x21 = 5, x23 = 15, x32 = 15

Example
Solve the Philips drugs Company of Example(?)

36
Unbalanced transportation problems
Some
Pm problemsPn have the supply being greater than the demand ie Pm
i=1 ai > j=1 bj . If this happens then form a fictitious market whose demand is i=1 ai −
Pn
j=1 bj to cater for the difference, and transportation costs to this market is assigned as
zeros. For example if m=3 and n=3 we get

M1 M2 M3 M4 Supplies
W1 C11 C12 C13 0 a1
W2 C21 C22 C23 0 a2
W3 C31 C32 C33 P 0P a3
Demands b1 b2 b3 ai − bj
Pn
Similarly
Pm if the the demand is more than the supply we create fictitious origin with i=1 bj −
a
i=1 i items and the costs of transporting from this origin are zeros.
M1 M2 M3 Supplies
W1 C11 C12 C13 a1
W2 C21 C22 C23 a2
W3 C31 C32 C33 P a3 P
W4 0 0 0 bj − ai
Demands b1 b2 b3
The problem can then be solved just like a balanced transportation problem.
Example
Pure Sand & Gravel Inc has contracts to transport solid fill in the next week to each of the
three cities D1 , ; D2 , and D3 in which new high schools are to be built. At D1 200 loads of
fill are required, while at D2 150 loads are needed and at D3 only 60 loads. The company
has storage pits in each of two cities S1 and S2 which can supply solid fill at a limited weekly
rate. In particular S1 can supply up to 275 loads per a week and S2 can supply up to 175
loads per week. Furthermore the delivery cost per truck load depends on the respective
delivery source and the respective delivery destination. Specifically a truckload can be de-
livered from S1 to D1 at a cost of $30, to D2 at a cost of $50, and to D3 at a cost of $70. On
the other hand the cost per truckload from S2 to D1 is $20, to D2 is $60, and to D3 is $40.
Find how many truckloads the company should transport from each source to each desti-
nation in order to minimize the the total cost of transportation. What is this minimum cost?

37
Game Theory
A game is a set of rules.
Play/move– a certain realization of the rules.
Consider a game in which there are two players, Player 1 (P1) and Player 2 (P2), each of
whom have certain moves that he/she can make.
Each move results in a payoff(+ve or -ve). The payoff to the players are opposites ie when
P1 wins P2 loses and vise versa. The sum of their payoff is zero. Such a game is called a
two person zero sum game.
Such games are easily described using payoff matrices. This is a matrix whose rows repre-
sents moves for player 1 and columns represents moves for player 2. The entry in the ith row
and jth column represents the payoff to player 1 resulting from P1 making the move that
correspond to the ith row and P2 making the move that corresponds to the jth column. If
the entry is positive, its a gain for P1(loss for P2) and if it is negative its a loss for P1(gain
for P2)

Example Heads and Tails(Spinning)


We will call the players P1 and P2. P1 chooses heads(H) or Tails(T), independently, P2
chooses H or T. If they choose the same, P1 pays P2 one pula. Otherwise P2 pays P1 one
pula. The payoff matrix is
P2
 
−1 1
P1
1 −1
Example
Player 1 picks the number 1, 2 or 3 and writes it down. Player 2 guesses at the number
player 1 wrote down without seeing it. If he guesses correctly , then he wins one pula. If he
guesses incorrectly, then he losses two pula. The payoff matrix is
 
−1 2 2
P 1  2 −1 2 
2 2 −1

Analyzing games
Assumptions

1. Our players are rational, ie they play to win the most or lose the least (if they must
lose).
2. Players are inteligent and conservative. They play to minimize the worst possible
damage.

Example
Consider the game whose payoff matrix is
 
4 −2 3
P 1  −8 −3 5 
5 −1 2

If P1 chooses row1, then he can gain 4, lose 2 or gain 3 depending on which column P2
chooses. He assumes the worst ie he loses 2. If P1 chooses row 2 he can lose 8, lose 3 or
win 5. He will assume he will lose 3. If P1 chooses row 3, then he can win 5, lose 1 or win
2. The worst case is he will lose 2. So P1 chooses the minimum entry in each row which

38
represents the worst case. Then he picks the largest of the [Link] he plays a maxmin
approach.
Player2:
playing column 1 =⇒ lose 4, win 8,lose 5. The worst is that he will lose 5 which is the
maximum of the column.
Playing column 2 =⇒ win 2, win 3 or win 1. The worst is that he will win 1(maximum in
the column).
playing column 3 =⇒ lose 3, lose 5 or lose 2. worst is lose 5. Logically he must choose the
column with the smallest maximum.
If the pay off matrix has an entry that is the smallest in its rows and largest in its column,
then the game is said to have a saddle point; that entry is called the saddle point of the
game.
If a game has a saddle point, then it is in the best interest of the players to play the row or
column on which the saddle point lie.
Saddle point solution:
Let Rh and Ck be moves for P1 and P2 such that ahk is a saddle point, then (Rh , Ck , ahk )
is a solution to the game. ahk is the value of the game.
Example
Determine how each player should play to get his optimum long term return according to
the two assumptions mentioned above.

(a)  
4 1 −7
 3 2 5 
−3 0 2

(b)  
8 2 6
 4
 −1 3 

 −2 1 4 
5 −7 −3

Example
Write a payoff matrix for each of the following games. Determine which of games have a
saddle point.

(a) Player1 chooses from among the numbers 3, 4 and 5. Player 2 picks the numbers 1
or 2. The sum of the numbers is recorded. If the sum is even, then player one pays
player 2 the square of the sum in thebe. If the sum is odd, then Player 1 wins the
square of the sum in thebe.
(b) Player 1 puts out 1, 2 or 3 fingers. Player 2 does the same. If the number of fingers
each puts out is the same no one wins. If, however, the number of fingers is different,
the player putting out the larger number of fingers wins one pula.

(c) A player chooses a number s from the set {−1, 0, 1} and player B chooses a number t
from the sam set. After the choices have been disclosed, B pays to A the amount

s(t − s) + t(t + s)

(d)

39
Exa: Solve the matrix game
 
1 2 2
 0 3 −1 
0 −1 3

40
Games without saddle points
 
−2 5
Consider the game
9 −10
the game has no saddle point.
We say that the probability of an event E is p, where 0 ≤ p ≤ 1, if the proportion of the times
the event E occurs in the long run is p. eg tossing a die, the out comes are {1,2,3,4,5,6}.
the probability of getting 3 is 1/6.
Two events A and B are said to be independent if the occurrence of one does not affect the
other.
If A and B are independent then the probability that A and B occur is the probability that
A occurs times the probability that B occurs.
P (A and B) = P (A) · P (B)

Example

11 1
If I flip a coin and toss a die, then the probability of a head and a three is 26 = 12

Suppose we play a game in which I can win P 2, P 3 or P 4 with probability 1/3, 1/2 and
1/6 [Link] will be the average gain per game in the long run? 2(1/3) + 3(1/2) +
4(1/6) = 13/6

In two person sum zero game we define:

A mixed strategy for P1 is a row vector X = (x1 , x2 , ..., xm ) of non negative numbers xi
such that x1 + x2 + ... + xm = 1

A mixed strategy for P2 is a column vector Y = (y1 , y2 , ..., yn ) of non negative numbers yi
such that y1 + y2 + ... + yn = 1
The elements xi and yj represents the frequencies with which player 1 selects row i and
player 2 selects column j. eg (1/2, 1/2) (1/6, 5/6), (1/3, 1/2, 1/6)

A mixed strategy vector that has all zeros except one entry, which is 1, is called a pure
strategy. It represent a case where a player plays only one row(column) all the time. eg
(0,1), (1,0), (1,0,0)
The payoff function for Player 1 is defined to be
m X
X n
E(X, Y ) = xi aij yj
i=1 j=1
 
−2 5
Suppose we have the 2 × 2 game
9 −10
Suppose player 1 plays row 1 with probability 1/3 and row 2 with probability 2/3, while
Player 2 plays column 1 with probability 1/6 and column 2 with probability 5/6, what can
player 1 expect to gain in the long run?
Soln:
Here X = (1/3, 2/3) and Y = (1/6, 5/6)
expected gain for P1, E(X,Y)= 59 18 =expcted gain for P2.

41
A solution to the matrix game is a pair of mixed strategies X̄ and Ȳ such that E(X̄, Ȳ ) ≥ ν
for pure strategies j=1,2,3,...,n
E(X̄, Ȳ ) ≤ ν for pure strategies i=1,2,3,...,m
the strategies X̄ and Ȳ are called optimal strategies and ν is called the value of the game.
The matrix game can be expressed as an LP problem. The problem for Player 1is to find
strategy X which maximizes ν such that

a11 x1 + a21 x2 + ... + am1 xm ≥ ν


a12 x1 + a22 x2 + ... + am2 xm ≥ ν
..................................
am1 x1 + am2 + ... + amn xm ≥ ν

Exa: Matching pennies  


q 1−q
 p −1 1 
P1 
 1−p 1 −1 
1 − 2p 2p − 1

42

You might also like