Generate Golf Foursomes?

KingFrek

New Member
Joined
Jul 18, 2011
Messages
3
Hello,

I am trying to use Excel/VBA to generate a series of golf foursomes for up to 20 players. The catch is that I would like each player to play with as many different people in the group as possible (i.e. no repeats). I'm pretty good at Excel and VBA but conceptually can't get my head around this one. Any suggestions/examples? Thanks.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
sounds homework-ish to me. There are a bunch of threads like that on the forumn. I'll do so searching for you to help get you started.
 
Upvote 0
Thanks for the research. Definitely not homework (my college years are long gone), actually my father is looking for this. But of course, no way to really prove that so I understand where you are coming from.
 
Upvote 0
I can't find the forum I posted in 0.0

I've posted in too many, and I can't find any that pertain to this.
 
Upvote 0
Thanks for looking. I have no problem generating the group of 20 so there are no duplicates in that list, but repeating that four times and comparing the the first foursome against the second, etc. is where I am having trouble. I presume I could create an array for each "player", store the other players he is playing with and check those arrays, but that seems like a lot of work times 20 players. I'd be ok with just establishing a pattern that works where my dad could just change the names around (or I make a button that would shuffle them around manually).
 
Upvote 0
While it sounds like it shouldnt be too hard, this is a version of what is called the dining problem - there is a whole branch of maths associated with it - and the bad news is that once you get beyond a trivial number of players/diners it becomes effectively impossible to solve - and as you spotted a brute force effort rapidly runs into the sand because of the fearsome number of combinations you have to consider.

If you want to do this I think you have to relax the constraints so people are allowed to meet again after a few rounds and then either a repeating pattern or a brute force random approach will work. I have done this is by selecting each player in turn at random from players who are eligible (i.e. have not played with any of the players in that group in the last few weeks) until either all players have a seat or I run out of elligible players in which case I start again until I find a combination that works. However, run times shoot up the tighter the constraint is and there is probably a significant speed advantage from "backtracking" to explore more branches from partial sollutions - say with 80% of the seats filled - rather than starting from zero each time but I have never bothered to try this.
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,628
Members
452,933
Latest member
patv

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top