In applied mathematics, the maximum generalized assignment problem is a problem in combinatorial optimization. This problem is a generalization of the assignment problem in which both tasks and agents have a size. Moreover, the size of each task might vary from one agent to the other.
This problem in its most general form is as follows: There are a number of agents and a number of tasks. Any agent can be assigned to perform any task, incurring some cost and profit that may vary depending on the agent-task assignment. Moreover, each agent has a budget and the sum of the costs of tasks assigned to it cannot exceed this budget. It is required to find an assignment in which all agents do not exceed their budget and total profit of the assignment is maximized.
In the special case in which all the agents' budgets and all tasks' costs are equal to 1, this problem reduces to the assignment problem. When the costs and profits of all tasks do not vary between different agents, this problem reduces to the multiple knapsack problem. If there is a single agent, then, this problem reduces to the knapsack problem.
In the following, we have n kinds of items,
a1
an
b1
bm
bi
ti
bi
aj
pij
wij
bi
ti
Mathematically the generalized assignment problem can be formulated as an integer program:
\begin{align} maximize&
n | |
\sum | |
j=1 |
pijxij.\\ subjectto&
n | |
\sum | |
j=1 |
wijxij\leti&&i=1,\ldots,m;\\ &
m | |
\sum | |
i=1 |
xij\le1&&j=1,\ldots,n;\\ &xij\in\{0,1\}&&i=1,\ldots,m, j=1,\ldots,n; \end{align}
The generalized assignment problem is NP-hard,[1] However, there are linear-programming relaxations which give a
(1-1/e)
For the problem variant in which not every item must be assigned to a bin, there is a family of algorithms for solving the GAP by using a combinatorial translation of any algorithm for the knapsack problem into an approximation algorithm for the GAP.[3]
Using any
\alpha
\alpha+1
j
bj
bj
xi
bj
pij
xi
pij
pik
xi
bk
Formally: We use a vector
T
T[i]=j
xi
bj
T[i]=-1
xi
j
Pj
Pj[i]=pij
xi
T[i]=-1
Pj[i]=pij-pik
xi
bk
T[i]=k
Formally:
Set
T[i]=-1fori=1\ldotsn
For
j=1,\ldots,m
Call ALG to find a solution to bin
bj
Pj
Sj
Update
T
Sj
T[i]=j
i\inSj
Book: 978-3-540-24777-7. Knapsack Problems. Kellerer. Hans. Pferschy. Ulrich. Pisinger. David. 2013-03-19. Springer .