Академический Документы
Профессиональный Документы
Культура Документы
Here, it is important to note that in the minimum cost method and Vogel’s approx.
method, we have broken the tie arbitrarily. If we choose some other option than we
have chosen here, the answer will vary.
It may also be noted that all three methods are only giving us a starting feasible
solutions (which is a good solution) but these are not optimal.
Why?
Because, at the end, we see that we don’t have any option and we have to make
allocations in the vacant boxes. Therefore, we have no control at the decisions at that
time.
So, the solutions reached here are not optimal
Lets try to understand what is a basic feasible solution to the transportation problem.
Here, m+n means adding supply and delivery points, which is 3+4 = 7 in our case
If we analyse all the three solutions, we shall find that they fulfill 1st, 2nd and 4th criteria
of basic feasible solution.
What is 3rd criteria i.e. loop.
Lets discuss about it now:
Assume that allocations are made like this. It is forming a loop here as shown in next slide
This solution satisfies all the conditions of basic feasible solution but does not satisfy 3rd
condition. It is forming a loop here as shown
A loop shows some kind of dependency between the allocations. It means that these
allocations are not independent. Now, we have to break this loop.
We try to break this loop by decreasing number of allocations in the extreme left box. But
we see that it increases the cost by 1 unit
As we try to increase the allocations in minimum cost position, we see that cost comes
down by 1 unit
So, we go on increasing the allocation in minimum cost position and see that we get
the following solution which is basic feasible solution. This is called basic feasible
solution as it fulfills all the four conditions as discussed earlier.
Next, if we see that we have less than (m+n-1) allocations, we say that we have
degenerate basic feasible solution.
Note that if we get a degenerate basic feasible solution with exactly (m+n-1) solution,
it is extremely desirable.
If we get a degenerate basic feasible solution with less than (m+n-1) allocations than,
we need to add an epsilon (Ɛ) suitably to make it basic feasible
Also, we can use any other arbitrary method to solve this allocation problem. But we
need to make sure that the number of allocations are less than (m+n-1). Because if the
number of allocations are more than this, the, there is definitely a loop…..which has to
be broken. Even if the allocations are equal to (m+n-1), still there can be a hidden
loop. We need to check that and if there is a loop…break it and degenerate.
Preferably we use minimum cost method or VAM as both give us basic feasible
solution without loop.
For example, A degenerate basic feasible solution with a loop
Loop visible here
A degenerate basic feasible solution with a loop
What is degenerate:
When we have a feasible solution with no loop and with less than (m+n-1) allocations, it
satisfies all the supply/demand conditions, then it is a degenerate basic feasible
solution. So, whenever we have a degenerate basic feasible solution, it is necessary for
us to introduce an epsilon (Ɛ) in such a way that it does not form a loop.
NWC, Min. Cost and VAM will never give us a loop because of the way the allocations
are made. As whenever we allocated we tried to put the maximum which is the
minimum of the supply/demand and because we put the maximum in that position
there will not be any loop with solutions to all these three methods.
So, we say that to get a basic feasible solution there should not be any loop as it
happened with all the three methods. A basic feasible solution is also characterized by
(m+n-1) independent allocations. Sometimes we get a basic feasible solution with these
three methods with less than (m+n-1) allocations, that means we have a degenerate
solution.
Transportation problem-Optimal Solutions
Example:
We start with a basic feasible solution which we obtained using minimum cost
method or VAM
The cost corresponding to this is 80+120+300+70+70+320 = 960
So, now, from this basic feasible solution, we would go to optimal solution
So, first of all, we shall check whether this is optimal
If this is not optimal it means that one of the unallocated positions will get allocation.
So, we will look at all the unallocated positions or non basic positions.
The allocated positions have variables called basic variables and unallocated have
non basic variables.
So, the non basic variables in this previous slide are: X13, X14, X21, X22, X31, X33
Now, we try to put 1 allocation in X13. If we do this, it means we are exceeding (m+n-
1) allocations. It means it will make a loop as shown here.
Now, balance the allocations as supply and demand should remain same.
So, this is the next basic feasible solution and for this solution, the cost will be
80+100+60+350+70+240 = 920
Next, we shall whether this solution is optimal or not by going thru one more iteration.
To do that we shall now put +1 in all the six non basic positions in the previous solution
(shown below) and we shall see the effect of that:
We start by putting +1 in X13 position, we shall check the loop, balance supply and
demand
We see that as Ɵ increases, X23 and X34 decrease so the limiting value of Ɵ is 40
beyond which X34 will become negative
We again make this table to indicate the new basic feasible solution (take Ɵ as 40):
Cost associated with this: 920
With earlier solution this was 960.
So there is a gain of 40 and in linear programming the gain is a product of Ci-Zj and Ɵ
We had taken Ɵ as 40 and Cj-Zj was -1 (X33 position).
Multiply 40* (-1) is -40 hence we have cross checked that cost decreases by 40.
Now, we want to check whether this is optimal.
Using UV method, calculate u1 to u3 and v1 to v4 as previously discussed
Now, for all the unallocated 6 positions, find out Cij- (ui+vj)
It will be (3), (2) (1), (1), (0), (1) for X13, X14, X21, X22, X31, X34 position respectively.
We see that all are positive with one zero. There is no negative value. So there is no
entering variable so we say that the optimum solution is reached as all the Cij- (ui+vj) ≥ 0
For a minimization problem, positive Cij- (ui+vj) indicates optimality
Now, we see that one Cij- (ui+vj) is zero (X31 position).
It indicates alternate optimum. Lets find that.
Put a Ɵ in X31 position and form the loop,
Balance the allocations
Now, this will become a new solution which is this. This solution is same as
stepping stone method. This is called UV method or modified distribution method.
Example
A 4x4 problem
Let us assume that
1. every person can do these jobs
2. One person can be assigned only one job
Objective is to assign the jobs in such a manner that it results in minimum cost.
Such a problem is called assignment problem.
This type of formulation of problem is called standard assignment problem and is a
minimization problem
Let us look at some aspects of assignment problem
Aspect 1: It looks like a transportation problem but it is not. It is a square matrix
whereas in transportation it is not so.
So, we can consider assignment problem as a special case of transportation problem
where supply points are equal to the demand points i.e. m=n,
and ai = bj = 1
Procedure to solve:
Subtract the row minimum from each row to generate as many zero as possible,
The problem will look like this:
Subtract the column minimum from each column to generate as many zero as possible,
We see that in column 1, 3 and 4, the column minimum is zero. If we subtract zero from
all the elements, it will give us same values. So these columns will remain same. There
in only 2nd column which is not having zero. So we subtract column minimum from this
column
The problem will look like this:
Now, we have one zero in each row and each column. Now, we shall start making
assignments or allocations only at the points where there is zero.
So, we make 4 assignments, one in each row and one in each column. We see that this is
a feasible and optimal solution as we see that we have made our assignments only in zero
positions
It means
job 1 will go to person 3
job 2 will go to person 4
job 3 will go to person 2
job 4 will go to person 1
And the optimal cost will be 3+2+10+3 = 18 i.e. Z = 18
Rule to be followed in assigning:
If there is one assignable zero in any row or column, assign it.
If there are more than one assignable zeroes in a row or column, leave it and look
at it later.
This rule will give us as many assignments as possible.
If we don’t follow this rule in the previous slide, we may end up assigning three
jobs only because of the rule that one job goes to one person and one person can
be assigned only one job. The solution will be as shown below which is wrong:
Example 2: 5 jobs, 5 people
Procedure to solve:
Subtract the row minimum from each row to generate as many zero as possible,
The problem will look like this:
We realize that all columns have zero except 5th column .
So, we subtract the column minimum from the 5th to get a new reduced matrix
Now, we start making allocations.
First step:
Step2:
Now, we look at the third row. We see that there are two zeroes, so we leave it.
Then, we see that 4th and 5th row don’t have any assignable zero.
Now, we do the allocations column wise
Step1:
Now, we see that we are unable to proceed since there are no zeroes to allocate.
We see that we have only three assignments for this 5x5 matrix.
How to get 5 assignments?
How to get 5 assignments?
Procedure is as follows:
1. Tick the unassigned row
In these rows, tick the corresponding columns if there is a zero
Now, look at the tick marked column, if there is an assignment in that column, tick
mark at that corresponding row
The algorithm stops now since no more ticking is possible.
Now, draw lines through unticked rows and ticked columns
We see that we have covered all the zeroes.
We have followed this procedure:
Now, we reconstruct the matrix.
Find out the minimum value through which the line is not passing. We see in the
below mentioned that this number is 1
So, we take Ɵ = 1
This procedure has been followed in the previous slide.
Now, subtract Ɵ from all the numbers through which the line is not passing.
Add Ɵ to all the numbers that have two lines passing through them.
And keep the rest of them the same
This is shown below:
Now, start making assignments in the rows:
Step 1:
Step 2:
Row three has three zeroes, so leave it
Row 4 has no assignable zero, so leave it
Row 5 has one assignable zero. Assign it and cross all the other zero in this column
Now, start making assignments in the columns:
Step 1:
Now, we see that all zeroes are either assigned or crossed. Now, we have 4 assignments
against 5
Again follow the procedure of ticking
In the third row, there are three zeroes, so we can’t make an assignment, leave it
In the 4th row, there is one zero, assign it
Now, we see that all zeroes are either assigned or crossed. Now, we have 4 assignments
against 5.
This makes us understand that there is no guarantee that with each iteration, we will
have one more assignment
Again follow the procedure of ticking
Now, draw lines through unticked rows and ticked columns
In first column:
Now, we see that all zeroes are either assigned or crossed. We still have 4 assignments
against 5.
This makes us understand that there is no guarantee that with each iteration, we will
have one more assignment
Again follow the procedure of ticking
Now, draw lines through unticked rows and ticked columns
Find out the minimum value through which the line is not passing. We see in the first row,
this number is 1. So, we take Ɵ = 1
Now, subtract Ɵ from all the numbers through which the line is not passing.
Add Ɵ to all the numbers that have two lines passing through them.
And keep the rest of them the same
This is shown below:
Now, start making assignments in the rows:
Step 1:
In the first row, there are 4 zeroes, so we can’t make an assignment, leave it
In the second row, there is one zero, assign it
In the 3rd row, there are three zeroes, so we can’t make an assignment, leave it
In the 4th row, assign:
In the 5th row:
Now, assign in columns:
Column 1 has two zeroes, leave it
Columns 2 and 3, assignments have already been made.
Assign in column 4:
Now, come back to the row:
Assign in Row1:
Now, we see that all zeroes are either assigned or crossed. We have 5 assignments
against 5. This is the optimal solution.
The assignments are X11, X23, X34, X42, X55
The assignments are X11, X23, X34, X42, X55.
The value of the objective function is 51
Hungarian Method
Perform Row minimum operation
Perform column minimum operation
Primal assignment problem
Introduce dual variables u and v where u and v are solution to the dual
Dual will be:
This algorithm is called Hungarian algorithm, very popular to solve the assignment problem
Feasible and optimal solution to the problem
Another example:
Perform row minimum subtraction to get Us
column minimum subtraction to get Vs
Find out the minimum value through which the line is not passing. We see in the fifth row,
this number is 1. So, we take Ɵ = 1
Now, subtract Ɵ from all the numbers through which the line is not passing.
Add Ɵ to all the numbers that have two lines passing through them.
And keep the rest of them the same
This is shown below:
This is what we have done in the previous slide w.r.t. original problem
Now, whether we solve this or whether we solve original problem, optimal solution will be same