Solving a many-to-one assignment problem with additional constraints
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
Assume there are $M$ items and $N$ people with $M ge N$. A single item can be
assigned to more than one person; however, item $i$ cannot be assigned more than
$d_i$ times in total. Furthermore, each item has a category $c_i$ and a single
person cannot be assigned two or more items of the same category.
The assignment of item $i$ to person $p$ produces value $v_i, p$. I would
like to find an assignment which maximizes the total value.
It should be fairly simple to write this as an, e.g., MiniZinc
model. What I am interested is whether this
resembles some optimization problem that has already been researched.
discrete-optimization
add a comment |Â
up vote
1
down vote
favorite
Assume there are $M$ items and $N$ people with $M ge N$. A single item can be
assigned to more than one person; however, item $i$ cannot be assigned more than
$d_i$ times in total. Furthermore, each item has a category $c_i$ and a single
person cannot be assigned two or more items of the same category.
The assignment of item $i$ to person $p$ produces value $v_i, p$. I would
like to find an assignment which maximizes the total value.
It should be fairly simple to write this as an, e.g., MiniZinc
model. What I am interested is whether this
resembles some optimization problem that has already been researched.
discrete-optimization
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
Assume there are $M$ items and $N$ people with $M ge N$. A single item can be
assigned to more than one person; however, item $i$ cannot be assigned more than
$d_i$ times in total. Furthermore, each item has a category $c_i$ and a single
person cannot be assigned two or more items of the same category.
The assignment of item $i$ to person $p$ produces value $v_i, p$. I would
like to find an assignment which maximizes the total value.
It should be fairly simple to write this as an, e.g., MiniZinc
model. What I am interested is whether this
resembles some optimization problem that has already been researched.
discrete-optimization
Assume there are $M$ items and $N$ people with $M ge N$. A single item can be
assigned to more than one person; however, item $i$ cannot be assigned more than
$d_i$ times in total. Furthermore, each item has a category $c_i$ and a single
person cannot be assigned two or more items of the same category.
The assignment of item $i$ to person $p$ produces value $v_i, p$. I would
like to find an assignment which maximizes the total value.
It should be fairly simple to write this as an, e.g., MiniZinc
model. What I am interested is whether this
resembles some optimization problem that has already been researched.
discrete-optimization
asked Aug 6 at 8:25
d125q
1,562815
1,562815
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
Your problem is actually more manageable with a greedy approach:
1) short the $v_i,p$ values into a list
2) for each person $p$ keep a category table where $u_p(x)=1$ if category $x$ is used and $0$ otherwise.
3) starting from the top assign the maximum value $v_i,p$ to the total sum if $d_i>0$ and the category of item $i$ is not used by person $p$ and then assign $d_i:=d_i-1$ and set $u_p(x)=1$.
4) the algorithm terminates when you reach the bottom value and takes time $MN$.
It isn’t hard to prove that the correctness of this algorithm.
How would this maximize the total value?
– d125q
Aug 6 at 12:38
Because maximum flow implies maximum matching in your person-item graph. The item category nodes are just for the additional $c_i$ constraints. If you read the max flow min cut algorithm on Wikipedia you will find all sorts of such applications.
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 12:00
Yes, but the flow is in no way influenced by the values $v_i, p$.
– d125q
Aug 7 at 12:34
I thought $v_i,p$ was $1$ or $0$ depending on if a path person-category-item exists (has flow coming through it) or doesn’t exist
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:17
If I misunderstood your question please provide more details on what $v$ is
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:18
 |Â
show 3 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
Your problem is actually more manageable with a greedy approach:
1) short the $v_i,p$ values into a list
2) for each person $p$ keep a category table where $u_p(x)=1$ if category $x$ is used and $0$ otherwise.
3) starting from the top assign the maximum value $v_i,p$ to the total sum if $d_i>0$ and the category of item $i$ is not used by person $p$ and then assign $d_i:=d_i-1$ and set $u_p(x)=1$.
4) the algorithm terminates when you reach the bottom value and takes time $MN$.
It isn’t hard to prove that the correctness of this algorithm.
How would this maximize the total value?
– d125q
Aug 6 at 12:38
Because maximum flow implies maximum matching in your person-item graph. The item category nodes are just for the additional $c_i$ constraints. If you read the max flow min cut algorithm on Wikipedia you will find all sorts of such applications.
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 12:00
Yes, but the flow is in no way influenced by the values $v_i, p$.
– d125q
Aug 7 at 12:34
I thought $v_i,p$ was $1$ or $0$ depending on if a path person-category-item exists (has flow coming through it) or doesn’t exist
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:17
If I misunderstood your question please provide more details on what $v$ is
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:18
 |Â
show 3 more comments
up vote
1
down vote
Your problem is actually more manageable with a greedy approach:
1) short the $v_i,p$ values into a list
2) for each person $p$ keep a category table where $u_p(x)=1$ if category $x$ is used and $0$ otherwise.
3) starting from the top assign the maximum value $v_i,p$ to the total sum if $d_i>0$ and the category of item $i$ is not used by person $p$ and then assign $d_i:=d_i-1$ and set $u_p(x)=1$.
4) the algorithm terminates when you reach the bottom value and takes time $MN$.
It isn’t hard to prove that the correctness of this algorithm.
How would this maximize the total value?
– d125q
Aug 6 at 12:38
Because maximum flow implies maximum matching in your person-item graph. The item category nodes are just for the additional $c_i$ constraints. If you read the max flow min cut algorithm on Wikipedia you will find all sorts of such applications.
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 12:00
Yes, but the flow is in no way influenced by the values $v_i, p$.
– d125q
Aug 7 at 12:34
I thought $v_i,p$ was $1$ or $0$ depending on if a path person-category-item exists (has flow coming through it) or doesn’t exist
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:17
If I misunderstood your question please provide more details on what $v$ is
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:18
 |Â
show 3 more comments
up vote
1
down vote
up vote
1
down vote
Your problem is actually more manageable with a greedy approach:
1) short the $v_i,p$ values into a list
2) for each person $p$ keep a category table where $u_p(x)=1$ if category $x$ is used and $0$ otherwise.
3) starting from the top assign the maximum value $v_i,p$ to the total sum if $d_i>0$ and the category of item $i$ is not used by person $p$ and then assign $d_i:=d_i-1$ and set $u_p(x)=1$.
4) the algorithm terminates when you reach the bottom value and takes time $MN$.
It isn’t hard to prove that the correctness of this algorithm.
Your problem is actually more manageable with a greedy approach:
1) short the $v_i,p$ values into a list
2) for each person $p$ keep a category table where $u_p(x)=1$ if category $x$ is used and $0$ otherwise.
3) starting from the top assign the maximum value $v_i,p$ to the total sum if $d_i>0$ and the category of item $i$ is not used by person $p$ and then assign $d_i:=d_i-1$ and set $u_p(x)=1$.
4) the algorithm terminates when you reach the bottom value and takes time $MN$.
It isn’t hard to prove that the correctness of this algorithm.
edited Aug 8 at 12:21
answered Aug 6 at 11:23


ΜάÃÂκο ΚαÃÂαμÎÂÃÂηÂ
4149
4149
How would this maximize the total value?
– d125q
Aug 6 at 12:38
Because maximum flow implies maximum matching in your person-item graph. The item category nodes are just for the additional $c_i$ constraints. If you read the max flow min cut algorithm on Wikipedia you will find all sorts of such applications.
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 12:00
Yes, but the flow is in no way influenced by the values $v_i, p$.
– d125q
Aug 7 at 12:34
I thought $v_i,p$ was $1$ or $0$ depending on if a path person-category-item exists (has flow coming through it) or doesn’t exist
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:17
If I misunderstood your question please provide more details on what $v$ is
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:18
 |Â
show 3 more comments
How would this maximize the total value?
– d125q
Aug 6 at 12:38
Because maximum flow implies maximum matching in your person-item graph. The item category nodes are just for the additional $c_i$ constraints. If you read the max flow min cut algorithm on Wikipedia you will find all sorts of such applications.
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 12:00
Yes, but the flow is in no way influenced by the values $v_i, p$.
– d125q
Aug 7 at 12:34
I thought $v_i,p$ was $1$ or $0$ depending on if a path person-category-item exists (has flow coming through it) or doesn’t exist
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:17
If I misunderstood your question please provide more details on what $v$ is
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:18
How would this maximize the total value?
– d125q
Aug 6 at 12:38
How would this maximize the total value?
– d125q
Aug 6 at 12:38
Because maximum flow implies maximum matching in your person-item graph. The item category nodes are just for the additional $c_i$ constraints. If you read the max flow min cut algorithm on Wikipedia you will find all sorts of such applications.
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 12:00
Because maximum flow implies maximum matching in your person-item graph. The item category nodes are just for the additional $c_i$ constraints. If you read the max flow min cut algorithm on Wikipedia you will find all sorts of such applications.
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 12:00
Yes, but the flow is in no way influenced by the values $v_i, p$.
– d125q
Aug 7 at 12:34
Yes, but the flow is in no way influenced by the values $v_i, p$.
– d125q
Aug 7 at 12:34
I thought $v_i,p$ was $1$ or $0$ depending on if a path person-category-item exists (has flow coming through it) or doesn’t exist
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:17
I thought $v_i,p$ was $1$ or $0$ depending on if a path person-category-item exists (has flow coming through it) or doesn’t exist
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:17
If I misunderstood your question please provide more details on what $v$ is
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:18
If I misunderstood your question please provide more details on what $v$ is
– ÎœÎ¬ÃÂκο ΚαÃÂαμÎÂÃÂηÂ
Aug 7 at 14:18
 |Â
show 3 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2873697%2fsolving-a-many-to-one-assignment-problem-with-additional-constraints%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password