I had a doubt yesterday on how to schedule pairings in a Round Robin tournament. I guess that there are programmes such as Swiss-Manager or Swiss Perfect that can handle those pairings without any difficulty, as expected. But they are not freeware IIRC, so I searched a handmade method for schedule the pairings, until I found one of them: the Schurig algorithm, sometimes called 'Berger tables'. Here are two links (in Spanish) with the explanation of the algorithm, and other link with Berger tables:
http://ajedrezmagico.blogspot.com.es/20 ... ontra.html
http://ajedrezpueblonuevo.com/ajedrez/i ... 43:general
http://www.portaldeajedrez.cl/berger.htm
This algorithm is very easy to use by hand, but writing a programme of it is another story, specially for a non-programmer as me. I struggled for getting the correct sequence for any number of players until I got it yesterday! Minor aesthetic changes came today. My code is fully original so it may contain errors although I do not expect them because I have checked many tables generated by my programme (using the Schurig algorithm) with other trusted tables, and pairings match one by one without exception... it is a good start!
Round_Robin_pairings_generator is programmed in Fortran 95 and it is relatively fast in my computer: the maximum number of supported players is 64 (which is a parameter that can be easily enlarge in the source code, then recompile it) and this extreme case usually takes around 0.6 seconds in my computer; obviously: less players imply less elapsed time. Here is an example of how Round_Robin_pairings_generator looks when a double click is done on the executable and the desired data is input:
Code: Select all
Round_Robin_pairings_generator, ® 2012.
Write down the number of players of the Round Robin tournament (up to 64):
64
Write down the clock rate of the CPU (in GHz), only for timing the elapsed time of the calculations:
3
End of the implementation of Schurig algorithm. Approximated elapsed time: 599 ms.
The pairings have been saved in Pairings.txt file.
Thanks for using Round_Robin_pairings_generator. Press Enter to exit.
Code: Select all
Pairings in a round robin tournament with 5 different players.
Number of games in this tournament:
a) Single Round Robin tournament: 10 games.
b) Double Round Robin tournament: 20 games; the second half has the same pairings (colour reversed).
An odd number of players means that player 6 is fictional and it must be understood as a bye.
---------
Round 1:
1- 6
2- 5
3- 4
---------
Round 2:
6- 4
5- 3
1- 2
---------
Round 3:
2- 6
3- 1
4- 5
---------
Round 4:
6- 5
1- 4
2- 3
---------
Round 5:
3- 6
4- 2
5- 1
---------
End of the implementation of Schurig algorithm. Approximated elapsed time: 35 ms.
Thanks for using Round_Robin_pairings_generator.Code: Select all
Pairings in a round robin tournament with 8 different players.
Number of games in this tournament:
a) Single Round Robin tournament: 28 games.
b) Double Round Robin tournament: 56 games; the second half has the same pairings (colour reversed).
---------
Round 1:
1- 8
2- 7
3- 6
4- 5
---------
Round 2:
8- 5
6- 4
7- 3
1- 2
---------
Round 3:
2- 8
3- 1
4- 7
5- 6
---------
Round 4:
8- 6
7- 5
1- 4
2- 3
---------
Round 5:
3- 8
4- 2
5- 1
6- 7
---------
Round 6:
8- 7
1- 6
2- 5
3- 4
---------
Round 7:
4- 8
5- 3
6- 2
7- 1
---------
End of the implementation of Schurig algorithm. Approximated elapsed time: 40 ms.
Thanks for using Round_Robin_pairings_generator.Round_Robin_pairings_generator.rar (0.6 MB)
Have fun! Corrections are welcomed as usual.
Regards from Spain.
Ajedrecista.

