Checking whether the win-loss standings of a league are possibleAnalyzing a modified version of the card-game “War”Complexity of checking whether linear equations have a positive solutionHow to efficiently determine whether a given ladder is valid?About the complexity of deciding whether no two elements of a collection are the sameChecking whether an integer is a square or higher powerChecking whether two paths are intersecting in a treeChecking whether a node is expandableTrying to find a human-usable method to figure out optimal round 1 openings for this gameChecking whether at least n/2 + 1 elements of a set/vector are equalMaximal Win Score Distribution
Bringing Power Supplies on Plane?
Scam? Phone call from "Department of Social Security" asking me to call back
How to not forget things?
Attacking the Hydra
Doesn't the speed of light limit imply the same electron can be annihilated twice?
Random Stripe Webhook Issues
What is the hottest thing in the universe?
Does fossil fuels use since 1990 account for half of all the fossil fuels used in history?
How can I find an old paper when the usual methods fail?
Did Pope Urban II issue the papal bull "terra nullius" in 1095?
What kind of liquid can be seen 'leaking' from the upper surface of the wing of a Boeing 737-800?
What is the farthest a camera can see?
Is this n-speak?
Why aren't rainbows blurred-out into nothing after they are produced?
Pokemon Go: Gym Badge Over-completed?
What is a "soap"?
Are there any cons in using rounded corners for bar graphs?
How do I call a 6-digit Australian phone number with a US-based mobile phone?
Do you "gain" 1st level?
Why won't the Republicans use a superdelegate system like the DNC in their nomination process?
What are the odds of rolling specific ability score totals in D&D?
Why does the cable resistance jump from a low value to high value at a particular frequency?
Would the USA be eligible to join the European Union?
Will using a resistor in series with a LED to control its voltage increase the total energy expenditure?
Checking whether the win-loss standings of a league are possible
Analyzing a modified version of the card-game “War”Complexity of checking whether linear equations have a positive solutionHow to efficiently determine whether a given ladder is valid?About the complexity of deciding whether no two elements of a collection are the sameChecking whether an integer is a square or higher powerChecking whether two paths are intersecting in a treeChecking whether a node is expandableTrying to find a human-usable method to figure out optimal round 1 openings for this gameChecking whether at least n/2 + 1 elements of a set/vector are equalMaximal Win Score Distribution
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
$begingroup$
You're hosting a 1 v 1 basketball league with a game schedule. At the end of the league you have each player report their supposed win-loss record (there are no ties), but you want to check whether the proposed standings were actually possible given the schedule.
For example: you have four players (Alice+Bob+Carol+Dave) and your schedule is a simple round robin. The reported standings [A: 3-0 B: 1-2 C: 1-2 D: 1-2] and [A: 2-1 B: 1-2 C: 1-2 D: 2-1] would be possible, but the standing [A: 3-0 B: 0-3 C: 0-3 D: 3-0] would not be.
Now suppose the schedule is instead a 3 game head to head between Alice+Bob and Carol+Dave. The reported standing [A: 3-0 B: 0-3 C: 0-3 D: 3-0] is now possible, but [A: 3-0 B: 1-2 C: 1-2 D: 1-2] would no longer be.
(The schedule does not need to be symmetric in any way. You could have Alice only play against Bob 10 times, then make Bob+Carol+Dave play 58 round robins against each other.)
Problem: Given a schedule with k participants and n total games, efficiently check whether a proposed win-loss standings could actually occur from that schedule.
The O($2^n$) brute force method is obvious, enumerate all possible game outcomes and see if any match the proposed standings. And if k is small increasing n doesn't add much complexity - it's very easy to check a two person league's standings regardless of whether they play ten games or ten billion games. Beyond that I haven't made much headway in finding a better method, and was curious if anyone had seen a similar problem before.
algorithms time-complexity
$endgroup$
add a comment |
$begingroup$
You're hosting a 1 v 1 basketball league with a game schedule. At the end of the league you have each player report their supposed win-loss record (there are no ties), but you want to check whether the proposed standings were actually possible given the schedule.
For example: you have four players (Alice+Bob+Carol+Dave) and your schedule is a simple round robin. The reported standings [A: 3-0 B: 1-2 C: 1-2 D: 1-2] and [A: 2-1 B: 1-2 C: 1-2 D: 2-1] would be possible, but the standing [A: 3-0 B: 0-3 C: 0-3 D: 3-0] would not be.
Now suppose the schedule is instead a 3 game head to head between Alice+Bob and Carol+Dave. The reported standing [A: 3-0 B: 0-3 C: 0-3 D: 3-0] is now possible, but [A: 3-0 B: 1-2 C: 1-2 D: 1-2] would no longer be.
(The schedule does not need to be symmetric in any way. You could have Alice only play against Bob 10 times, then make Bob+Carol+Dave play 58 round robins against each other.)
Problem: Given a schedule with k participants and n total games, efficiently check whether a proposed win-loss standings could actually occur from that schedule.
The O($2^n$) brute force method is obvious, enumerate all possible game outcomes and see if any match the proposed standings. And if k is small increasing n doesn't add much complexity - it's very easy to check a two person league's standings regardless of whether they play ten games or ten billion games. Beyond that I haven't made much headway in finding a better method, and was curious if anyone had seen a similar problem before.
algorithms time-complexity
$endgroup$
add a comment |
$begingroup$
You're hosting a 1 v 1 basketball league with a game schedule. At the end of the league you have each player report their supposed win-loss record (there are no ties), but you want to check whether the proposed standings were actually possible given the schedule.
For example: you have four players (Alice+Bob+Carol+Dave) and your schedule is a simple round robin. The reported standings [A: 3-0 B: 1-2 C: 1-2 D: 1-2] and [A: 2-1 B: 1-2 C: 1-2 D: 2-1] would be possible, but the standing [A: 3-0 B: 0-3 C: 0-3 D: 3-0] would not be.
Now suppose the schedule is instead a 3 game head to head between Alice+Bob and Carol+Dave. The reported standing [A: 3-0 B: 0-3 C: 0-3 D: 3-0] is now possible, but [A: 3-0 B: 1-2 C: 1-2 D: 1-2] would no longer be.
(The schedule does not need to be symmetric in any way. You could have Alice only play against Bob 10 times, then make Bob+Carol+Dave play 58 round robins against each other.)
Problem: Given a schedule with k participants and n total games, efficiently check whether a proposed win-loss standings could actually occur from that schedule.
The O($2^n$) brute force method is obvious, enumerate all possible game outcomes and see if any match the proposed standings. And if k is small increasing n doesn't add much complexity - it's very easy to check a two person league's standings regardless of whether they play ten games or ten billion games. Beyond that I haven't made much headway in finding a better method, and was curious if anyone had seen a similar problem before.
algorithms time-complexity
$endgroup$
You're hosting a 1 v 1 basketball league with a game schedule. At the end of the league you have each player report their supposed win-loss record (there are no ties), but you want to check whether the proposed standings were actually possible given the schedule.
For example: you have four players (Alice+Bob+Carol+Dave) and your schedule is a simple round robin. The reported standings [A: 3-0 B: 1-2 C: 1-2 D: 1-2] and [A: 2-1 B: 1-2 C: 1-2 D: 2-1] would be possible, but the standing [A: 3-0 B: 0-3 C: 0-3 D: 3-0] would not be.
Now suppose the schedule is instead a 3 game head to head between Alice+Bob and Carol+Dave. The reported standing [A: 3-0 B: 0-3 C: 0-3 D: 3-0] is now possible, but [A: 3-0 B: 1-2 C: 1-2 D: 1-2] would no longer be.
(The schedule does not need to be symmetric in any way. You could have Alice only play against Bob 10 times, then make Bob+Carol+Dave play 58 round robins against each other.)
Problem: Given a schedule with k participants and n total games, efficiently check whether a proposed win-loss standings could actually occur from that schedule.
The O($2^n$) brute force method is obvious, enumerate all possible game outcomes and see if any match the proposed standings. And if k is small increasing n doesn't add much complexity - it's very easy to check a two person league's standings regardless of whether they play ten games or ten billion games. Beyond that I haven't made much headway in finding a better method, and was curious if anyone had seen a similar problem before.
algorithms time-complexity
algorithms time-complexity
edited Aug 3 at 1:12
ManyCookies
asked Aug 3 at 1:00
ManyCookiesManyCookies
384 bronze badges
384 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
This can be modelled as a Max-Flow problem.
As a preprocessing step, make sure that the number of games is equal to the sum of the number of wins (if not, you know something is wrong).
Let $G$ be a set of vertices corresponding to the games played, and $P$ a set of vertices corresponding to the players. Let $s$ and $t$ denote two additional vertices (source and sink).
Now for every game $gin G$ played between $p1in P$ and $p2in P$, add an edge from $s$ to $g$ with capacity $1$ and edges from $g$ to $p1$ and $g$ to $p2$ also with capacity $1$. This models the fact that the game can give one point to either player.
Then for every player $pin P$ add an edge from $p$ to $t$ with capacity equal to the reported number of wins for player $p$. This models the fact that this player should win at most this number of games.
It is easy to see from here that if the reported scores are possible, there will be a saturating flow from $s$ to $t$ and reciprocally. So all you need to check is if the maximum $s,t$-flow in this graph is equal to the number of games played.
Alternatively, you could also have a graph with one vertex per game and a number of vertices for each player corresponding to the number of wins, connect them the same way as before, and look if the number of edges in a maximum matching is equal to the number of games (but this is almost the same thing really).
$endgroup$
$begingroup$
Very nice! And rather than have a node for each of the m separate games between P1 and P2, could you consolidate all of them into one node (a "series" node) with edge capacities m instead of 1?
$endgroup$
– ManyCookies
Aug 3 at 4:48
$begingroup$
In the preprocessing, you should also check that the number of wins + losses reported by each player equals the total number of games that player has played.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:49
$begingroup$
Also, while your answer seems technically correct, note that in practice solving the max-flow problem is neither necessary to catch simple cheating (where players only cheat by claiming extra wins and/or fewer losses; the preprocessing alone will catch that) nor sufficient to catch more subtle cheating (where e.g. Alice loses a match to Bob, but they both agree afterwards to report it as Alice's win anyway; there's no way to detect that using only the data given). But that's an issue with @ManyCookies's problem as stated, not with your solution.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:55
$begingroup$
@ManyCookies : Sure, that should also work :)
$endgroup$
– Tassle
Aug 3 at 16:25
$begingroup$
@IlmariKaronen : Yeah you can add any number of preprocessing steps you want to make things go faster in practice but these are not strictly necessary, while the preprocessing step I proposed was mainly to make the checking of the max-flow condition easier (without it you would need to check that the flow is saturating at both ends, which would boil down to that preprocessing step).
$endgroup$
– Tassle
Aug 3 at 16:29
|
show 3 more comments
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "419"
;
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
,
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%2fcs.stackexchange.com%2fquestions%2f112407%2fchecking-whether-the-win-loss-standings-of-a-league-are-possible%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$
This can be modelled as a Max-Flow problem.
As a preprocessing step, make sure that the number of games is equal to the sum of the number of wins (if not, you know something is wrong).
Let $G$ be a set of vertices corresponding to the games played, and $P$ a set of vertices corresponding to the players. Let $s$ and $t$ denote two additional vertices (source and sink).
Now for every game $gin G$ played between $p1in P$ and $p2in P$, add an edge from $s$ to $g$ with capacity $1$ and edges from $g$ to $p1$ and $g$ to $p2$ also with capacity $1$. This models the fact that the game can give one point to either player.
Then for every player $pin P$ add an edge from $p$ to $t$ with capacity equal to the reported number of wins for player $p$. This models the fact that this player should win at most this number of games.
It is easy to see from here that if the reported scores are possible, there will be a saturating flow from $s$ to $t$ and reciprocally. So all you need to check is if the maximum $s,t$-flow in this graph is equal to the number of games played.
Alternatively, you could also have a graph with one vertex per game and a number of vertices for each player corresponding to the number of wins, connect them the same way as before, and look if the number of edges in a maximum matching is equal to the number of games (but this is almost the same thing really).
$endgroup$
$begingroup$
Very nice! And rather than have a node for each of the m separate games between P1 and P2, could you consolidate all of them into one node (a "series" node) with edge capacities m instead of 1?
$endgroup$
– ManyCookies
Aug 3 at 4:48
$begingroup$
In the preprocessing, you should also check that the number of wins + losses reported by each player equals the total number of games that player has played.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:49
$begingroup$
Also, while your answer seems technically correct, note that in practice solving the max-flow problem is neither necessary to catch simple cheating (where players only cheat by claiming extra wins and/or fewer losses; the preprocessing alone will catch that) nor sufficient to catch more subtle cheating (where e.g. Alice loses a match to Bob, but they both agree afterwards to report it as Alice's win anyway; there's no way to detect that using only the data given). But that's an issue with @ManyCookies's problem as stated, not with your solution.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:55
$begingroup$
@ManyCookies : Sure, that should also work :)
$endgroup$
– Tassle
Aug 3 at 16:25
$begingroup$
@IlmariKaronen : Yeah you can add any number of preprocessing steps you want to make things go faster in practice but these are not strictly necessary, while the preprocessing step I proposed was mainly to make the checking of the max-flow condition easier (without it you would need to check that the flow is saturating at both ends, which would boil down to that preprocessing step).
$endgroup$
– Tassle
Aug 3 at 16:29
|
show 3 more comments
$begingroup$
This can be modelled as a Max-Flow problem.
As a preprocessing step, make sure that the number of games is equal to the sum of the number of wins (if not, you know something is wrong).
Let $G$ be a set of vertices corresponding to the games played, and $P$ a set of vertices corresponding to the players. Let $s$ and $t$ denote two additional vertices (source and sink).
Now for every game $gin G$ played between $p1in P$ and $p2in P$, add an edge from $s$ to $g$ with capacity $1$ and edges from $g$ to $p1$ and $g$ to $p2$ also with capacity $1$. This models the fact that the game can give one point to either player.
Then for every player $pin P$ add an edge from $p$ to $t$ with capacity equal to the reported number of wins for player $p$. This models the fact that this player should win at most this number of games.
It is easy to see from here that if the reported scores are possible, there will be a saturating flow from $s$ to $t$ and reciprocally. So all you need to check is if the maximum $s,t$-flow in this graph is equal to the number of games played.
Alternatively, you could also have a graph with one vertex per game and a number of vertices for each player corresponding to the number of wins, connect them the same way as before, and look if the number of edges in a maximum matching is equal to the number of games (but this is almost the same thing really).
$endgroup$
$begingroup$
Very nice! And rather than have a node for each of the m separate games between P1 and P2, could you consolidate all of them into one node (a "series" node) with edge capacities m instead of 1?
$endgroup$
– ManyCookies
Aug 3 at 4:48
$begingroup$
In the preprocessing, you should also check that the number of wins + losses reported by each player equals the total number of games that player has played.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:49
$begingroup$
Also, while your answer seems technically correct, note that in practice solving the max-flow problem is neither necessary to catch simple cheating (where players only cheat by claiming extra wins and/or fewer losses; the preprocessing alone will catch that) nor sufficient to catch more subtle cheating (where e.g. Alice loses a match to Bob, but they both agree afterwards to report it as Alice's win anyway; there's no way to detect that using only the data given). But that's an issue with @ManyCookies's problem as stated, not with your solution.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:55
$begingroup$
@ManyCookies : Sure, that should also work :)
$endgroup$
– Tassle
Aug 3 at 16:25
$begingroup$
@IlmariKaronen : Yeah you can add any number of preprocessing steps you want to make things go faster in practice but these are not strictly necessary, while the preprocessing step I proposed was mainly to make the checking of the max-flow condition easier (without it you would need to check that the flow is saturating at both ends, which would boil down to that preprocessing step).
$endgroup$
– Tassle
Aug 3 at 16:29
|
show 3 more comments
$begingroup$
This can be modelled as a Max-Flow problem.
As a preprocessing step, make sure that the number of games is equal to the sum of the number of wins (if not, you know something is wrong).
Let $G$ be a set of vertices corresponding to the games played, and $P$ a set of vertices corresponding to the players. Let $s$ and $t$ denote two additional vertices (source and sink).
Now for every game $gin G$ played between $p1in P$ and $p2in P$, add an edge from $s$ to $g$ with capacity $1$ and edges from $g$ to $p1$ and $g$ to $p2$ also with capacity $1$. This models the fact that the game can give one point to either player.
Then for every player $pin P$ add an edge from $p$ to $t$ with capacity equal to the reported number of wins for player $p$. This models the fact that this player should win at most this number of games.
It is easy to see from here that if the reported scores are possible, there will be a saturating flow from $s$ to $t$ and reciprocally. So all you need to check is if the maximum $s,t$-flow in this graph is equal to the number of games played.
Alternatively, you could also have a graph with one vertex per game and a number of vertices for each player corresponding to the number of wins, connect them the same way as before, and look if the number of edges in a maximum matching is equal to the number of games (but this is almost the same thing really).
$endgroup$
This can be modelled as a Max-Flow problem.
As a preprocessing step, make sure that the number of games is equal to the sum of the number of wins (if not, you know something is wrong).
Let $G$ be a set of vertices corresponding to the games played, and $P$ a set of vertices corresponding to the players. Let $s$ and $t$ denote two additional vertices (source and sink).
Now for every game $gin G$ played between $p1in P$ and $p2in P$, add an edge from $s$ to $g$ with capacity $1$ and edges from $g$ to $p1$ and $g$ to $p2$ also with capacity $1$. This models the fact that the game can give one point to either player.
Then for every player $pin P$ add an edge from $p$ to $t$ with capacity equal to the reported number of wins for player $p$. This models the fact that this player should win at most this number of games.
It is easy to see from here that if the reported scores are possible, there will be a saturating flow from $s$ to $t$ and reciprocally. So all you need to check is if the maximum $s,t$-flow in this graph is equal to the number of games played.
Alternatively, you could also have a graph with one vertex per game and a number of vertices for each player corresponding to the number of wins, connect them the same way as before, and look if the number of edges in a maximum matching is equal to the number of games (but this is almost the same thing really).
edited Aug 3 at 3:40
answered Aug 3 at 1:48
TassleTassle
3367 bronze badges
3367 bronze badges
$begingroup$
Very nice! And rather than have a node for each of the m separate games between P1 and P2, could you consolidate all of them into one node (a "series" node) with edge capacities m instead of 1?
$endgroup$
– ManyCookies
Aug 3 at 4:48
$begingroup$
In the preprocessing, you should also check that the number of wins + losses reported by each player equals the total number of games that player has played.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:49
$begingroup$
Also, while your answer seems technically correct, note that in practice solving the max-flow problem is neither necessary to catch simple cheating (where players only cheat by claiming extra wins and/or fewer losses; the preprocessing alone will catch that) nor sufficient to catch more subtle cheating (where e.g. Alice loses a match to Bob, but they both agree afterwards to report it as Alice's win anyway; there's no way to detect that using only the data given). But that's an issue with @ManyCookies's problem as stated, not with your solution.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:55
$begingroup$
@ManyCookies : Sure, that should also work :)
$endgroup$
– Tassle
Aug 3 at 16:25
$begingroup$
@IlmariKaronen : Yeah you can add any number of preprocessing steps you want to make things go faster in practice but these are not strictly necessary, while the preprocessing step I proposed was mainly to make the checking of the max-flow condition easier (without it you would need to check that the flow is saturating at both ends, which would boil down to that preprocessing step).
$endgroup$
– Tassle
Aug 3 at 16:29
|
show 3 more comments
$begingroup$
Very nice! And rather than have a node for each of the m separate games between P1 and P2, could you consolidate all of them into one node (a "series" node) with edge capacities m instead of 1?
$endgroup$
– ManyCookies
Aug 3 at 4:48
$begingroup$
In the preprocessing, you should also check that the number of wins + losses reported by each player equals the total number of games that player has played.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:49
$begingroup$
Also, while your answer seems technically correct, note that in practice solving the max-flow problem is neither necessary to catch simple cheating (where players only cheat by claiming extra wins and/or fewer losses; the preprocessing alone will catch that) nor sufficient to catch more subtle cheating (where e.g. Alice loses a match to Bob, but they both agree afterwards to report it as Alice's win anyway; there's no way to detect that using only the data given). But that's an issue with @ManyCookies's problem as stated, not with your solution.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:55
$begingroup$
@ManyCookies : Sure, that should also work :)
$endgroup$
– Tassle
Aug 3 at 16:25
$begingroup$
@IlmariKaronen : Yeah you can add any number of preprocessing steps you want to make things go faster in practice but these are not strictly necessary, while the preprocessing step I proposed was mainly to make the checking of the max-flow condition easier (without it you would need to check that the flow is saturating at both ends, which would boil down to that preprocessing step).
$endgroup$
– Tassle
Aug 3 at 16:29
$begingroup$
Very nice! And rather than have a node for each of the m separate games between P1 and P2, could you consolidate all of them into one node (a "series" node) with edge capacities m instead of 1?
$endgroup$
– ManyCookies
Aug 3 at 4:48
$begingroup$
Very nice! And rather than have a node for each of the m separate games between P1 and P2, could you consolidate all of them into one node (a "series" node) with edge capacities m instead of 1?
$endgroup$
– ManyCookies
Aug 3 at 4:48
$begingroup$
In the preprocessing, you should also check that the number of wins + losses reported by each player equals the total number of games that player has played.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:49
$begingroup$
In the preprocessing, you should also check that the number of wins + losses reported by each player equals the total number of games that player has played.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:49
$begingroup$
Also, while your answer seems technically correct, note that in practice solving the max-flow problem is neither necessary to catch simple cheating (where players only cheat by claiming extra wins and/or fewer losses; the preprocessing alone will catch that) nor sufficient to catch more subtle cheating (where e.g. Alice loses a match to Bob, but they both agree afterwards to report it as Alice's win anyway; there's no way to detect that using only the data given). But that's an issue with @ManyCookies's problem as stated, not with your solution.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:55
$begingroup$
Also, while your answer seems technically correct, note that in practice solving the max-flow problem is neither necessary to catch simple cheating (where players only cheat by claiming extra wins and/or fewer losses; the preprocessing alone will catch that) nor sufficient to catch more subtle cheating (where e.g. Alice loses a match to Bob, but they both agree afterwards to report it as Alice's win anyway; there's no way to detect that using only the data given). But that's an issue with @ManyCookies's problem as stated, not with your solution.
$endgroup$
– Ilmari Karonen
Aug 3 at 13:55
$begingroup$
@ManyCookies : Sure, that should also work :)
$endgroup$
– Tassle
Aug 3 at 16:25
$begingroup$
@ManyCookies : Sure, that should also work :)
$endgroup$
– Tassle
Aug 3 at 16:25
$begingroup$
@IlmariKaronen : Yeah you can add any number of preprocessing steps you want to make things go faster in practice but these are not strictly necessary, while the preprocessing step I proposed was mainly to make the checking of the max-flow condition easier (without it you would need to check that the flow is saturating at both ends, which would boil down to that preprocessing step).
$endgroup$
– Tassle
Aug 3 at 16:29
$begingroup$
@IlmariKaronen : Yeah you can add any number of preprocessing steps you want to make things go faster in practice but these are not strictly necessary, while the preprocessing step I proposed was mainly to make the checking of the max-flow condition easier (without it you would need to check that the flow is saturating at both ends, which would boil down to that preprocessing step).
$endgroup$
– Tassle
Aug 3 at 16:29
|
show 3 more comments
Thanks for contributing an answer to Computer Science 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%2fcs.stackexchange.com%2fquestions%2f112407%2fchecking-whether-the-win-loss-standings-of-a-league-are-possible%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