Akimul
Akimul
ID: 20211103048
Intake: 46 Section: 02
The Linear Assignment Problem (LAP) requires assigning agents to tasks to minimize the total cost of
assignments. The cost of assigning agent i to task j is given in a cost matrix C, where Cij represents the
associated cost. The matrix is square (n*n), implying an equal number of agents and tasks.
Approach Taken to Solve the Problem
To solve the problem, the Hungarian Algorithm was employed. The algorithm identifies the optimal
assignment efficiently by iteratively adjusting the cost matrix and finding the minimal cost assignment.
Algorithm Steps:
1. Row Reduction: Subtract the smallest value in each row from all elements in the row.
2. Column Reduction: Subtract the smallest value in each column from all elements in the column.
3. Covering Zeros: Cover all zeros in the matrix using the minimum number of horizontal or vertical
lines.
4. Adjust Matrix: If the minimum number of lines is less than nn, adjust the matrix by subtracting
the smallest uncovered value from uncovered elements and adding it to covered intersections.
o The Hungarian algorithm runs in O(n3), which is efficient for small to medium-sized
matrices.
2. Scalability:
3. Challenges:
o The Hungarian algorithm assumes a square cost matrix. In cases where the matrix is not
square, dummy rows/columns must be added, slightly complicating the setup.
4. Insights:
o The algorithm effectively transforms the problem into a series of adjustments to the cost
matrix, making it intuitive to interpret.