Social Golfer Problem

doub08 ={7,"AB CD EF GH
AC BD EG FH
AD BC EH FG
AE BF CG DH
AF BE CH DG
AG BH CE DF
AH BG CF DE"};

doub10 ={9,"AB CD EF GH IJ
AC BD EG FI HJ
AD BC EJ FG HI
AE BF CH DI GJ
AF BE CJ DH GI
AG BI CE DJ FH
AH BG CI DE FJ
AJ BH CF DG EI
AI BJ CG DF EH"};

doub12 ={11,"AB CD EF GH IJ KL
AC BD EG FH IK JL
AD BC EH FG IL JK
AE BF CI DJ GK HL
AF BE CJ DI GL HK
AK BL CE DF GI HJ
AL BK CF DE GJ HI
AG BH CK DL EI FJ
AH BG CL DK EJ FI
AI BJ CG DH EK FL
AJ BI CH DG EL FK"};

doub14={13,"AB CD EF GH IJ KL MN
AC BD EG FH IK JM LN
AD BC EH FG IN JK LM
AE BF CG DH IL JN KM
AF BE CH DG IM JL KN
AI BJ CE DK FL GM HN
AJ BI CK DE FN GL HM
AK BM CF DI EJ GN HL
AL BN CI DF EM GJ HK
AG BK CL DN EI FM HJ
AM BG CJ DL EN FK HI
AH BL CN DM EK FJ GI
AN BH CM DJ EL FI GK"};

doub16 ={15,"AB CD EF GH IJ KL MN OP
AC BD EG FH IK JL MO NP
AD BC EH FG IL JK MP NO
AE BF CG DH IM JN KO LP
AF BE CH DG IN JM KP LO
AG BH CE DF IO JP KM LN
AH BG CF DE IP JO KN LM
AI BJ CK DL EM FN GO HP
AJ BI CL DK EN FM GP HO
AK BL CI DJ EO FP GM HN
AL BK CJ DI EP FO GN HM
AM BN CO DP EI FJ GK HL
AN BM CP DO EJ FI GL HK
AO BP CM DN EK FL GI HJ
AP BO CN DM EL FK GJ HI"};

doub18 ={17,"AB CD EF GH IJ KL MN OP QR
AC BD EG FH IK JL MO NQ PR
AD BC EH FG IL JK MR NO PQ
AE BF CG DH IM JN KP LQ OR
AF BE CH DG IN JM KR LP OQ
AG BH CE DF IO JQ KM LR NP
AH BG CF DE IP JO KQ LM NR
AI BJ CK DL EN FO GP HR MQ
AJ BI CL DK EO FN GR HQ MP
AK BM CI DJ EQ FR GN HP LO
AM BK CJ DI ER FP GQ HO LN
AL BP CQ DR EI FJ GM HN KO
AP BL CR DQ EJ FI GO HM KN
AN BO CM DP EK FQ GI HL JR
AQ BR CN DO EM FK GL HI JP
AO BQ CP DN EL FM GJ HK IR
AR BN CO DM EP FL GK HJ IQ"};

trip12 = {4,"ABC DEF GHI JKL
ADG BEJ CHK FIL
AHJ BDL CEI FGK
AIK BFH CDJ EGL"};

trip15 = {7,"ABC DEF GHI JKL MNO
ADG BEJ CFM HKN ILO
AEN BDO CHL FIK GJM
AIM BGL CDK EHO FJN
AHJ BKM CEI DLN FGO
AFL BIN CJO DHM EGK
AKO BFH CGN DIJ ELM"};

trip18 ={8, "ABC DEF GHI ahf dbi gec
Abc Def Ghi aHF dBI gEC
abC deF ghI AHf DBi GEc
aBc dEf gHi AhF DbI GeC
ADG BEH CFI aei bfg cdh
Adg Beh Cfi aEI bFG cDH
adG beH cfI AEi BFg CDh
aDg bEh cFi AeI BfG CdH"};

trip21 = {10,"ABF EGM DKR INP CJT HOU LQS
DEJ HIK BNO AQR CLU FMS GPT
AHL JKO EIQ CNR BGS DMT FPU
BCD FHN ELP GOQ AKT IMU JRS
EFK IGL COM BRP AJU DNS HQT
BIJ KLM FGR AOP CHS ENT DQU
CAE DIO FJQ HMR BLT GNU KPS
FDL GHJ AMN CPQ BKU EOS IRT
CGK LJN DHP BMQ AIS FOT ERU
STU ADG BEH CFI JMP KNQ LOR"};

trip24 ={11, "ABC DEF GHI JKL MNO PQR STU VWX
JOT ESB API DML HCV QWN FKU GRX
DVK SFO JQI EHL PTG WRC BMU ANX
EGM FBV DWI SPL QKA RNT OHU JCX
SAH BOG ERI FQL WMJ NCK VPU DTX
FJP OVA SNI BWL RHD CTM GQU EKX
BDQ VGJ FCI ORL NPE TKH AWU SMX
OEW GAD BTI VNL CQS KMP JRU FHX
VSR AJE OKI GCL TWF MHQ DNU BPX
GFN JDS VMI ATL KRB HPW ECU OQX
AFMR BNHJ CPOD EQVT GKSW IXUL"};

trip27 ={13,"YZ+ ABC DEF GHI JKL MNO PQR STU VWX
MTR DW+ SLZ ANU VBF EOY GJP IXC HKQ
JQO PIZ VKR SWC BLY AT+ DGM FUX EHN
SBX KUY JE+ ARZ GTC DHL OFI NQW MPV
AHF JNR QCY PK+ GXZ MBI SVD ULO TWE
GNL SHO PTX WIY VQ+ MFZ CRU BEK ADJ
PWU GB+ VOZ DQX AEI HRY KNT JMS LCF
VEC NXY MH+ DUZ JWF GKO PSA RIL QTB
DKI MQU TFY SN+ JCZ PEL WBH VAG XOR
MEX JTI DBR AQL VHU PNF OC+ KWZ SGY
GQF AWO VNI SER MKC JBU LX+ HTZ PDY
VTL SKF PBO JHX GWR DNC EQZ MAY IU+
PHC MWL GEU DTO AKX SQI JVY FR+ BNZ"};

quad16 ={4,"AEIM BFJN CGKO DHLP
AFKP BELO CHIN DGJM
AGLN BHKM CEJP DFIO
AHJO BGIP CFLM DEKN"};

quad20 ={5,"ABCD EFGH IJKL MNOP QRST
AEIM BFJQ CGNR DKOS HLPT
AFOT BELR CIPS DGJM HKNQ
AJPR BHMS CEKT DFIN GLOQ
ALNS BGIT CHJO DEPQ FKMR"};

quad24={7,"ABKU IJSE QRCM DGFX HLNO PTVW
ACLV IKTF QSDN EHGR BMOP JUWX
ADMW ILUG QTEO FBHS CJNP KRVX
AENX IMVH QUFP GCBT DJKO LRSW
AFOR INWB QVGJ HDCU EKLP MSTX
AGPS IOXC QWHK BEDV FJLM NRTU
AHJT IPRD QXBL CFEW GKMN OSUV"};

quad28 ={9, "ABCD EFGH IJKL MNab cdef ghij klmn
AEgk BFMc Ndhl GIem HJai CKbn DLfj
AFjn BEae bfim HKcl GLMh CINk DJdg
AIci BJNn EKMj FLdm begl CGaf DHhk
AGbd BHgm ELNi achn FKfk CJej DIMl
AKeh BLbk FIag EJfl Ncjm CHMd DGin
AHNf BGjl FJbh Meik EIdn CLcg DKam
ALal BKdi GJck Mfgn HIbj CEhm DFNe
AJMm BIfh CFil DEbc GKNg HLen adjk"};

quad32 ={10,"ABCD EFGH IJKL MNPO abcd efgh ijkl mnop
AEIm BgcH DFKp kPdf Maei ChbG jNoL lJnO
Alof Bhkm DNGi FaLO MbHK CPeJ Ejcp gIdn
AciL BjdK DkbJ FgoP fGOp CIla EhMn NeHm
AgNK BElP DIoH hdiO beLp Cjfm FMcJ kaGn
AhJp BFin DcmO INbf leGK CMod EgkL jPaH
AFde BoGJ DEaf hlNc PiKm CHLn gjbO IkMp
APbn BNap DglM koce fHiJ CEKO FhIj dGLm
AjMG BIeO DhPL gaJm cfKn CFkN Eobi ldHp
AkHO BMfL Djen Flbm IPcG Cgip ENdJ hoaK"};

quad36 = {11,"BCNP HRlm Dkor Fhnp AJaj KLEG QIcd Mbfi Oqeg
CDOQ IAmn Elpa Gioq BKbk LMFH RJde Ncgj Prfh
DEPR JBno Fmqb Hjpr CLcl MNGI AKef Odhk Qagi
EFQA KCop Gnrc Ikqa DMdm NOHJ BLfg Peil Rbhj
FGRB LDpq Hoad Jlrb ENen OPIK CMgh Qfjm Acik
GHAC MEqr Ipbe Kmac FOfo PQJL DNhi Rgkn Bdjl
HIBD NFra Jqcf Lnbd GPgp QRKM EOij Ahlo Cekm
IJCE OGab Krdg Moce HQhq RALN FPjk Bimp Dfln
JKDF PHbc Laeh Npdf IRir ABMO GQkl Cjnq Egmo
BEch DGej FIgl HKin JMkp LOmr NQob PAqd RCaf
CFdi EHfk GJhm ILjo KNlq MPna ORpc QBre ADbg"};

sglists={
{doub08,doub10,doub12,doub14,doub16,doub18},
{trip12,trip15,trip18,trip21,trip24,trip27},
{quad16,quad20,quad24,quad28,quad32, quad36}};

Manipulate[
If[firstday>sglists[[groupsize-1,numberofgroups-3,1]],firstday=1];
If[secondday>sglists[[groupsize-1,numberofgroups-3,1]],secondday=2];
With[{pick = sglists[[groupsize-1,numberofgroups-3]]},
With[{schedule = StringSplit/@StringSplit[pick[[2]],"\n"]},
With[{edges = Flatten[#,1]&/@Map[Subsets[#,{2}]&,Characters/@
{schedule[[firstday]],schedule[[secondday]]},{2}]},
Pane[If[displaytype=="schedule",
Text@Grid[MapIndexed[Prepend[#1,"day "<>ToString[#2[[1]]]<>": "]&,schedule],Background->{None,ReplacePart[Table[White,{sglists[[groupsize-1,numberofgroups-3,1]]}],{firstday->RGBColor[.6,.73,.36],secondday->RGBColor[.9,.42,.17]}]} ],
GraphPlot[Rule@@@Flatten[edges,1],VertexLabeling-> True,
EdgeRenderingFunction->(If [MemberQ[edges[[1]],List@@@#2],{RGBColor[.6,.73,.36], Line[#1]},{RGBColor[.9,.42,.17], Line[#1]}]&)]],{600,350},Alignment->{Center,Center}]]]],
{{groupsize, 3,"golfers per group"},Range[2,4],ControlType-> SetterBar},
{{numberofgroups,7,"number of groups"},Range[4,9],ControlType-> SetterBar},
{{displaytype,"schedule","display type"},{"schedule","graph 2 days"},ControlType-> SetterBar},
{{firstday,1,"day in green"},Range[1,sglists[[groupsize-1,numberofgroups-3,1]]],ControlType-> SetterBar},
{{secondday,2,"day in orange"},Range[1,sglists[[groupsize-1,numberofgroups-3,1]]],ControlType-> SetterBar},
SaveDefinitions-> True,AutorunSequencing->{1,2,3}]

A group consists of 32 golfers who want to play in groups of four for several days. Can they play for ten days, with no pair of golfers in the same group twice? (The reader may want to skip the next three paragraphs.)

In 1850, Reverend Thomas Kirkman sent a related query to the readers of a popular math magazine, Lady's and Gentleman's Diary: Fifteen young ladies in a school walk out three abreast for seven days in succession: it is required to arrange them daily, so that no two will walk twice abreast. Arthur Cayley and Jakob Steiner solved the problem. For groups of three, solutions are called either a resolvable Steiner triple system (RSTS) or a Kirkman triple system (KTS).

How about 18 golfers (A–I & a–i), playing in triples? Can they play for eight days? They cannot play for nine days, since each golfer can only meet 17 other golfers. In eight days, each golfer misses playing with one of the other golfers, so use 9 couples, Aa–Ii, with each golfer playing with everyone but their spouse. When it is not possible for all golfers to play with each other, and there are no repetitions, it is called a Kirkman packing design. Other names include: 3-resolvable group divisible design (3-RGDD) of type (2^9), Oberwolfach problem OP((3^6)), and nearly Kirkman triple system NKTS(18).

Can 16 golfers each play in foursomes for five days? This is sometimes called a resolvable Steiner quadruple system (RSQS). When 32 golfers play in foursomes for 10 days, that is a 4-RGDD (resolvable group divisible design) of type (2^16). Solutions might instead be listed under a name containing the words block, frame, configuration, or parallel class.

What does the poor golf organizer do? These are incredibly difficult problems, even for mathematicians. Many are unsolved, and solutions that do exist are strangely named within math journals that are hard to obtain. The solutions often point back to earlier papers, which upon consultation end with "the construction is self-explanatory". For 8 groups of threesomes, that explanation did not help, so a near solution with foursomes on the last day is given.

Happily, many best-possible solutions are given here, for a variety of tournament schedules. Either select the schedule, or take a look at a graph that combines two days.

Reference

[1] E. Pegg Jr. "Social Golfer Problem." (Aug 14, 2007)

http://www.mathpuzzle.com/MAA/54-Golf Tournaments/mathgames_08_ 14_ 07.html.

Contributed by: Ed Pegg Jr