Solved

12 Person rotating pairs

Posted on 2016-11-01
7
66 Views
Last Modified: 2016-11-22
Hi Everyone,

I have a curly one that I just cannot figure out.  Here is the problem.  I have a team of players who bat in pairs, ordered from positions 1 thru 12.  I want to create a roster pattern whereby each player has an opportunity to bat in each position (1-12), but also paired with every other player.   Any help would be really appreciated
0
Comment
Question by:Paul Palladino
7 Comments
 
LVL 51

Expert Comment

by:Ryan Chong
ID: 41869525
do you mean a round robin playing?

Round-robin tournament
https://en.wikipedia.org/wiki/Round-robin_tournament

do you want to do it in Excel or Access? how you want to present the games? we probably need further info here.
0
 
LVL 27

Expert Comment

by:d-glitch
ID: 41870659
You have 6 pairs, 12 players,  and 12 positions, and you want to change player positions and partnerships every game.

There won't be a perfect solution, be cause there are 12 positions and 11 partners for each player.
So every player will have to repeat a partner before he gets to all 12 positions.

You might do well with random assignment, discarding and arrangements that show too much overlap with past solutions.  I have worked on similar scheduling problems in prior questions.  Here is one of the links:
     https://www.experts-exchange.com/questions/28897351/Rotation-for-Euchre-game.html

You are welcome to modify one of the Python programs.  If you clarify your requirements, I may try myself.
0
 
LVL 27

Accepted Solution

by:
aburr earned 250 total points (awarded by participants)
ID: 41870749
It is unclear to me how many players are involved. I will assume 24 players and 12 positions or venues.
Draw a column of 12 squares vertically. Put a column of dots on each side of the squares. Name one column of dots A, the other B. Put a player in each dot.
Now rotate the players in B  while keeping A constant. At the end of the rotations (12 games) all players will have played each other, and all players in column B will have played in each position.
Now repeat, keeping column B constant, and rotating column A. At the end, all players will have played in each position and everybody will have played everybody else twice.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 27

Expert Comment

by:d-glitch
ID: 41870983
I have modified my Random Assignment program in Python for 12 persons.

It is set to not allow any duplication in pairing or position.  It takes 15 min to run 20M deals.  So far, it has always found six clean rounds, and never found seven.

Deals:  0         Round:  1   Coll: 0    [1, 2] [3, 4] [5, 6] [7, 8] [9, 10] [11, 12]
Deals:  1         Round:  2   Coll: 0    [4, 11] [5, 9] [8, 12] [1, 3] [2, 6] [7, 10]
Deals:  461       Round:  3   Coll: 0    [5, 6] [4, 12] [1, 2] [9, 10] [3, 7] [8, 11]
Deals:  2368      Round:  4   Coll: 0    [6, 10] [9, 11] [3, 8] [5, 7] [1, 12] [2, 4]
Deals:  10022     Round:  5   Coll: 0    [3, 5] [1, 10] [2, 7] [6, 12] [8, 11] [4, 9]
Deals:  3788258   Round:  6   Coll: 0    [10, 12] [6, 7] [4, 9] [2, 11] [5, 8] [1, 3]

Open in new window

I can find additional, imperfect solutions by modifying the program to relax the duplication requirements.  Stay tuned . . .
0
 
LVL 27

Assisted Solution

by:d-glitch
d-glitch earned 250 total points (awarded by participants)
ID: 41872747
I found and corrected some errors in my program.  The best solution so far is shown below.

It took 28M deals to find 8 clean rounds.
After 40M deals, the number of duplications allowed starts to increase.

 1  Deals:    0   Err: 0     [ 1,  2] [ 3,  4] [ 5,  6] [ 7,  8] [ 9, 10] [11, 12]
 2  Deals:    3   Err: 0     [10,  7] [11,  2] [ 6,  9] [ 8,  4] [12,  5] [ 3,  1]
 3  Deals:   69   Err: 0     [ 5,  3] [ 8, 10] [ 4,  1] [12,  2] [ 7,  9] [ 6, 11]
 4  Deals:  214   Err: 0     [ 4,  9] [ 6, 12] [ 2, 10] [ 1, 11] [ 8,  3] [ 7,  5]
 5  Deals:  12K   Err: 0     [11,  4] [ 9,  1] [ 7,  2] [ 6, 10] [ 3, 12] [ 5,  8]
 6  Deals:  13K   Err: 0     [ 8,  1] [10, 11] [12,  7] [ 2,  5] [ 6,  4] [ 9,  3]
 7  Deals: 374K   Err: 0     [ 3,  6] [ 1,  7] [10,  5] [ 9, 12] [11,  8] [ 4,  2]
 8  Deals:  28M   Err: 0     [ 9,  8] [ 2,  6] [ 3, 11] [ 4,  7] [ 5,  1] [12, 10]
 9  Deals:  60M   Err: 2     [ 9, 11] [ 4,  5] [ 1, 12] [10,  3] [ 2,  7] [ 8,  6]
10  Deals:  84M   Err: 3     [ 2,  3] [12,  8] [11,  4] [ 5,  9] [ 1,  6] [10,  7]
11  Deals: 134M   Err: 5     [ 6, 12] [ 7,  3] [ 2,  8] [11,  5] [10,  4] [ 1,  9]
12  Deals: 200M   Err: 8     [ 1, 10] [ 5,  6] [ 8,  3] [11,  7] [ 9,  2] [12,  4]

Solution  9:  Player 9 repeats at the Position 1 [Sol 8]
              Partnership [2,  7] occurs for the second time [Sol 5]

Solution 10:  Player 3 repeats at the Position 2 [Sol 3]
              Partnership [4, 11] occurs for the second time [Sol 5]
              Partnership [7, 10] occurs for the second time [Sol 2]

Solution 11:  Player 2 repeats at the Position  5 [Sol 4]
              Player 5 repeats at the Position  8 [Sol 6]
              Player 4 repeats at the Position 10 [Sol 6]
              Partnership [6, 12] occurs for the second time [Sol 4]
              Partnership [1,  9] occurs for the second time [Sol 5]

Open in new window

0
 
LVL 23

Expert Comment

by:Danny Child
ID: 41873276
Think we need more info here...
If player A is in slot 1, batting with B (in 2) - is that a different setup to B in 1, and A in 2?

If A can play in 1 - 12, that's 11 games with B below him (he can't be below in the 12th game).
Same for C, etc... for all 11 other letters.  = 11 x 11 = 121 options

And repeat for B in the primary, and for C, and D, etc = 11 more use-cases = 121 * 11 = 1331

And this assumes that you're not worried about totally unique player sequences, eg as long as C and D played in 3rd and 4th place, as well as 4th and 3rd place, it doesn't matter where A and B were in those games.  Otherwise it's all at 12! (factorial) ie 12*11*10*9*8*7*6*5*4*3*2*1 = 479001600 and you're playing cricket till the heat death of the universe occurs....
0
 
LVL 27

Expert Comment

by:aburr
ID: 41897217
It was pointed out that there was some ambiguity in the question. Two answerers made reasonable assumptions and provided answers.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finding a job can be stressful - searches, resume tweaks, and networking events can be super boring. Luckily we're here to help you land your dream job!
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Where to go on the main page to find the job listings. How to apply to a job that you are interested in from the list that is featured on our Careers page.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question