0% found this document useful (0 votes)
11 views4 pages

Akimul

Uploaded by

jibon8502
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

Akimul

Uploaded by

jibon8502
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Akimul Islam

ID: 20211103048
Intake: 46 Section: 02

Report: Solving the Linear Assignment Problem

Problem Description and Formulation

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.

5. Repeat Steps 3 and 4 until the optimal assignment is identified.

Results and Interpretation

Using the cost matrix:

The Hungarian algorithm produced the following optimal assignment:

1. Agent 1 -> Task 2 (Cost: 2)

2. Agent 2 -> Task 3 (Cost: 5)

3. Agent 3 -> Task 1 (Cost: 6)

Total Minimized Cost: 13

Insights and Challenges


1. Efficiency of the Algorithm:

o The Hungarian algorithm runs in O(n3), which is efficient for small to medium-sized
matrices.

o It guarantees optimality for all instances of the LAP.

2. Scalability:

o For larger problems, parallel or distributed implementations of the algorithm could


further enhance performance.

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.

o The use of the linear_sum_assignment function in Python simplifies the implementation


significantly.

You might also like