I need to create unique team versus team match ups for tournaments that I hold.
For a given number of teams I need to find a given number games.
Example:
10 Teams 5 games each would mean each team would play games against 5 unique opponents.
I can load a table with unique combinations but struggle with the logic when it comes to picking each team's match ups. What happens is you run out of match ups when you loop through the table picking match ups because teams get used up in a linear fashion and by the time you reach the higher numbered teams there are not enough unique combos left.
As a human, I can recognize this, say in a spreadsheet, and anticipate it thus "saving" some earlier teams for match ups later.
Example:
1 vs. 2
1 vs. 3
1 vs. 4
1 vs. 9
1 vs. 10
Instead of:
1 vs. 2
1 vs. 3
1 vs. 4
1 vs. 5
1 vs. 6
So I am looking for help on how to search a table of match ups and selecting a given number for each team and having enough match ups for each team available.
Good luck and thanks in advance.
For a given number of teams I need to find a given number games.
Example:
10 Teams 5 games each would mean each team would play games against 5 unique opponents.
I can load a table with unique combinations but struggle with the logic when it comes to picking each team's match ups. What happens is you run out of match ups when you loop through the table picking match ups because teams get used up in a linear fashion and by the time you reach the higher numbered teams there are not enough unique combos left.
As a human, I can recognize this, say in a spreadsheet, and anticipate it thus "saving" some earlier teams for match ups later.
Example:
1 vs. 2
1 vs. 3
1 vs. 4
1 vs. 9
1 vs. 10
Instead of:
1 vs. 2
1 vs. 3
1 vs. 4
1 vs. 5
1 vs. 6
So I am looking for help on how to search a table of match ups and selecting a given number for each team and having enough match ups for each team available.
Good luck and thanks in advance.
Comment