Hungarian Method
Hungarian Method
The Hungarian Method is an efficient algorithm specifically designed to solve the Assignment
Problem (AP). It minimizes the total cost of assigning resources (such as workers) to tasks
(jobs) in a one-to-one manner. The method is based on transforming the cost matrix by reducing
it to ensure that a solution can be easily derived through assignments at zero cost cells.
Purpose: Row reduction normalizes the cost matrix, ensuring that the
smallest cost in each row is zero, laying the foundation for further
simplification.
Purpose: Covering the zeros helps identify whether the current matrix
already contains an optimal solution or if further steps are required to
adjust the matrix.
Example: In this example, we attempt to cover all zeros with vertical
or horizontal lines. If all zeros can be covered with 4 lines, we can
proceed to make assignments; otherwise, we go to Step 4.
Purpose: This step identifies the final optimal assignment, where the
total cost is minimized.
o Worker A → Job 2
o Worker B → Job 1
o Worker C → Job 3
The total minimized cost is 12+14+ 12=38.
Summary
The Hungarian Method is a powerful algorithm for solving the assignment problem,
guaranteeing an optimal solution by minimizing total costs. By systematically reducing the cost
matrix through row and column adjustments and refining the matrix with iterative steps, this
method efficiently identifies the best assignments, even for complex or large problems.
Questions
1. How does the Hungarian Method minimize the total cost of an assignment problem
efficiently compared to other methods like enumeration?
2. Why is it necessary to adjust the matrix when the number of covering lines is fewer than
n?