background image

APPENDIX 3

Draw Algorithm

Drawing utilizes a random number generator that is seeded with a start time 
(

http://linux.die.net/man/2/time

, 

http://linux.die.net/man/3/rand

).

Choosing Contestants for the Drawing

Choose a random position in the competitors list. Go through the list until a competitor fulfilling the 
criteria is found. The competitors are selected in the following order:

1. Seeded starting from the 1

st

 seeded.

2. Competitors from the same club/country than the seeded starting from the 1

st

 seeded's 

club/country.

3. Those competitors whose club/country has the most participants. If there is equal amount 

of participants club/country is selected randomly.

The third point is because it is easier to draw the competitors as far as possible from the other 
competitors from the same club or country.

Double Knockout

In double knockout systems the sheet is divided into two half tables (1 and 2). The half tables are 
divided into two quarter tables (A, B, C, and D). Drawing is conducted as follows:

1. Select a random half table, quarter table, and number for the 1

st

 seeded.

2. Select a random quarter table and number from the other half table for the 2

nd

 seeded.

3. For the 3

rd

 seeded select a random number from the same half table but different quarter 

table than for the 2

nd

 seeded.

4. For the 4

th

 seeded select a random number from the same half table but different quarter 

table than for the 1

st

 seeded.

5. Rest of the contestants are drawn in the previously explained order. Position in the table is 

defined using classification of the positions to ensure that competitors from the same 
club/country are spread as far from each other as possible.

Give “badness” points to the positions of the sheet:
- If there is an opponent for the position give one point.
- If the first opponent would be from the same club/country add 4 points for the position. If 
the opponent is seeded add one more point.
- Double the search area to four matches. If this wider area contains a competitor from the 
same club/country add another 5 or 6 points i.e. the second match would be against a 
contestant from the same club/country.
- Continue doubling the search area till the size of the area is a half table. 

An example clarifies the algorithm. There is a table for a 16 player double knockout system. 
In the upper half is a competitor from the same club and in the lower half is another 
competitor from the same club: