Operations Research

Online MA · Sem 4

Lesson 4 of 5Economics

Assignment Problem (Hungarian Method)

Operations Research

About the video

[#1]Assignment Problem[Easy Steps to solve - Hungarian Method with Optimal Solution] by kauserwise

Kauser Wise

Study notes

The assignment problem assigns jobs to operators one-to-one so that total time or cost is minimised. The Hungarian method first reduces rows and columns, then covers the zeros with lines and adjusts the matrix until an optimal set of independent zeros exists. In the 5x5 example, the minimum total processing time is 38 hours.

Basics

  • The assignment problem is a special transportation problem: each source fills exactly one destination.
  • Balanced problem: number of rows = number of columns. Otherwise, add a dummy row or column of zeros.

Phase 1: reduction

  • Row reduction: subtract each row's minimum from every entry in that row.
  • Column reduction: subtract each column's minimum from every entry in that column. A column whose minimum is 0 stays unchanged.

Phase 2: optimisation

  • Row scanning: if a row has exactly one uncovered zero, mark it with a square and draw a vertical line through its column. Skip rows with more than one zero.
  • Column scanning: if a column has exactly one uncovered zero, mark it with a square and draw a horizontal line through its row.
  • If the number of squares equals the number of rows, the solution is optimal. Read the assignments from the squared zeros.
  • Otherwise, find the minimum uncovered value. Subtract it from all uncovered cells, add it at line intersections, and leave all other entries unchanged. Then repeat the scanning.

Example result

  • After one adjustment (minimum uncovered value = 1), five squares were marked, so the solution is optimal.
  • Assignments: J1-O5 (7), J2-O1 (6), J3-O3 (6), J4-O2 (9), J5-O4 (10).
  • Total processing time = 38 hours. Always read the times from the original matrix.

Key terms

Hungarian method
An algorithm for solving assignment problems using matrix reduction and covering zeros with lines.
Row/column reduction
Subtracting the row or column minimum from every entry in that row or column, which creates zeros.
Intersection cell
A cell covered by both a vertical and a horizontal line; the minimum uncovered value is added to it.
Dummy row/column
A row or column of zeros added to make the matrix square.

Takeaways

  • Make the matrix square first.
  • Reduce rows, then columns.
  • Optimal when the number of assigned (squared) zeros equals the number of rows; otherwise adjust by the minimum uncovered value.
  • Compute the total from the original costs.
Contribute

Was this lesson helpful?

We read every rating and fix the weakest lessons first.