Step - 3 : Draw a set of minimum number of lines through some of the rows and columns in such a way as to cover all the zeros.
Subtract the minimum element from every element without a line through them and then add that minimum element that lies at the intersection of two lines.
Now if there is a complete set of assignments with zero elements is possible than the resultant equivalent cost table is the optimal solution otherwise repeat this step( step 3).
The total cost of the optimal solution is the sum of amounts that have been subtracted from each row of the cost matrix.
Here the authors have to assign tasks to employees.
The authors focused on the situation where this assignment problem reduces to constructing maximal matchings in a set of interrelated bipartite graphs.
The assignment problem can be written mathematically as: Minimize 2.3.
Hungarian Method The following algorithm applies the above theorem to a given n × n cost matrix to find an optimal assignment.
Output : An equivalent cost table has all the zero elements required for a complete set of assignments which constitute an optimal solution.
Strategy : To concert the cost table into equivalent cost tables until we get an optimal solution.