The North-West Corner method and the Least Cost Cell method has been discussed in the previous articles. In this article, the Vogel’s Approximation method will be discussed.
- For each row find the least value and then the second least value and take the absolute difference of these two least values and write it in the corresponding row difference as shown in the image below. In row O1, 1 is the least value and 3 is the second least value and their absolute difference is 2. Similarly, for row O2 and O3, the absolute differences are 3 and 1 respectively.
- For each column find the least value and then the second least value and take the absolute difference of these two least values then write it in the corresponding column difference as shown in the figure. In column D1, 2 is the least value and 3 is the second least value and their absolute difference is 1. Similarly, for column D2, D3 and D3, the absolute differences are 2, 2 and 2 respectively.
- These value of row difference and column difference are also called as penalty. Now select the maximum penalty. The maximum penalty is 3 i.e. row O2. Now find the cell with the least cost in row O2 and allocate the minimum among the supply of the respective row and the demand of the respective column. Demand is smaller than the supply so allocate the column’s demand i.e. 250 to the cell. Then cancel the column D1.
- From the remaining cells, find out the row difference and column difference.
- Again select the maximum penalty which is 3 corresponding to row O1. The least-cost cell in row O1 is (O1, D2) with cost 1. Allocate the minimum among supply and demand from the respective row and column to the cell. Cancel the row or column with zero value.
- Now find the row difference and column difference from the remaining cells.
- Now select the maximum penalty which is 7 corresponding to column D4. The least cost cell in column D4 is (O3, D4) with cost 2. The demand is smaller than the supply for cell (O3, D4). Allocate 200 to the cell and cancel the column.
- Find the row difference and the column difference from the remaining cells.
- Now the maximum penalty is 3 corresponding to the column D2. The cell with the least value in D2 is (O3, D2). Allocate the minimum of supply and demand and cancel the column.
- Now there is only one column so select the cell with the least cost and allocate the value.
- Now there is only one cell so allocate the remaining demand or supply to the cell
- No balance remains. So multiply the allocated value of the cells with their corresponding cell cost and add all to get the final cost i.e. (300 * 1) + (250 * 2) + (50 * 3) + (250 * 3) + (200 * 2) + (150 * 5) = 2850
Attention reader! Don’t stop learning now. Get hold of all the important mathematical concepts for competitive programming with the Essential Maths for CP Course at a student-friendly price. To complete your preparation from learning a language to DS Algo and many more, please refer Complete Interview Preparation Course.