Generalized assignment problem: Difference between revisions

Content deleted Content added
No edit summary
 
(90 intermediate revisions by 51 users not shown)
Line 1:
{{short description|Combinatorial optimization problem}}
<math>InsertIn formula[[applied here</math>Themathematics]], the maximum general'''generalized assignment problem''' is a problem in [[combinatorial optimization]]. This problem is a [[generalization]] of the [[assignment problem]] in which both tasktasks and [[Agent-based model|agents]] have a size. Moreover, thisthe size of each task might vary from one agent to the other. This problem
 
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 tasktasks assigned to it cannot exceed this budget. It is required to find an assignment in which anall agentagents doesdo not exceed itstheir budget and total profit of the assignment is maximized.
<br />
In its most general form, the problem is as follows:
<br />
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 task assigned to it cannot exceed this budget. It is required to find an assignment in which an agent does not exceed its budget and total profit of the assignment is maximized.
 
==SpecialIn special cases==
In the special case in which all the agents' budgets and all tasks' costs are equal to 1, this problem reduces to the maximum [[assignment problem]]. When the costs and profits of all agents-tasktasks assignmentdo arenot equalvary 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]].
 
==Explanation of definition==
==Special cases==
In the following, we have ''n'' kinds of items, ''x<submath>1a_1</submath>'' through ''x<submath>na_n</submath>'' and ''m'' kinds of bins ''b''<submath>1b_1</submath> through ''b<submath>mb_m</submath>''. Each bin ''b''<submath>1b_i</submath> is associated with a budget ''w''<submath>it_i</submath>. EachFor a bin <math>b_i</math>, each item ''x<submath>ja_j</submath>'' has a valueprofit ''p<submath>p_{ij}</submath>'' and a weight ''w<submath>w_{ij}</submath>''. A solution is selection of items subset ''U'' and an assignment from ''U''items to the bins. A feasible solution is a solution in which for each bin ''b''<submath>ib_i</submath>. the weightstotal sumweight of assigned items is at most ''w''<submath>it_i</submath>. The solution's profit is the sum of profits for each item-bin assignment. The goal is to find a maximum profit feasible solution.
 
Mathematically the generalized assignment problem can be formulated as an [[Integer programming|integer program]]:
In the special case in which all the agents' budgets and all tasks' costs are equal to 1, this problem reduces to the maximum assignment problem. When the costs and profits of all agents-task assignment are equal, this problem reduces to the multiple knapsack problem. If there is a single agent, then, this problem reduces to the knapsack problem.
 
: <math>
==Definition==
\begin{align}
In the following, we have ''n'' kinds of items, ''x<sub>1</sub>'' through ''x<sub>n</sub>'' and ''m'' kinds of bins ''b''<sub>1</sub> through ''b<sub>m</sub>''. Each bin ''b''<sub>1</sub> is associated with a budget ''w''<sub>i</sub>. Each item ''x<sub>j</sub>'' has a value ''p<sub>ij</sub>'' and a weight ''w<sub>ij</sub>''. A solution is selection of items subset ''U'' and an assignment from ''U'' to the bins. A feasible solution is a solution in which for each bin ''b''<sub>i</sub>. the weights sum of assigned items is at most ''w''<sub>i</sub>. The solution's profit is the sum of profits for each item-bin assignment. The goal is to find a maximum profit feasible solution.
\text{maximize } & \sum_{i=1}^m\sum_{j=1}^n p_{ij} x_{ij}. \\
\text{subject to } & \sum_{j=1}^n w_{ij} x_{ij} \le t_i & & i=1, \ldots, m; \\
& \sum_{i=1}^m x_{ij} \le 1 & & j=1, \ldots, n; \\
& x_{ij} \in \{0,1\} & & i=1, \ldots, m, \quad j=1, \ldots, n;
\end{align}
</math>
 
== Complexity ==
The generalized assignment problem is NP-hard, and it is even APX-hard to approximation. Recently it was shown that it is (<math>\frac{e}{e-1} - \epsilon</math>) hard to approximate for every <math>\epsilon</math>.
The generalized assignment problem is [[NP-hard]].<ref>{{citation
| last1 = Özbakir | first1 = Lale
| last2 = Baykasoğlu | first2 = Adil
| last3 = Tapkan | first3 = Pınar
| pages = 3782–3795
| publisher = Elsevier
| series = Applied Mathematics and Computation
| title = Bees algorithm for generalized assignment problem
| doi = 10.1016/j.amc.2009.11.018
| volume = 215
| issue = 11
| year = 2010}}.</ref> However, there are linear-programming relaxations which give a <math>(1 - 1/e)</math>-approximation.<ref>{{cite conference |last1=Fleischer |first1=Lisa |last2=Goemans |first2=Michel X. |last3=Mirrokni |first3=Vahab S. |last4=Sviridenko |first4=Maxim |date=2006 |title=Tight approximation algorithms for maximum general assignment problems |conference=Proceedings of the seventeenth annual ACM-SIAM symposium on Discrete algorithm - SODA '06 |pages=611–620}}</ref>
 
== Greedy approximation algorithm ==
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.<ref>{{cite journal |doi=10.1016/j.ipl.2006.06.003|title=An efficient approximation for the Generalized Assignment Problem|journal=Information Processing Letters|volume=100|issue=4|pages=162–166|year=2006|last1=Cohen|first1=Reuven|last2=Katzir|first2=Liran|last3=Raz|first3=Danny|citeseerx=10.1.1.159.1947}}</ref>
Using any <math> \alpha</math>-approximation algorithm for the knapsack problem, it is possible to construct a (<math> \alpha+1</math>)-approximation for the generalized assignment problem in a greedy manner using a residual profit concept.
 
The residual profit of an item ''x<sub>i</sub>'' for bin ''b<sub>j</sub>'' is ''p<sub>ij</sub>'' is ''x<sub>i</sub>'' is not selected for any other bin or ''p<sub>ij</sub> - p<sub>ik</sub>'' if ''x<sub>i</sub>'' is selected for bin ''b<sub>k</sub>''.
Using any <math> \alpha</math>-approximation algorithm ALG for the [[knapsack problem]], it is possible to construct a (<math> \alpha + 1</math>)-approximation for the generalized assignment problem in a greedy manner using a residual profit concept.
The algorithm constructs a schedule in iterations, where during iteration <math>j</math> a tentative selection of items to bin <math>b_j</math> is selected.
The selection for bin <math>b_j</math> might change as items might be reselected in a later iteration for other bins.
The residual profit of an item ''x<submath>ix_i</submath>'' for bin ''b<submath>jb_j</submath>'' is ''p<submath>p_{ij}</submath>'' isif ''x<submath>ix_i</submath>'' is not selected for any other bin or ''p<submath> p_{ij}</submath> - p<submath>p_{ik} </submath>'' if ''x<submath>ix_i</submath>'' is selected for bin ''b<submath>kb_k</submath>''.
 
Formally: We use a vector <math>T</math> to indicate the tentative schedule during the algorithm. Specifically, <math>T[i]=j</math> means the item <math>x_i</math> is scheduled on bin <math>b_j</math> and <math>T[i]=-1</math> means that item <math>x_i</math> is not scheduled. The residual profit in iteration <math>j</math> is denoted by <math>P_j</math>, where <math>P_j[i]=p_{ij}</math> if item <math>x_i</math> is not scheduled (i.e. <math>T[i]=-1</math>) and <math>P_j[i]=p_{ij}-p_{ik}</math> if item <math>x_i</math> is scheduled on bin <math>b_k</math> (i.e. <math>T[i]=k</math>).
 
Formally:
: Set <math>T[i]=-1 \text{ for } i = 1\ldots n</math>
: For ''j=1..m'' do:
: For <math>j=1,\ldots,m</math> do:
:: find the optimal solution to bin ''b<sub>j</sub>'' using the residual profit funtion
:: Call ALG to find a solution to bin <math>b_j</math> using the residual profit function <math>P_j</math>. Denote the selected items by <math>S_j</math>.
:: Update <math>T</math> using <math>S_j</math>, i.e., <math>T[i]=j</math> for all <math>i \in S_j</math>.
 
==See also==
* [[Assignment problem]]
 
==References==
{{reflist}}
 
==Further reading==
* {{cite book |isbn=978-3-540-24777-7|title=Knapsack Problems|last1=Kellerer|first1=Hans|last2=Pferschy|first2=Ulrich|last3=Pisinger|first3=David|date=2013-03-19|publisher=Springer }}
 
[[Category:NP-complete problems]]
[[Category:Combinatorial optimization]]