Zyrenthian
Programmer
Hi All,
I play in a card league every tuesday night and at the beginning of the season, the bartender who runs the league asked me if it was possible to create a unique schedule every week so every player was partnered with every other player. The question came about because a few of the players complain that they sit with the same people almost every week. What I have been trying to do for the past 18 weeks is to come up with a new way to generate the schedule with the following restrictions...
1. Each player will be paired up with a new partner every week.
2. Each player will not sit with someone who was at their table the privious week
3. A table constists of 4 players (2 vs 2) where Player A has an opponent on either side and his partner sitting across from him
4. The tournament will last no more then 20 weeks and in the case of 16 or 20 players, players WILL be partnered with someone they partnered with prior. (pigeon hole principle)
The card game is pitch (high/low/jack or set back)
The number of players in the league is a multiple of 4 and will only be 16,20,or 24. Max and min was set by the bartender.
I am not asking for code, I am asking for any ideas on how to go about generating a unique schedule for every week. I have tried arrays, linked lists, circular linked lists, and many other ideas but all produce either one of 2 results...
a unique sequence for part of the season but not the whole season
a sequence that repeats itself after x sequences are generated.
Any insight to this would be greatly appreciated.
matt
I play in a card league every tuesday night and at the beginning of the season, the bartender who runs the league asked me if it was possible to create a unique schedule every week so every player was partnered with every other player. The question came about because a few of the players complain that they sit with the same people almost every week. What I have been trying to do for the past 18 weeks is to come up with a new way to generate the schedule with the following restrictions...
1. Each player will be paired up with a new partner every week.
2. Each player will not sit with someone who was at their table the privious week
3. A table constists of 4 players (2 vs 2) where Player A has an opponent on either side and his partner sitting across from him
4. The tournament will last no more then 20 weeks and in the case of 16 or 20 players, players WILL be partnered with someone they partnered with prior. (pigeon hole principle)
The card game is pitch (high/low/jack or set back)
The number of players in the league is a multiple of 4 and will only be 16,20,or 24. Max and min was set by the bartender.
I am not asking for code, I am asking for any ideas on how to go about generating a unique schedule for every week. I have tried arrays, linked lists, circular linked lists, and many other ideas but all produce either one of 2 results...
a unique sequence for part of the season but not the whole season
a sequence that repeats itself after x sequences are generated.
Any insight to this would be greatly appreciated.
matt