Professional Documents
Culture Documents
STA 421 LNote
STA 421 LNote
2 3 3 1 0 10
= , = , = , = , = =
1 2 1 0 1 8
B=[ ] = 1 0 = = Identity matrix
0 1
= = =
Table 1
Basis constant Variable Pivot
to enter column
1 0 10
0 1 8
1
STA 421. Number:……………………………….
1 0
=[ , ]= = [−2 1] = [−2 1]
0 1
̅ − ̅ = 2
− = 6 − (−2 1) = 6 − (−3) = 9 ( )
1
̅ − ̅ = 3
− = 3 − (−2 1) = 3 − (−6 + 2) = 7
2
∴ enters the basis
1 0 2 2
Pivot column is = = =
0 1 1 1
Table 1
Basis constant Variable Pivot column
to enter
1 0 10 2
1
0 1 8
The pivot column enters table 1
Ratios are = 5, = 8, ℎ 5 1
Hence is the outgoing variable.
1
The pivot column must reduce to this is achieved by
0
× and − ×
Table 2
Basis constant Variable Pivot
to enter column
½ 0 5 1
−½ 1 3 0
1/2 0
= = [6 1]= [5/2 1]
− 1/2 1
3 13
̅ − ̅ = − = 3 − [5/2 1] = − = −
1 2
Optimal solution reached
5
= [6 1] = 33
3
= 5, = 3
= = =0
To check the optimality of this solution, we need
̅ − ̅ = −
̅ − ̅ = 3
− = 3 − [5/2 1] = −
2
̅ − ̅ = 3
− = 4 − [5/1 1] = − all< 0
1
1 9
̅ − ̅ = − = −2[5/2 1] = −
0 2
∴ Current solution is optimal
2
STA 421. Number:……………………………….
+ 2 + = 430
3 + 2 ≤ 460
+ ≤ 420
, , ≥0
Solution:
= 3 +2 +5 +0 +0 + 0
+2 + + = 430
3 +2 + ≤ 460
+ + ≤ 420
, , , , , ≥0
1 2 1 1 0 0 430
= 3 , = 0 , = 2 , = 0 , = 1 , = 0 = 460
1 4 0 0 0 1 420
Setting , = = =0
We get = 430, = 460, = 420
1 0 0
B= [ ]= 0 1 0
0 0 1
Table 1
Basis Constant Variable to enter Pivot column
1 0 0 430
0 1 0 460
0 0 1 420
1 0 0
Simplex multiplier = ( ) = [0 0 0] 0 1 0 = [0 0 0]
0 0 1
1
̅ − ̅ = − = 3 − [0 0 0] 3 = 3
1
2
̅ − ̅ = − = 2 − [ 0 0 0] 0 = 2
4
1
̅ − ̅ = − [
=2− 0 0 0 2 =5(] + )
0
(Because it is maximization problem)
1 0 0 1 1
∴ ℎ , = = 0 1 0 2 = 2
0 0 1 0 0
3
STA 421. Number:……………………………….
Table 1
Basis Constant Variable to enter Pivot column
1 0 0 430 1
0 1 0 460 2
0 0 1 420 0
1 0
∴ leave the basis. Now 2 must reduce to 1
0 0
This is done by
1
−
2
1
×
2
Table 2
Basis Constant Variable to enter Pivot column
0 −1/2 0 200 0
0 1/2 0 230 1
0 0 1 420 0
0 −1/2 0
= = [0 5 0] 0 1/2 0 = [0 5/2 0]
0 0 1
1 15 9
̅ − =3− = 3 − [0 5/2 0] 3 = 3 − = −
2 2
1
2
̅ − ̅ =2− = 2 − [0 5/2 0] 0 = 2 − 0 = 2 ( )
4
∴ enters
0 −1/2 0 2 0
= = 0 1/2 0 0 = 0 this is the pivot column
0 0 1 4 4
4
STA 421. Number:……………………………….
Table 2
Basis Constant Variable to enter Pivot column
0 −1/2 0 200 0
0 1/2 0 230 0
0 0 1 420 4
0 1/2 0 230
0 0 ¼ 105
0 −1/2 0
= = [0 5 2] 0 1/2 0 = [0 5/2 1/2]
0 0 1/4
1 15 1
̅ − ̅ =3− = 3 − [0 5/2 1/2] 3 = 3 − + = −5 = −
2 2
1
∴The optimal solution reached
0
Solution is = 0, = 105, = 230, = [0 5 2] 230 = 1360
105
0 5
̅ − ̅ =0− = 0 − [0 5/2 1/2] 1 = − = −
2
0
0 1
̅ − ̅ =0− = 0 − [0 5/2 1/2] 0 = − = −
2
1
Since all ̅ − ̅ ≤ 0,
∴Optimal solution achieved
5
STA 421. Number:……………………………….
INTEGER PROGRAMMING
INTRODUCTION: We have treated problem wherein all basic variables (may be stack or surplus) may
take any non-negative real (continuous or fractional) values. In many situations it is appropriate to have
fractional solution. For example it is quite possible to use 17.35 kg of raw materials, 7.42 man hours and
9.35 meters length of cloth in a project. However, in many situations especially in business or industry, it
makes no sense to ply 10.7 taxis on a transport route or open 9.4 branches of a distribution center or to
install 4.56 milling machines in a workshop for manufacturing a product. Rounding off, however, may
result in sub-optimal or infeasible solution, may be even meaningless. So in LP formulation itself it is
specified that decision variable can take only +ve integer values or restrictions may be imposed to take a
value of zero or one.
A linear programming problem in which all or some of the decision variables are constrained to assume
non-negative integer values is called an integer programming problem (IPP).
In linear programming problem if all variables are integer, we have all-integer programming
problem. If only some of the variables in the optimal solution of a LPP are restricted to assume non-
negative integer values while the remaining variables are free to take any non-negative values then it is
called mixed integer programming problem.
Further if all the variables in the optimal solution are allowed to take values 0 or 1, then the
problem is called the 0 – 1 programming problem or standard discrete programming problem.
The general integer programming problem is given by
=
Subject to the constraints
≤
≥0 .
“An integer rogramming (IP) problem is a linear programming (LP) problem in which the decision
variables are further constrained to take integer values and both the objective function and
constraints must be linear. The must commonly used method for solving an IP is the method of branch-
and-bound”
6
STA 421. Number:……………………………….
GOMORY’S CUTTING METHOD: A systematic procedure for solving pure (all) IPP was developed by R.E.
Gomory in 1956. Later he extended the method to deal with more complicated case of mixed integer
programming problem. This method consists of first solving the IPP as ordinary LPP by ignoring the
restriction of integer values and then introducing a new constraint to the problem such that the new set
of feasible solution includes all the original feasible integer solution, but not include the optimum non-
integer solution initially found. The new constraint is called fractional cut or Gomorian constraint. Then
the revised problem is solving using simplex method till an optimum integer solution is obtained.
BRANCH AND BOUND METHOD
This method is applicable to both all IPP as well as mixed IPP. Sometimes a few or all variables of an IPP
are constrained by their upper or lower bound. The most general method for the solution of such
constrained optimization problem is called Branch and Bound method.
The procedure step-wise is described below:
Step 1: Obtain the optimum solution of the given problem ignoring the restriction of integers(Solve the
given IPP as an ordinary LPP) .
Step 2: Test the integrality of the optimum solution obtained in step (1). There are two cases:
If the solution is in integers, the current solution is optimum to the given integer IPP.
If the solution is not integers, move to the next step
Step 3: Considering the value of objective function as upper bound, obtain the lower bound by rounding
off integral values of the decision variables.
Step 4: Let the optimum value ∗ of the variable is not in integer. Then sub-divide the given LPP into
two problems.
Sub-problem (i): Given LPP with an additional constraint ≤ ∗
Sub-problem (ii): Given LPP with an additional constraint ≥ ∗ + 1 where ∗ is the largest
integer contained in ∗
Step 5: Solve the two sub-problems obtained in step (4). There may arise three cases
Case (1): If the optimum solutions of the sub-problems are integral, then the required solution is
that give the largest value of Z.
7
STA 421. Number:……………………………….
Case (2): If the optimum solution of one sub-problem is integral and other sub-problem has no
feasible optimum solution, the required solution is the same as that of the sub-problem having
integer valued solution.
Case (3) : If the optimum solution of one sub-problem is integral while that of the other is not
integer valued then record the integer valued solution and repeat step (3) and (4) for the non-
integer valued sub-problem.
Step 6: Repeat step 3 to 5 until all integer valued solutions are recorded
Step 7: Select the solution amongst the recorded integer valued solutions that yield an optimum value
of Z.
The following example will illustrate the application.
Example: Use branch and bound method to solve the following LPP
Maximize Z =7 + 9
Subject to the constraints
− + 3 ≤ 6,
7 + ≤ 35,
, ≥ 0 and are integers
Solution:
Step 1: Ignoring the integer restrictions, the optimum solution to the given LPP is = , =
max = 63
∗
Step 2: since the solution is not in integer, let us choose = being the largest fractional value.
Step 3: considering the value of Z as initial upper bound i.e. = 63, the lower bound is obtained by
rounding off the value of and to the nearest integers i.e. = 4, = 3, ∴ = 55
Step 4: since [ ∗ ] = = 4 we have
Sub-problem (1): Maximize Z = 7 + 9
Subject to
− +3 ≤6
7 + ≤ 35
0≤ ≤ 4, 0≤ ≤3
Sub-problem (2): Max Z =7 + 9
Subject to
− +3 ≤6
7 + ≤ 35
0≤ ≤ 5, 0 ≤ ≤4
Step 5: optimum solution to the sub-problems is obtained as follows:
Sub-problem (1), = 4, = , = 58
Sub-problem (2), = 5, = 2, = 35
Since the solution to the sub-problem (1) is not integer, we sub-divide into the following two sub-
problems.
Sub-problem (3): Max Z =7 + 9
Subject to
− +3 ≤6
7 + ≤ 35
0≤ ≤ 4, 0 ≤ ≤3
Sub-problem (4): Max Z =7 + 9
Subject to
− +3 ≤6
7 + ≤ 35
0≤ ≤ 5, 0 ≤ ≤4
8
STA 421. Number:……………………………….
Step 6: the solution (optimal) to the sub-problem (3) and (4) are
Sub-problem (3), = 4, = 3, = 55
Sub-problem (4), No feasible solution
Step 7: Among the recorded integer valued solutions, since the largest value of Z is 55, the required
optimum solution is = 4, = 3, = 55
Exercise:
Use branch and bound method to solve the following LPP
= 6 +8
4 + 16 ≤ 32
14 + 4 ≤ 28
, ≥0
Use Branch and Bound technique to solve the following
= +4
Subject to
2 + 4 ≤7
5 + 3 ≤ 15
, ≥0
≥ = − +
9
STA 421. Number:……………………………….
+ − ≥
−1
∈ ∈
Where 0 < < 1 and : ≥0 = : <0
Or = − + ∑ ∈ + ∑ ∈
Step 4: Add the cutting plane generated in step (3) at the bottom of the optimum simplex table obtained
in step (2). Find the new optimum solution using dual simplex method
Step 5:Go to step (3)and repeat the process until all ≥ 0 and all restricted variables are integers
CUTTING PLANE METHOD FOR PURE (ALL) IPP:
Examples: Find the optimum integer solution to the following LPP
Max = +
ℎ
3 +2 ≤5
≤2
, ≥ 0 and are integers
Solution: Introducing the non-negative slack variable , ≥ 0, the standard form for the LPP becomes
Max = + +0 +0
Subject to
3 +2 + =5
+ =2
, , , ≥0
3 2 1 0 0 5
0 1 0 1 0 2
−1 − 1 0 0 1 0
The least coefficient in the objective function is −1 .The pivot column is .
To determine the pivot element we have
5
= 1.67,
3
The pivot element is 3 convert the pivot element to 1 by multiplying the pivot row by
10
STA 421. Number:……………………………….
1 0 − 0 1/3
0 1 0 1 0 2
0 0 0 7/3
Since all the element in the objective functional are ≥ 0, it implies that the optimal solution has been
reached. But = which is not an integer.
To obtain an optimum integer solution, we have to add a fractional cut constraint in the optimum
simplex table.
Since = , the source row is the first row. Expressing the negative fraction − as a sum of negative
integer and positive fraction, we have
2 1
− = −1 +
3 3
Since is the source row, we have
1 1 2
= + −
3 3 3
i.e.
1 1 1
= + + −1 +
3 3 3
The fractional cut (Gomorian) constraints is given by
+ ≥ ⇒− − ≤− ⇒− − + =−
Where is the Gomorian slack. Add this fractional cut constraint at the bottom of the above optimal
simplex table.
1 0 − 0 0 1/3
0 1 0 1 0 0 2
0 0 − − 1 0 −
0 0 0 0 7/3
1 0 − 0 0 1/3
0 1 0 1 0 0 2
0 0 1 1 −3 0 1
0 0 0 0 7/3
11
STA 421. Number:……………………………….
Convert all the elements the pivot column to zero except pivot element using the following row
operations
1
1 = 1− 3
3
2 = 2
3 = 3
1
4 = 4− 3
3
1 0 0 −1 1 0 0
0 1 0 1 0 0 2
0 0 1 1 −3 0 1
0 0 0 0 1 0 2
Since all the elements in the objective functional are ≥ 0 and all p≥ 0 and are integers, it implies that an
optimal integer solution is obtained.
:. The optimal integer solution is = 0, = 2 =2
0 1 0 0 0 7/2
1
1 0 − 1 0 0 7/ 2
2
0 0 1 −2 1 0 4
1
0 0 1 0 0 21/2
2
Since all the elements in the objective functional are≥ 0, the optimal solution of LPP has been obtained
which gives
21 7 7
= , = , =
2 2 2
Since the optimal solution obtained above is not an integer, we now select a constraint corresponding to
{ }= { , , }
7 1
= =3+
2 2
7 1
= =3+
2 2
=4=4+0
1 1 1
∴ { }= , ,0 =
2 2 2
Since the max fraction is same for both and row, we choose row as the source row arbitrary.
From this row we have:
12
STA 421. Number:……………………………….
7 1
= +0 − +1 +0
2 2
On expressing the negative as a sum of integer and a positive fraction we have
1 1
3+ = + 0 + −1 + +1 +0
2 2
∴TheGomorian constraint is given by
≥ , i.e. − ≤− ⇒− + =−
Where is the Gomorian slack? Adding this fractional cut constraint at the bottom of the above optimal
simplex table we get a new table
0 1 0 0 0 0 7/2
1
1 0 − 1 0 0 0 7/ 2
2
0 0 1 −2 1 0 0 4
1 1
0 0 − 0 0 1 0 −
2 2
0 0 1 0 0 0 21/2
The pivot column is and the pivot element is − .Converting− to 1 by multiply it by −2
0 1 0 0 0 0 7/2
1
1 0 − 1 0 0 0 7/ 2
2
0 0 1 −2 1 0 0 4
0 0 1 0 0 −2 0 1
0 0 0 1 0 0 0 21/2
Next convert the entire element in the pivot column to zero except the pivot element, using the
following row operations:
1
1 = 1− 4
2
1
2 = 2+ 4
2
3 = 3− 4
4 = 4
5 = 5− 4
0 1 0 0 0 1 0 3
1 0 0 1 0 1 0 4
0 0 0 −2 1 2 0 3
0 0 1 0 0 −2 0 1
0 0 0 1 0 2 0 10
Since all the elements in the objective function are ≥ 0 and all ≥ 0 and all integers. An optimum
solution has been obtained in integers. Hence, the integer optimum solution is given by
= 10, = 4, = 3
13
STA 421. Number:……………………………….
1 0 0 0 0
1 1 5
0 1 0 0 0
20 5 10
1 25
0 0 1 0 1 0
4 4
0 0 2 2 2 1 30
Since all the elements in the objective function are≥ 0 ⇒ optimal solution of LPP has been obtained.
But the integer constrained variables are non -integers.
= , = ⇒ =2+ , =6 +
1 1 1
( , )= , =
2 4 2
From the first row we have
= +0 +0 + + Or 2 + = + 0 + 0 + +
The Gomorian constraint is given by
+ ≥ , . . − − ≤−
1 0 0 0 0 0
1 1 5
0 1 0 0 0 0
20 5 10
1 25
0 0 1 0 1 0 0
4 4
0 0 0 − − 0 1 0 −
0 0 0 2 2 2 0 1 30
The key column is column and the key element is − . Converting the key element to 1 by multiply
by−
14
STA 421. Number:……………………………….
1 0 0 0 0 0
1 1 5
0 1 0 0 0 0
20 5 10
1 25
0 0 1 0 1 0 0
4 4
0 0 0 1 0 − 0
0 0 0 2 2 2 0 1 30
Convert the entire element in pivot row to zero except 1. Using the following row operation
= − , = − , = − , = and = −2
1 0 0 0 0 0 1 0 2
1 1 7
0 1 0 0 0 0
6 6 6
1 5 35
0 0 1 0 − 1 0
6 6 6
0 0 0 1 0 − 0
2 20 80
0 0 0 0 2 1
3 3 3
Since all the element in the objective function are ≥ 0 , the solution is optimum and also the integer
restricted variable = not an integer, therefore, we add another Gomorian constraint
= = 5 + . The source row is third row, from this we have
5 1 5
5+ =0 +0 + +0 − + +
6 6 6
The Gomorian constraint is given by
1 5 5
− + ≥
−1 6 6 6
⇒ + ≥ Or − − ≤ − Or − − + =−
Where is the Gomorian slack
Add this second cutting plane constraint at the bottom of the above optimum simplex table.
1 0 0 0 0 0 1 0 0 2
1 1 7
0 1 0 0 0 0 0
6 6 6
1 5 35
0 0 1 0 − 1 0 0
6 6 6
0 0 0 1 0 − 0 0
0 0 0 0 − 0 − 1 0 −
2 20 80
0 0 0 0 2 0 1
3 3 3
15
STA 421. Number:……………………………….
1 0 0 0 0 0 1 0 0 2
11 7
0 1 0 0 0 0 0
66 6
1 5 35
0 0 1 0 − 1 0 0
6 6 6
0 0 0 1 0 − 0 0
0 0 0 0 1 0 1 − 0 1
2 20 80
0 0 0 0 2 0 1
3 3 3
Convert all the elements in column to zero except 1 using the following
=
1
= −
6
1
= +
6
2
= −
3
=
2
= −
3
1 0 0 0 0 0 1 0 0 2
1
0 1 0 0 0 0 0 0 1
5
1
0 0 1 0 0 1 1 − 0 6
5
0 0 0 1 0 0 −4 0 1
6
0 0 0 0 1 0 1 − 0 1
5
0 0 0 0 0 0 6 1 26
Since all the elements in the objective function are ≥ 0 and also all the restricted variables are
integers, an optimum solution is obtained. The optimum integer solution is
=2, = 1 , = 6, = 26
INVENTORY MODEL WITH PROBABILTY DEMAND
In all the models of deterministic, the demand is hardly known precisely and so the model seems to be
only artificial. We, therefore, assume that the probability distribution of feature demand is known which
can be found out from the past experience. In these probabilistic models, we shall minimize the
expected cost instead of the actual.
MODEL 1(a): Instantaneous Demand, Setup cost zero, stock levels Discrete and lead time zero.
Let = ℎ
=
=
=ℎ
= ℎ
16
STA 421. Number:……………………………….
D D
Stock − Time
o Shortage
No shortage D−
o Time No stock
t
t
Fig 1.1 fig 1.2
Case I. When the number of unit used is ≤ number of units in stock i.e D≤ (see fig 1.1). The cost of
oversupplying due to units lying surplus in stock = ( − ).
Case II. When > (see fig. 1.2) cost of undersupplying due to shortage of units in stock = ( − ).
Hence the expected cost per unit time = ( − ). ℎ ≤
Or = ( − ). ℎ >
Obviously the expected cost is zero for =
∴Total expected cost per unit time = sum of all the expected costs
Or
∞
( )= ( − ). + ( − ). … … … … … … … … … … … … … (1)
We are to find out the value of which minimizes the total expected cost per unit time. Substituting
( + 1) in the above equation (1) we get
∞
( + 1) = ( + 1 − ). + −( + 1) .
= ( +1− ) + {( + 1) − ( + 1)}
∞
+ ( − − 1) + {( + 1) − ( + 1)}
= ( +1− ) + ( − − 1)
∞ ∞
= ( − ) + + ( − ) −
Now
∞ ∞
= − =1−
17
STA 421. Number:……………………………….
Hence
∞
( + 1) = ( − ) + ( − ) + − 1−
= ( )+( + ) − (1)
Similarly
( − 1) = C(I ) − (H + S)P + … … … … … … … … … … … … … . (3)
For any integer ʹ > and for any integer ʹʹ < , the inequality (4) would hold since isnon
decreasing for increasing . Therefore if inequality (4) hold then
ʹ ʹ ʹʹ ʹʹ
> ( ) > > ( ) <
So is the optimum value of that minimizes the total expected cost and it satisfies inequality (4).
Rearranging we have
P <P <
+
Hence if H and S are known, the optimum quantity is determined when the value of cumulative
probability distribution exceeds the ratio
If is such that P < =P then equation (2) gives ( + 1) = ( )
In this case optimum value of ℎ +1
If each day’s demand is independent of the previous day’s, how many papers should he order each day?
Solution: Let = . = , . . the number sold
per day. Now = 0.03 = 0.07 − 0.03 = 0.04.
Using the result P < <P
18
STA 421. Number:……………………………….
.
We have = . .
= 0.571
The probabilities of demand are:
No. of customers: 23 24 25 26 27 28 29 30 31 32
( ≤ ): 0.01 0.04 0.10 0.20 0.40 0.65 0.75 0.90 0.95 1.00
This suggest that must lie between 27 and 28 because 0.40 < 0.571 < 0.65
∴ = 28
A trader stocks a seasonal product at the beginning of the season and cannot reorder. The items cost
him N25 each and he sells at N50 each. Shortage cost is N15 per item and any item unsold has a salvage
value of N10. Holding cost during the period is estimated to be 10% of the price. The probability
distribution of demand is as follows:
∶ 2 3 4 5 6
. ( ≤ ): 0.35 0.25 0.20 0.15 0.05
. ( ≤ ): 0.35 0.60 0.80 0.95 1.00
MODEL 1(b): Instantaneous Demand, No setup cost, stock levels continuous, lead time zero
This model is the same as model 1(a) except that the stock levels are now assumed to be continuous
rather than discrete. So probability ( ) will be used instead of ℎ ( ) is the probability
density function (p. d. f.). The summation ∑ replaced by an integral. Let quantity in stock, H be
the holding (penalty) cost per unit over supply ( ≤ )and S the penalty cost per unit of under supply
( > ) where D is the demand with probability ( ).
Hence expected size of oversupply = ∫ ( − D) ( )
∞
And expected size of undersupply = ∫ ( − ) ( )
∞
∴ ( )= ( − D) ( ) + ( − ) ( ) … … . (1)
19
STA 421. Number:……………………………….
∴ ( )= = , We have, ∫ ( ) = , Or ∫ = .
Or ( −
2000=0.80645 Or =2806.45
A fish stall sells a variety of fish at the rate of N5 per kg on the day of the catch. If the stall fails to sell the
catch on the same day, it pays for shortages at the rate of N0.30 per kg and the price fetched is N4.50
per kg on the next day. Past records show that there is an unlimited demand for the fish one day old.
The problem is to ascertain how much fish should be procured every day, so that the total expected cost
is the minimum. It has been found from the past records that daily demand follows an exponential
distribution with
.
( ) = 0.02 ,0 ≤ x ≤ ∞
Solution:
= 0.30 + (5 − 4.50) = 0.80, = 5.00
Hence
( ) =
+
.
5
(0.02 ) = = 0.862
0.8 + 5
.
= 0.138 = e . (See exp table)
Simplifying we have = 99 kg
20