Combinatorics: Pairing seeded entries for a tournament round

317 Views Asked by At

I am working on a software that implements the Burstein Swiss Pairing System (https://www.fide.com/fide/handbook.html?id=85&view=article).

In each round of play, this system forms score groups containing players with the same match score (score for won and drawn matches). Within a score group, all players are ranked according certain criteria. The goal of the Burstein system is to pair the best-ranked player of a score group with the lowest one, the second-highest with the second-lowest and so on. When some of the paired players have already played each other, a less optimal pairing has to be chosen (if possible).

Example: In a scoring group of 6 ranked players, the following 15 pairings are possible (from optimal to worst-case in descending order):

1v6 2v5 3v4
1v6 2v4 3v5
1v6 2v3 4v5
1v5 2v6 3v4
1v5 2v4 3v6
1v5 2v3 4v6
1v4 2v6 3v5
1v4 2v5 3v6
1v4 2v3 5v6
1v3 2v6 4v5
1v3 2v5 4v6
1v3 2v4 5v6
1v2 3v6 4v5
1v2 3v5 4v6
1v2 3v4 5v6

What I am looking for is an algorithm that generates these kind of pairings for an arbitrary number of players. At least, it would be good to know about the mathematical concept behind this. I know about combinations, permutations and variations, but none of these seems to apply here (as far as I understand).

If you post any code, the use of Java, C# or Pascal would be appreciated and understood. ;-)

0

There are 0 best solutions below