Two exact algorithms for the generalized assignment problem
Let A={a_1,a_2,…,a_s} and B={b_1,b_2,…,b_t} be two sets of objects with s+r=n, the generalized assignment problem assigns each element a_i in A to at least alpha_i and at most alpha ‘_i elements in B, and each element b_j in B to at least beta_j and at most beta ‘_j elements in A for all 1 <= i <= s and 1 <= j <= t. In this paper, we present an O(n^4) time and O(n) space algorithm for this problem using the well known Hungarian algorithm. We also present an O(n^3) algorithm for a special case of the generalized assignment, called the limited-capacity assignment problem, where alpha_i,beta_j=1 for all i,j.
💡 Research Summary
This paper presents two novel exact algorithms for solving the Generalized Assignment Problem (GAP). The GAP involves two sets, A (size s) and B (size t, with s+t=n), where each element a_i in A must be assigned to at least α_i and at most α’_i elements in B, and each element b_j in B must be assigned to at least β_j and at most β’_j elements in A. The objective is to find such an assignment that minimizes the total sum of pairwise assignment costs.
The authors’ primary contribution is a reduction of the GAP to a standard maximum-weight perfect matching problem on a bipartite graph, solvable by an adaptation of the classic Hungarian algorithm. They construct an extended complete bipartite graph G = (X ∪ Y, E). The vertex set X consists of the original set A plus a “shadow” set A’, and Y consists of the original set B plus a “shadow” set B’. Original assignment costs are placed on edges between A and B. Crucially, each vertex in A is also connected to all vertices in B’ with the same costs as to B, and each vertex in B is connected to all vertices in A’ with the same costs as to A. In this construction, the minimum demand (α_i, β_j) of an original vertex is modeled by requiring connections from that original vertex itself, while its remaining capacity (α’_i - α_i, β’_j - β_j) is modeled by allowing connections from its corresponding shadow vertex. A perfect matching in this extended graph corresponds to a feasible solution for the original GAP.
Algorithm 2 applies a modified Hungarian algorithm to this constructed graph. The key modification lies in the definition of a “free” vertex: a vertex is considered free with respect to the algorithm if it has not yet met its minimum demand (for original vertices) or if it still has residual capacity (for shadow vertices). The algorithm proceeds by iteratively finding augmenting paths and updating vertex labels until all relevant vertices satisfy their constraints. The authors prove that this algorithm runs in O(n⁴) time while using only O(n) space, as the extended graph does not need to be stored explicitly in full; the original cost matrix suffices.
Furthermore, the paper addresses an important special case termed the “Limited-Capacity Assignment Problem,” where the minimum demand for every element is exactly one (α_i = β_j = 1 for all i, j). For this case, the authors propose Algorithms 3 and 4, which leverage the simplified demand structure. The solution process is divided into two phases: the first phase (Algorithm 3) ensures every vertex in A gets at least one assignment, and the second phase (Algorithm 4) ensures every vertex in B gets at least one assignment. This two-phase approach allows the algorithm to run in O(n³) time, matching the complexity of the basic Hungarian algorithm for the standard assignment problem.
The paper includes thorough preliminaries reviewing the Hungarian algorithm, feasible labelings, and equality graphs. It provides proofs for the critical lemmas on label updating and optimality. The algorithms are presented in pseudocode, and their time complexity analyses are detailed step-by-step. This work demonstrates a clever and theoretically sound application of classical combinatorial optimization techniques to a more complex, constrained problem, offering clear pathways for implementation.
Comments & Academic Discussion
Loading comments...
Leave a Comment