Paying back for shared costs among a group
$begingroup$
After celebrating the new year, me and my pals wanted to split the costs of our mischief. I started wondering about the best way to toss money around, i.e. a way to systematically minimise the amount of transactions. So the problem is that everyone should pay equally, even though one or few have already payed for the bills.
The obvious worst case scenario is that for $p$ people out of $n$ that have payed for something, the other $n-1$ pay for their share, $p$ times. If a single person pays for everything, the solution is easy enough: everyone pays for their share. For 2 out of $n$ people my best guess is this. First we total the money spent. Then one of the two pays the other such that they only pay for their share. The others pay the first guy as previously. This can be generalised. For $p$ out of $n$ that do the spending, let's choose 1 that is the hub of all transactions. Again, let's combine the total costs of everything, and let the chosen hub equalise the loss or win of those that payed something. Finally $n-p$ people simply pay for their share.
Is this the optimal strategy?
In a special case, where for example the non-hub spender spent 16 € and the share is 8 €, one of the people can pay their share to the non-hub, eliminating a transaction with the hub. But any amount that doesn't exactly get the spending of a non-hub equal to the share doesn't help.
I know this is neither the trickiest of questions nor one of utmost importance, but I thought someone might enjoy giving it a go. Happy New Year!
algorithms economics
$endgroup$
add a comment |
$begingroup$
After celebrating the new year, me and my pals wanted to split the costs of our mischief. I started wondering about the best way to toss money around, i.e. a way to systematically minimise the amount of transactions. So the problem is that everyone should pay equally, even though one or few have already payed for the bills.
The obvious worst case scenario is that for $p$ people out of $n$ that have payed for something, the other $n-1$ pay for their share, $p$ times. If a single person pays for everything, the solution is easy enough: everyone pays for their share. For 2 out of $n$ people my best guess is this. First we total the money spent. Then one of the two pays the other such that they only pay for their share. The others pay the first guy as previously. This can be generalised. For $p$ out of $n$ that do the spending, let's choose 1 that is the hub of all transactions. Again, let's combine the total costs of everything, and let the chosen hub equalise the loss or win of those that payed something. Finally $n-p$ people simply pay for their share.
Is this the optimal strategy?
In a special case, where for example the non-hub spender spent 16 € and the share is 8 €, one of the people can pay their share to the non-hub, eliminating a transaction with the hub. But any amount that doesn't exactly get the spending of a non-hub equal to the share doesn't help.
I know this is neither the trickiest of questions nor one of utmost importance, but I thought someone might enjoy giving it a go. Happy New Year!
algorithms economics
$endgroup$
1
$begingroup$
See also math.stackexchange.com/q/3046139/177399
$endgroup$
– Mike Earnest
Jan 4 at 0:35
add a comment |
$begingroup$
After celebrating the new year, me and my pals wanted to split the costs of our mischief. I started wondering about the best way to toss money around, i.e. a way to systematically minimise the amount of transactions. So the problem is that everyone should pay equally, even though one or few have already payed for the bills.
The obvious worst case scenario is that for $p$ people out of $n$ that have payed for something, the other $n-1$ pay for their share, $p$ times. If a single person pays for everything, the solution is easy enough: everyone pays for their share. For 2 out of $n$ people my best guess is this. First we total the money spent. Then one of the two pays the other such that they only pay for their share. The others pay the first guy as previously. This can be generalised. For $p$ out of $n$ that do the spending, let's choose 1 that is the hub of all transactions. Again, let's combine the total costs of everything, and let the chosen hub equalise the loss or win of those that payed something. Finally $n-p$ people simply pay for their share.
Is this the optimal strategy?
In a special case, where for example the non-hub spender spent 16 € and the share is 8 €, one of the people can pay their share to the non-hub, eliminating a transaction with the hub. But any amount that doesn't exactly get the spending of a non-hub equal to the share doesn't help.
I know this is neither the trickiest of questions nor one of utmost importance, but I thought someone might enjoy giving it a go. Happy New Year!
algorithms economics
$endgroup$
After celebrating the new year, me and my pals wanted to split the costs of our mischief. I started wondering about the best way to toss money around, i.e. a way to systematically minimise the amount of transactions. So the problem is that everyone should pay equally, even though one or few have already payed for the bills.
The obvious worst case scenario is that for $p$ people out of $n$ that have payed for something, the other $n-1$ pay for their share, $p$ times. If a single person pays for everything, the solution is easy enough: everyone pays for their share. For 2 out of $n$ people my best guess is this. First we total the money spent. Then one of the two pays the other such that they only pay for their share. The others pay the first guy as previously. This can be generalised. For $p$ out of $n$ that do the spending, let's choose 1 that is the hub of all transactions. Again, let's combine the total costs of everything, and let the chosen hub equalise the loss or win of those that payed something. Finally $n-p$ people simply pay for their share.
Is this the optimal strategy?
In a special case, where for example the non-hub spender spent 16 € and the share is 8 €, one of the people can pay their share to the non-hub, eliminating a transaction with the hub. But any amount that doesn't exactly get the spending of a non-hub equal to the share doesn't help.
I know this is neither the trickiest of questions nor one of utmost importance, but I thought someone might enjoy giving it a go. Happy New Year!
algorithms economics
algorithms economics
edited Jan 3 at 15:56
Felix
asked Jan 3 at 15:25
FelixFelix
1679
1679
1
$begingroup$
See also math.stackexchange.com/q/3046139/177399
$endgroup$
– Mike Earnest
Jan 4 at 0:35
add a comment |
1
$begingroup$
See also math.stackexchange.com/q/3046139/177399
$endgroup$
– Mike Earnest
Jan 4 at 0:35
1
1
$begingroup$
See also math.stackexchange.com/q/3046139/177399
$endgroup$
– Mike Earnest
Jan 4 at 0:35
$begingroup$
See also math.stackexchange.com/q/3046139/177399
$endgroup$
– Mike Earnest
Jan 4 at 0:35
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Your question is quite confusingly worded, but I think I know what you are asking.
Each person should end up paying the proper share, and there should be as few transactions as possible - that minimizes "tossing money around".
The problem seems to be that some people have already paid the full bill at some of the establishments you visited, and now you have to even up.
Figure out the amount owed (the total of the bills divided by the number of people).
Clearly you might need one transaction for each of the $n$ people who aren't even. Here's a way to do that. Among the people not even there must be at least one who has paid less than their fair share. Let one of those people hand the balance owed to anyone else. Now that payer is even (all paid up). If you're still not all even, do it again.
This will take at most $n$ transactions, fewer if by chance someone receiving money was evened up along the way. At each stage you can look for such a coincidence and take advantage of it.
$endgroup$
$begingroup$
Thanks for the answer! I edited the question slightly to confirm your interpretation of the question, sorry. But to your answer. It takes at most $n$ transactions. I reckon the hub solution I proposed also takes that amount, and now looking at it, no less should be expected beyond the special cases. But this does have the advantage of not piling the transactions onto one hub. Cheers!
$endgroup$
– Felix
Jan 3 at 15:58
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3060674%2fpaying-back-for-shared-costs-among-a-group%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Your question is quite confusingly worded, but I think I know what you are asking.
Each person should end up paying the proper share, and there should be as few transactions as possible - that minimizes "tossing money around".
The problem seems to be that some people have already paid the full bill at some of the establishments you visited, and now you have to even up.
Figure out the amount owed (the total of the bills divided by the number of people).
Clearly you might need one transaction for each of the $n$ people who aren't even. Here's a way to do that. Among the people not even there must be at least one who has paid less than their fair share. Let one of those people hand the balance owed to anyone else. Now that payer is even (all paid up). If you're still not all even, do it again.
This will take at most $n$ transactions, fewer if by chance someone receiving money was evened up along the way. At each stage you can look for such a coincidence and take advantage of it.
$endgroup$
$begingroup$
Thanks for the answer! I edited the question slightly to confirm your interpretation of the question, sorry. But to your answer. It takes at most $n$ transactions. I reckon the hub solution I proposed also takes that amount, and now looking at it, no less should be expected beyond the special cases. But this does have the advantage of not piling the transactions onto one hub. Cheers!
$endgroup$
– Felix
Jan 3 at 15:58
add a comment |
$begingroup$
Your question is quite confusingly worded, but I think I know what you are asking.
Each person should end up paying the proper share, and there should be as few transactions as possible - that minimizes "tossing money around".
The problem seems to be that some people have already paid the full bill at some of the establishments you visited, and now you have to even up.
Figure out the amount owed (the total of the bills divided by the number of people).
Clearly you might need one transaction for each of the $n$ people who aren't even. Here's a way to do that. Among the people not even there must be at least one who has paid less than their fair share. Let one of those people hand the balance owed to anyone else. Now that payer is even (all paid up). If you're still not all even, do it again.
This will take at most $n$ transactions, fewer if by chance someone receiving money was evened up along the way. At each stage you can look for such a coincidence and take advantage of it.
$endgroup$
$begingroup$
Thanks for the answer! I edited the question slightly to confirm your interpretation of the question, sorry. But to your answer. It takes at most $n$ transactions. I reckon the hub solution I proposed also takes that amount, and now looking at it, no less should be expected beyond the special cases. But this does have the advantage of not piling the transactions onto one hub. Cheers!
$endgroup$
– Felix
Jan 3 at 15:58
add a comment |
$begingroup$
Your question is quite confusingly worded, but I think I know what you are asking.
Each person should end up paying the proper share, and there should be as few transactions as possible - that minimizes "tossing money around".
The problem seems to be that some people have already paid the full bill at some of the establishments you visited, and now you have to even up.
Figure out the amount owed (the total of the bills divided by the number of people).
Clearly you might need one transaction for each of the $n$ people who aren't even. Here's a way to do that. Among the people not even there must be at least one who has paid less than their fair share. Let one of those people hand the balance owed to anyone else. Now that payer is even (all paid up). If you're still not all even, do it again.
This will take at most $n$ transactions, fewer if by chance someone receiving money was evened up along the way. At each stage you can look for such a coincidence and take advantage of it.
$endgroup$
Your question is quite confusingly worded, but I think I know what you are asking.
Each person should end up paying the proper share, and there should be as few transactions as possible - that minimizes "tossing money around".
The problem seems to be that some people have already paid the full bill at some of the establishments you visited, and now you have to even up.
Figure out the amount owed (the total of the bills divided by the number of people).
Clearly you might need one transaction for each of the $n$ people who aren't even. Here's a way to do that. Among the people not even there must be at least one who has paid less than their fair share. Let one of those people hand the balance owed to anyone else. Now that payer is even (all paid up). If you're still not all even, do it again.
This will take at most $n$ transactions, fewer if by chance someone receiving money was evened up along the way. At each stage you can look for such a coincidence and take advantage of it.
edited Jan 3 at 15:59
answered Jan 3 at 15:52
Ethan BolkerEthan Bolker
42.1k548111
42.1k548111
$begingroup$
Thanks for the answer! I edited the question slightly to confirm your interpretation of the question, sorry. But to your answer. It takes at most $n$ transactions. I reckon the hub solution I proposed also takes that amount, and now looking at it, no less should be expected beyond the special cases. But this does have the advantage of not piling the transactions onto one hub. Cheers!
$endgroup$
– Felix
Jan 3 at 15:58
add a comment |
$begingroup$
Thanks for the answer! I edited the question slightly to confirm your interpretation of the question, sorry. But to your answer. It takes at most $n$ transactions. I reckon the hub solution I proposed also takes that amount, and now looking at it, no less should be expected beyond the special cases. But this does have the advantage of not piling the transactions onto one hub. Cheers!
$endgroup$
– Felix
Jan 3 at 15:58
$begingroup$
Thanks for the answer! I edited the question slightly to confirm your interpretation of the question, sorry. But to your answer. It takes at most $n$ transactions. I reckon the hub solution I proposed also takes that amount, and now looking at it, no less should be expected beyond the special cases. But this does have the advantage of not piling the transactions onto one hub. Cheers!
$endgroup$
– Felix
Jan 3 at 15:58
$begingroup$
Thanks for the answer! I edited the question slightly to confirm your interpretation of the question, sorry. But to your answer. It takes at most $n$ transactions. I reckon the hub solution I proposed also takes that amount, and now looking at it, no less should be expected beyond the special cases. But this does have the advantage of not piling the transactions onto one hub. Cheers!
$endgroup$
– Felix
Jan 3 at 15:58
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3060674%2fpaying-back-for-shared-costs-among-a-group%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
See also math.stackexchange.com/q/3046139/177399
$endgroup$
– Mike Earnest
Jan 4 at 0:35