Algorithm for least required matches to rank players in tournamentHow many possible arrangements for a round...
Why is c4 a better move in this position?
Copy large number of files of specific date to another directory?
Auto Insert date into Notepad
Quenching swords in dragon blood; why?
Why is working on the same position for more than 15 years not a red flag?
Could be quantum mechanics necessary to analyze some biology scenarios?
A flower in a hexagon
No rhyme nor reason
Finishing chicken thighs under broiler
Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?
If I delete my router's history can my ISP still provide it to my parents?
What do you call a fact that doesn't match the settings?
How do I add a variable to this curl command?
Vacuum of space
Why didn't Eru and/or the Valar intervene when Sauron corrupted Númenor?
What is the purpose of easy combat scenarios that don't need resource expenditure?
High pressure canisters of air as gun-less projectiles
Can a hotel cancel a confirmed reservation?
'A' vs 'an' in newspaper article
Determining the Spell DC of a spell cast via Staff
Can I retract my name from an already published manuscript?
What is Crew Dragon approaching in this picture?
On what did Lego base the appearance of the new Hogwarts minifigs?
If all harmonics are generated by plucking, how does a guitar string produce a pure frequency sound?
Algorithm for least required matches to rank players in tournament
How many possible arrangements for a round robin tournament?Optimizing a Dynamic Balanced TournamentExpected value of round robin scores and ranksAn algorithm to rate players in team?Probability :Knock Out Tournament Of Ranked PlayersHow many rounds are required in a “Swiss tournament sorting algorithm”?Probability of any team winning a single-elimination tournament that has one match per round and the opponents for each round are selected randomly.Game Tournament AlgorithmGraph Theory - Players problemMinimum Matches to Be Played in Group Tournament
$begingroup$
Assuming the following conditions:
- A higher skill level always beats a lower skill level.
- Given n players, each have a distinct skill level compared to the other (n-1).
- If player A has beat player B, and player B has beat player C, then player A is better than player C and no match need to occur.
- The skill level of each player can only be used to determine if it is complete (It cannot use the skill level to help the algorithm, it must only use the match history)
- The algorithm is only considered complete when each player is correctly ranked according to their skill level
What matching algorithm would rank the n players in the least number of matches?
Notice I state matches, and not rounds. So concurrent matches occurring does not help. Although I am curious of the algorithm that would do it in the least number of rounds as well.
If there is no clear obvious answer, what methods/techniques are worth considering?
The answer may (probably?) be a well known tournament style.
If not I have a feeling the answer is very simple and is related to some graph traversal problem, or even related to sorting algorithms on random integers.
As an example, I will use a basic algorithm for 4 players:
Player A (skill 4)
Player B (skill 3)
Player C (skill 2)
Player D (skill 1)
Matches
Round 1 (Match-making is random in round 1 as per condition 4)
A vs C: A wins
B vs D: B wins
Known: (A > C), (B > D)
Round 2
A vs B: A wins
C vs D: C wins
Known: (A > BCD), (B > D), (C > D)
Round 3
B vs C: B wins
Known: (A > BCD), (B > CD), (C > D)
So given 4 players, I was able to find the rank for all players in 5 matches.
combinatorics discrete-mathematics graph-theory optimization algorithms
New contributor
$endgroup$
add a comment |
$begingroup$
Assuming the following conditions:
- A higher skill level always beats a lower skill level.
- Given n players, each have a distinct skill level compared to the other (n-1).
- If player A has beat player B, and player B has beat player C, then player A is better than player C and no match need to occur.
- The skill level of each player can only be used to determine if it is complete (It cannot use the skill level to help the algorithm, it must only use the match history)
- The algorithm is only considered complete when each player is correctly ranked according to their skill level
What matching algorithm would rank the n players in the least number of matches?
Notice I state matches, and not rounds. So concurrent matches occurring does not help. Although I am curious of the algorithm that would do it in the least number of rounds as well.
If there is no clear obvious answer, what methods/techniques are worth considering?
The answer may (probably?) be a well known tournament style.
If not I have a feeling the answer is very simple and is related to some graph traversal problem, or even related to sorting algorithms on random integers.
As an example, I will use a basic algorithm for 4 players:
Player A (skill 4)
Player B (skill 3)
Player C (skill 2)
Player D (skill 1)
Matches
Round 1 (Match-making is random in round 1 as per condition 4)
A vs C: A wins
B vs D: B wins
Known: (A > C), (B > D)
Round 2
A vs B: A wins
C vs D: C wins
Known: (A > BCD), (B > D), (C > D)
Round 3
B vs C: B wins
Known: (A > BCD), (B > CD), (C > D)
So given 4 players, I was able to find the rank for all players in 5 matches.
combinatorics discrete-mathematics graph-theory optimization algorithms
New contributor
$endgroup$
$begingroup$
I don't understand rule $4.$ Are you saying that the matches must be determined in advance, before the tournament? That is, the outcome of a match doesn't influence who plays whom in later matches?
$endgroup$
– saulspatz
12 hours ago
$begingroup$
You are trying to do a minimum-comparison sort. This is a difficult question in general. See section 5.3.1, "Minimum-Comparison Sorting", in Volume 3, "Sorting and Searching" of "The Art of Computer Programming" by Donald Knuth.
$endgroup$
– awkward
5 hours ago
add a comment |
$begingroup$
Assuming the following conditions:
- A higher skill level always beats a lower skill level.
- Given n players, each have a distinct skill level compared to the other (n-1).
- If player A has beat player B, and player B has beat player C, then player A is better than player C and no match need to occur.
- The skill level of each player can only be used to determine if it is complete (It cannot use the skill level to help the algorithm, it must only use the match history)
- The algorithm is only considered complete when each player is correctly ranked according to their skill level
What matching algorithm would rank the n players in the least number of matches?
Notice I state matches, and not rounds. So concurrent matches occurring does not help. Although I am curious of the algorithm that would do it in the least number of rounds as well.
If there is no clear obvious answer, what methods/techniques are worth considering?
The answer may (probably?) be a well known tournament style.
If not I have a feeling the answer is very simple and is related to some graph traversal problem, or even related to sorting algorithms on random integers.
As an example, I will use a basic algorithm for 4 players:
Player A (skill 4)
Player B (skill 3)
Player C (skill 2)
Player D (skill 1)
Matches
Round 1 (Match-making is random in round 1 as per condition 4)
A vs C: A wins
B vs D: B wins
Known: (A > C), (B > D)
Round 2
A vs B: A wins
C vs D: C wins
Known: (A > BCD), (B > D), (C > D)
Round 3
B vs C: B wins
Known: (A > BCD), (B > CD), (C > D)
So given 4 players, I was able to find the rank for all players in 5 matches.
combinatorics discrete-mathematics graph-theory optimization algorithms
New contributor
$endgroup$
Assuming the following conditions:
- A higher skill level always beats a lower skill level.
- Given n players, each have a distinct skill level compared to the other (n-1).
- If player A has beat player B, and player B has beat player C, then player A is better than player C and no match need to occur.
- The skill level of each player can only be used to determine if it is complete (It cannot use the skill level to help the algorithm, it must only use the match history)
- The algorithm is only considered complete when each player is correctly ranked according to their skill level
What matching algorithm would rank the n players in the least number of matches?
Notice I state matches, and not rounds. So concurrent matches occurring does not help. Although I am curious of the algorithm that would do it in the least number of rounds as well.
If there is no clear obvious answer, what methods/techniques are worth considering?
The answer may (probably?) be a well known tournament style.
If not I have a feeling the answer is very simple and is related to some graph traversal problem, or even related to sorting algorithms on random integers.
As an example, I will use a basic algorithm for 4 players:
Player A (skill 4)
Player B (skill 3)
Player C (skill 2)
Player D (skill 1)
Matches
Round 1 (Match-making is random in round 1 as per condition 4)
A vs C: A wins
B vs D: B wins
Known: (A > C), (B > D)
Round 2
A vs B: A wins
C vs D: C wins
Known: (A > BCD), (B > D), (C > D)
Round 3
B vs C: B wins
Known: (A > BCD), (B > CD), (C > D)
So given 4 players, I was able to find the rank for all players in 5 matches.
combinatorics discrete-mathematics graph-theory optimization algorithms
combinatorics discrete-mathematics graph-theory optimization algorithms
New contributor
New contributor
edited 13 hours ago
CuriousDeveloper
New contributor
asked 14 hours ago
CuriousDeveloperCuriousDeveloper
383
383
New contributor
New contributor
$begingroup$
I don't understand rule $4.$ Are you saying that the matches must be determined in advance, before the tournament? That is, the outcome of a match doesn't influence who plays whom in later matches?
$endgroup$
– saulspatz
12 hours ago
$begingroup$
You are trying to do a minimum-comparison sort. This is a difficult question in general. See section 5.3.1, "Minimum-Comparison Sorting", in Volume 3, "Sorting and Searching" of "The Art of Computer Programming" by Donald Knuth.
$endgroup$
– awkward
5 hours ago
add a comment |
$begingroup$
I don't understand rule $4.$ Are you saying that the matches must be determined in advance, before the tournament? That is, the outcome of a match doesn't influence who plays whom in later matches?
$endgroup$
– saulspatz
12 hours ago
$begingroup$
You are trying to do a minimum-comparison sort. This is a difficult question in general. See section 5.3.1, "Minimum-Comparison Sorting", in Volume 3, "Sorting and Searching" of "The Art of Computer Programming" by Donald Knuth.
$endgroup$
– awkward
5 hours ago
$begingroup$
I don't understand rule $4.$ Are you saying that the matches must be determined in advance, before the tournament? That is, the outcome of a match doesn't influence who plays whom in later matches?
$endgroup$
– saulspatz
12 hours ago
$begingroup$
I don't understand rule $4.$ Are you saying that the matches must be determined in advance, before the tournament? That is, the outcome of a match doesn't influence who plays whom in later matches?
$endgroup$
– saulspatz
12 hours ago
$begingroup$
You are trying to do a minimum-comparison sort. This is a difficult question in general. See section 5.3.1, "Minimum-Comparison Sorting", in Volume 3, "Sorting and Searching" of "The Art of Computer Programming" by Donald Knuth.
$endgroup$
– awkward
5 hours ago
$begingroup$
You are trying to do a minimum-comparison sort. This is a difficult question in general. See section 5.3.1, "Minimum-Comparison Sorting", in Volume 3, "Sorting and Searching" of "The Art of Computer Programming" by Donald Knuth.
$endgroup$
– awkward
5 hours ago
add a comment |
2 Answers
2
active
oldest
votes
$begingroup$
If we are optimizing the number of matches, then this problem is exactly equivalent to the problem of finding a good sorting algorithm. Since $m$ matches have $2^m$ different possible outcomes, and we want to distinguish $n!$ possible orders between the players, we must have $2^m ge n!$ or $m ge log_2 (n!) = O(n log n)$ matches. Algorithms like quicksort or mergesort achieve this many matches, at least asymptotically.
(So just run quicksort, for example, and every time it asks you to compare two elements, have the corresponding players play a match to decide the outcome of the comparison.)
It's more interesting to optimize the number of rounds. Since each round can include up to $frac n2$ matches, the lower bound on the number of rounds is only $frac{log_2 (n!)}{n/2} = O(log n)$.
We can borrow some constructions from sorting networks to achieve this bound, at least asymptotically. A sorting network can be thought of as a tournament of this type with some restrictions:
- Initially, the players are given an arbitrary ranking from $1$ to $n$.
- When a game is played between players ranked $i$ and $j$, if $i<j$ but the $i^{text{th}}$ player loses, the two players exchange ranks.
- The games have to be prearranged in advance - but in terms of ranks. (So the instructions for one round with 6 players might be "players ranked 1 and 4 play, players ranked 2 and 5 play, players ranked 3 and 6 play".)
The depth of a sorting network is precisely the number of rounds required in the resulting tournament.
There are many sorting networks, such as the bitonic sorter, that have depth $O(log^2 n)$. This is good, but not optimal. The AKS network is a sorting network with depth $O(log n)$, which is optimal up to a (huge) constant; it's not useful in practice.
$endgroup$
add a comment |
$begingroup$
The merge insertion sort is optimal if the number of players is less than 15 or between 20 and 22. For larger numbers of players there exists a sorting algorithm with fewer comparisons than the merge insertion sort.
In general, this is an open problem.
$endgroup$
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
});
}
});
CuriousDeveloper is a new contributor. Be nice, and check out our Code of Conduct.
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%2f3133155%2falgorithm-for-least-required-matches-to-rank-players-in-tournament%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
If we are optimizing the number of matches, then this problem is exactly equivalent to the problem of finding a good sorting algorithm. Since $m$ matches have $2^m$ different possible outcomes, and we want to distinguish $n!$ possible orders between the players, we must have $2^m ge n!$ or $m ge log_2 (n!) = O(n log n)$ matches. Algorithms like quicksort or mergesort achieve this many matches, at least asymptotically.
(So just run quicksort, for example, and every time it asks you to compare two elements, have the corresponding players play a match to decide the outcome of the comparison.)
It's more interesting to optimize the number of rounds. Since each round can include up to $frac n2$ matches, the lower bound on the number of rounds is only $frac{log_2 (n!)}{n/2} = O(log n)$.
We can borrow some constructions from sorting networks to achieve this bound, at least asymptotically. A sorting network can be thought of as a tournament of this type with some restrictions:
- Initially, the players are given an arbitrary ranking from $1$ to $n$.
- When a game is played between players ranked $i$ and $j$, if $i<j$ but the $i^{text{th}}$ player loses, the two players exchange ranks.
- The games have to be prearranged in advance - but in terms of ranks. (So the instructions for one round with 6 players might be "players ranked 1 and 4 play, players ranked 2 and 5 play, players ranked 3 and 6 play".)
The depth of a sorting network is precisely the number of rounds required in the resulting tournament.
There are many sorting networks, such as the bitonic sorter, that have depth $O(log^2 n)$. This is good, but not optimal. The AKS network is a sorting network with depth $O(log n)$, which is optimal up to a (huge) constant; it's not useful in practice.
$endgroup$
add a comment |
$begingroup$
If we are optimizing the number of matches, then this problem is exactly equivalent to the problem of finding a good sorting algorithm. Since $m$ matches have $2^m$ different possible outcomes, and we want to distinguish $n!$ possible orders between the players, we must have $2^m ge n!$ or $m ge log_2 (n!) = O(n log n)$ matches. Algorithms like quicksort or mergesort achieve this many matches, at least asymptotically.
(So just run quicksort, for example, and every time it asks you to compare two elements, have the corresponding players play a match to decide the outcome of the comparison.)
It's more interesting to optimize the number of rounds. Since each round can include up to $frac n2$ matches, the lower bound on the number of rounds is only $frac{log_2 (n!)}{n/2} = O(log n)$.
We can borrow some constructions from sorting networks to achieve this bound, at least asymptotically. A sorting network can be thought of as a tournament of this type with some restrictions:
- Initially, the players are given an arbitrary ranking from $1$ to $n$.
- When a game is played between players ranked $i$ and $j$, if $i<j$ but the $i^{text{th}}$ player loses, the two players exchange ranks.
- The games have to be prearranged in advance - but in terms of ranks. (So the instructions for one round with 6 players might be "players ranked 1 and 4 play, players ranked 2 and 5 play, players ranked 3 and 6 play".)
The depth of a sorting network is precisely the number of rounds required in the resulting tournament.
There are many sorting networks, such as the bitonic sorter, that have depth $O(log^2 n)$. This is good, but not optimal. The AKS network is a sorting network with depth $O(log n)$, which is optimal up to a (huge) constant; it's not useful in practice.
$endgroup$
add a comment |
$begingroup$
If we are optimizing the number of matches, then this problem is exactly equivalent to the problem of finding a good sorting algorithm. Since $m$ matches have $2^m$ different possible outcomes, and we want to distinguish $n!$ possible orders between the players, we must have $2^m ge n!$ or $m ge log_2 (n!) = O(n log n)$ matches. Algorithms like quicksort or mergesort achieve this many matches, at least asymptotically.
(So just run quicksort, for example, and every time it asks you to compare two elements, have the corresponding players play a match to decide the outcome of the comparison.)
It's more interesting to optimize the number of rounds. Since each round can include up to $frac n2$ matches, the lower bound on the number of rounds is only $frac{log_2 (n!)}{n/2} = O(log n)$.
We can borrow some constructions from sorting networks to achieve this bound, at least asymptotically. A sorting network can be thought of as a tournament of this type with some restrictions:
- Initially, the players are given an arbitrary ranking from $1$ to $n$.
- When a game is played between players ranked $i$ and $j$, if $i<j$ but the $i^{text{th}}$ player loses, the two players exchange ranks.
- The games have to be prearranged in advance - but in terms of ranks. (So the instructions for one round with 6 players might be "players ranked 1 and 4 play, players ranked 2 and 5 play, players ranked 3 and 6 play".)
The depth of a sorting network is precisely the number of rounds required in the resulting tournament.
There are many sorting networks, such as the bitonic sorter, that have depth $O(log^2 n)$. This is good, but not optimal. The AKS network is a sorting network with depth $O(log n)$, which is optimal up to a (huge) constant; it's not useful in practice.
$endgroup$
If we are optimizing the number of matches, then this problem is exactly equivalent to the problem of finding a good sorting algorithm. Since $m$ matches have $2^m$ different possible outcomes, and we want to distinguish $n!$ possible orders between the players, we must have $2^m ge n!$ or $m ge log_2 (n!) = O(n log n)$ matches. Algorithms like quicksort or mergesort achieve this many matches, at least asymptotically.
(So just run quicksort, for example, and every time it asks you to compare two elements, have the corresponding players play a match to decide the outcome of the comparison.)
It's more interesting to optimize the number of rounds. Since each round can include up to $frac n2$ matches, the lower bound on the number of rounds is only $frac{log_2 (n!)}{n/2} = O(log n)$.
We can borrow some constructions from sorting networks to achieve this bound, at least asymptotically. A sorting network can be thought of as a tournament of this type with some restrictions:
- Initially, the players are given an arbitrary ranking from $1$ to $n$.
- When a game is played between players ranked $i$ and $j$, if $i<j$ but the $i^{text{th}}$ player loses, the two players exchange ranks.
- The games have to be prearranged in advance - but in terms of ranks. (So the instructions for one round with 6 players might be "players ranked 1 and 4 play, players ranked 2 and 5 play, players ranked 3 and 6 play".)
The depth of a sorting network is precisely the number of rounds required in the resulting tournament.
There are many sorting networks, such as the bitonic sorter, that have depth $O(log^2 n)$. This is good, but not optimal. The AKS network is a sorting network with depth $O(log n)$, which is optimal up to a (huge) constant; it's not useful in practice.
answered 12 hours ago
Misha LavrovMisha Lavrov
47k657107
47k657107
add a comment |
add a comment |
$begingroup$
The merge insertion sort is optimal if the number of players is less than 15 or between 20 and 22. For larger numbers of players there exists a sorting algorithm with fewer comparisons than the merge insertion sort.
In general, this is an open problem.
$endgroup$
add a comment |
$begingroup$
The merge insertion sort is optimal if the number of players is less than 15 or between 20 and 22. For larger numbers of players there exists a sorting algorithm with fewer comparisons than the merge insertion sort.
In general, this is an open problem.
$endgroup$
add a comment |
$begingroup$
The merge insertion sort is optimal if the number of players is less than 15 or between 20 and 22. For larger numbers of players there exists a sorting algorithm with fewer comparisons than the merge insertion sort.
In general, this is an open problem.
$endgroup$
The merge insertion sort is optimal if the number of players is less than 15 or between 20 and 22. For larger numbers of players there exists a sorting algorithm with fewer comparisons than the merge insertion sort.
In general, this is an open problem.
answered 12 hours ago
Angela RichardsonAngela Richardson
5,38611733
5,38611733
add a comment |
add a comment |
CuriousDeveloper is a new contributor. Be nice, and check out our Code of Conduct.
CuriousDeveloper is a new contributor. Be nice, and check out our Code of Conduct.
CuriousDeveloper is a new contributor. Be nice, and check out our Code of Conduct.
CuriousDeveloper is a new contributor. Be nice, and check out our Code of Conduct.
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%2f3133155%2falgorithm-for-least-required-matches-to-rank-players-in-tournament%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
$begingroup$
I don't understand rule $4.$ Are you saying that the matches must be determined in advance, before the tournament? That is, the outcome of a match doesn't influence who plays whom in later matches?
$endgroup$
– saulspatz
12 hours ago
$begingroup$
You are trying to do a minimum-comparison sort. This is a difficult question in general. See section 5.3.1, "Minimum-Comparison Sorting", in Volume 3, "Sorting and Searching" of "The Art of Computer Programming" by Donald Knuth.
$endgroup$
– awkward
5 hours ago