Algorithm for least required matches to rank players in tournamentHow many possible arrangements for a round...
What formula could mimic the following curve?
How to avoid being sexist when trying to employ someone to function in a very sexist environment?
Slow moving projectiles from a hand-held weapon - how do they reach the target?
Avoiding morning and evening handshakes
Longest Jewish year
Using loops to create tables
Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?
Please help me understand the following solution
What kind of hardware implements Fourier transform?
Everyone is beautiful
Dilemma of explaining to interviewer that he is the reason for declining second interview
1 0 1 0 1 0 1 0 1 0 1
What to do when being responsible for data protection in your lab, yet advice is ignored?
How can I deal with a significant flaw I found in my previous supervisor’s paper?
Algorithm for least required matches to rank players in tournament
It took me a lot of time to make this, pls like. (YouTube Comments #1)
Why did Jodrell Bank assist the Soviet Union to collect data from their spacecraft in the mid 1960's?
How can I introduce myself to a party without saying that I am a rogue?
Why did Bush enact a completely different foreign policy to that which he espoused during the 2000 Presidential election campaign?
Can a person refuse a presidential pardon?
Am I a Rude Number?
Pendulum Rotation
Rear brake cable temporary fix possible?
Does Windows 10's telemetry include sending *.doc files if Word crashed?
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
3 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 3 hours ago
CuriousDeveloper
New contributor
asked 4 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
3 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
3 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
3 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
3 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 3 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 3 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
3 hours ago