Jump to content

SINGLE Round Robin Tournament


Zugzwangle

Recommended Posts

Hi all. 
I have a question involving a Round Robin sporting event. I want to create a formula to evenly distribute home and away matches. Firstly, to less complicate the situation, I need only consider even number participants in the tournament, as I would substitute a 'bye' with an extra number if need be.
You can visualise the Round Robin Schedule below.
However I am going to complicate the issue. This is a Single Round robin - so each team plays each other team ONCE only.
From my own mathematical findings, I have found that:
Participants
1). Matches per round = P / 2
2). Rounds = P - 1
3). Games (or I considered this the 'area' of the triangle, and hence a triangle number) , so the nth triangle number =  (P^2 - P) / 2. (Multiply matches per round by Rounds)
4). If I create a Round Robin using a rotating formula such as this where the numbers rotate around the first number (1) the numbers are not correctly distributed between home and away
R1  R2  R3 R4 
12   16  15  etc ....
63   52  41 ....
54   43  32 ....
=>>>> works out as
If H = Home, A=Away
Participant 1 HHHHH
Participant 2 AAHHH
Participant 3 AAHHH
Participant 4 AAHHH
Participant 5 AAHHH
Participant 6 AAHHH

An example of how the finished tournament would look like:

Participant 1 HAHAH
Participant 2 AHAHA
Participant 3 HAHAH
Participant 4 AHAHA
Participant 5 HAHAH
Participant 6 AHAHA

Given I have already paired the participants, how might I go about formulating an equally distributed Single Round Robin Tournament!!

Link to comment
Share on other sites

I have been given this formula.

n = teams / 2...

The teams should only be even numbers. n is always even!!

(1,2,3,4... 2n .... ) which sums up to:
 if (i v j)  ---> 1 < (|i-j| % 2n) < n - 1 ,   i = home,
 if (i v j)  ---> n + 1 < (|i-j| % 2n) < 2n - 1,   i = home, 
if (i v j)  --->  (|i-j| % 2n) = n  and ( i > j) i = home else i = away

 

This produces an array of 12 teams such as: 

Where Rounds --> Matches --> Teams --> Team numbers


Array
(
    [0] => Array
        (
            [0] => Array
                (
                    [0] => 7
                    [1] => 1
                )

            [1] => Array
                (
                    [0] => 8
                    [1] => 2
                )

            [2] => Array
                (
                    [0] => 9
                    [1] => 3
                )

            [3] => Array
                (
                    [0] => 10
                    [1] => 4
                )

            [4] => Array
                (
                    [0] => 11
                    [1] => 5
                )

            [5] => Array
                (
                    [0] => 12
                    [1] => 6
                )

        )

    [1] => Array
        (
            [0] => Array
                (
                    [0] => 2
                    [1] => 1
                )

            [1] => Array
                (
                    [0] => 3
                    [1] => 7
                )

            [2] => Array
                (
                    [0] => 4
                    [1] => 8
                )

            [3] => Array
                (
                    [0] => 5
                    [1] => 9
                )

            [4] => Array
                (
                    [0] => 6
                    [1] => 10
                )

            [5] => Array
                (
                    [0] => 12
                    [1] => 11
                )

        )

    [2] => Array
        (
            [0] => Array
                (
                    [0] => 1
                    [1] => 3
                )

            [1] => Array
                (
                    [0] => 4
                    [1] => 2
                )

            [2] => Array
                (
                    [0] => 5
                    [1] => 7
                )

            [3] => Array
                (
                    [0] => 6
                    [1] => 8
                )

            [4] => Array
                (
                    [0] => 12
                    [1] => 9
                )

            [5] => Array
                (
                    [0] => 11
                    [1] => 10
                )

        )

    [3] => Array
        (
            [0] => Array
                (
                    [0] => 4
                    [1] => 1
                )

            [1] => Array
                (
                    [0] => 5
                    [1] => 3
                )

            [2] => Array
                (
                    [0] => 6
                    [1] => 2
                )

            [3] => Array
                (
                    [0] => 12
                    [1] => 7
                )

            [4] => Array
                (
                    [0] => 11
                    [1] => 8
                )

            [5] => Array
                (
                    [0] => 10
                    [1] => 9
                )

        )

    [4] => Array
        (
            [0] => Array
                (
                    [0] => 1
                    [1] => 5
                )

            [1] => Array
                (
                    [0] => 6
                    [1] => 4
                )

            [2] => Array
                (
                    [0] => 3
                    [1] => 12
                )

            [3] => Array
                (
                    [0] => 2
                    [1] => 11
                )

            [4] => Array
                (
                    [0] => 10
                    [1] => 7
                )

            [5] => Array
                (
                    [0] => 9
                    [1] => 8
                )

        )

    [5] => Array
        (
            [0] => Array
                (
                    [0] => 6
                    [1] => 1
                )

            [1] => Array
                (
                    [0] => 5
                    [1] => 12
                )

            [2] => Array
                (
                    [0] => 4
                    [1] => 11
                )

            [3] => Array
                (
                    [0] => 3
                    [1] => 10
                )

            [4] => Array
                (
                    [0] => 2
                    [1] => 9
                )

            [5] => Array
                (
                    [0] => 8
                    [1] => 7
                )

        )

    [6] => Array
        (
            [0] => Array
                (
                    [0] => 1
                    [1] => 12
                )

            [1] => Array
                (
                    [0] => 11
                    [1] => 6
                )

            [2] => Array
                (
                    [0] => 10
                    [1] => 5
                )

            [3] => Array
                (
                    [0] => 9
                    [1] => 4
                )

            [4] => Array
                (
                    [0] => 8
                    [1] => 3
                )

            [5] => Array
                (
                    [0] => 7
                    [1] => 2
                )

        )

    [7] => Array
        (
            [0] => Array
                (
                    [0] => 11
                    [1] => 1
                )

            [1] => Array
                (
                    [0] => 10
                    [1] => 12
                )

            [2] => Array
                (
                    [0] => 9
                    [1] => 6
                )

            [3] => Array
                (
                    [0] => 8
                    [1] => 5
                )

            [4] => Array
                (
                    [0] => 7
                    [1] => 4
                )

            [5] => Array
                (
                    [0] => 2
                    [1] => 3
                )

        )

    [8] => Array
        (
            [0] => Array
                (
                    [0] => 1
                    [1] => 10
                )

            [1] => Array
                (
                    [0] => 9
                    [1] => 11
                )

            [2] => Array
                (
                    [0] => 8
                    [1] => 12
                )

            [3] => Array
                (
                    [0] => 7
                    [1] => 6
                )

            [4] => Array
                (
                    [0] => 2
                    [1] => 5
                )

            [5] => Array
                (
                    [0] => 3
                    [1] => 4
                )

        )

    [9] => Array
        (
            [0] => Array
                (
                    [0] => 9
                    [1] => 1
                )

            [1] => Array
                (
                    [0] => 8
                    [1] => 10
                )

            [2] => Array
                (
                    [0] => 7
                    [1] => 11
                )

            [3] => Array
                (
                    [0] => 12
                    [1] => 2
                )

            [4] => Array
                (
                    [0] => 3
                    [1] => 6
                )

            [5] => Array
                (
                    [0] => 4
                    [1] => 5
                )

        )

    [10] => Array
        (
            [0] => Array
                (
                    [0] => 1
                    [1] => 8
                )

            [1] => Array
                (
                    [0] => 7
                    [1] => 9
                )

            [2] => Array
                (
                    [0] => 10
                    [1] => 2
                )

            [3] => Array
                (
                    [0] => 11
                    [1] => 3
                )

            [4] => Array
                (
                    [0] => 12
                    [1] => 4
                )

            [5] => Array
                (
                    [0] => 5
                    [1] => 6
                )

        )

)

If displayed as, Teams --> Rounds --> Home / Away.. it looks like this:

Array
(
    [1] => Array
        (
            [0] => 1
            [1] => 1
            [2] => 0
            [3] => 1
            [4] => 0
            [5] => 1
            [6] => 0
            [7] => 1
            [8] => 0
            [9] => 1
            [10] => 0
        )

    [2] => Array
        (
            [0] => 1
            [1] => 0
            [2] => 1
            [3] => 1
            [4] => 0
            [5] => 0
            [6] => 1
            [7] => 0
            [8] => 0
            [9] => 1
            [10] => 1
        )

    [3] => Array
        (
            [0] => 1
            [1] => 0
            [2] => 1
            [3] => 1
            [4] => 0
            [5] => 0
            [6] => 1
            [7] => 1
            [8] => 0
            [9] => 0
            [10] => 1
        )

    [4] => Array
        (
            [0] => 1
            [1] => 0
            [2] => 0
            [3] => 0
            [4] => 1
            [5] => 0
            [6] => 1
            [7] => 1
            [8] => 1
            [9] => 0
            [10] => 1
        )

    [5] => Array
        (
            [0] => 1
            [1] => 0
            [2] => 0
            [3] => 0
            [4] => 1
            [5] => 0
            [6] => 1
            [7] => 1
            [8] => 1
            [9] => 1
            [10] => 0
        )

    [6] => Array
        (
            [0] => 1
            [1] => 0
            [2] => 0
            [3] => 0
            [4] => 0
            [5] => 0
            [6] => 1
            [7] => 1
            [8] => 1
            [9] => 1
            [10] => 1
        )

    [7] => Array
        (
            [0] => 0
            [1] => 1
            [2] => 1
            [3] => 1
            [4] => 1
            [5] => 1
            [6] => 0
            [7] => 0
            [8] => 0
            [9] => 0
            [10] => 0
        )

    [8] => Array
        (
            [0] => 0
            [1] => 1
            [2] => 1
            [3] => 1
            [4] => 1
            [5] => 0
            [6] => 0
            [7] => 0
            [8] => 0
            [9] => 0
            [10] => 1
        )

    [9] => Array
        (
            [0] => 0
            [1] => 1
            [2] => 1
            [3] => 1
            [4] => 0
            [5] => 1
            [6] => 0
            [7] => 0
            [8] => 0
            [9] => 0
            [10] => 1
        )

    [10] => Array
        (
            [0] => 0
            [1] => 1
            [2] => 1
            [3] => 0
            [4] => 0
            [5] => 1
            [6] => 0
            [7] => 0
            [8] => 1
            [9] => 1
            [10] => 0
        )

    [11] => Array
        (
            [0] => 0
            [1] => 1
            [2] => 0
            [3] => 0
            [4] => 1
            [5] => 1
            [6] => 0
            [7] => 0
            [8] => 1
            [9] => 1
            [10] => 0
        )

    [12] => Array
        (
            [0] => 0
            [1] => 0
            [2] => 0
            [3] => 0
            [4] => 1
            [5] => 1
            [6] => 1
            [7] => 1
            [8] => 1
            [9] => 0
            [10] => 0
        )

)

As you can see, although there ARE a fairly distributed number of teams with home or away, in some cases there are long strings of matches at home, for some teams!!

Can you help me sort this one out!! 

Please try if you can. 
 

Thanks in advance

Edited by Zugzwangle
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.