{"id":1504,"date":"2018-02-17T09:00:39","date_gmt":"2018-02-17T17:00:39","guid":{"rendered":"http:\/\/www.bradleycbuchanan.com\/b\/?p=1504"},"modified":"2018-02-09T07:15:35","modified_gmt":"2018-02-09T15:15:35","slug":"good-enough-golfers","status":"publish","type":"post","link":"https:\/\/www.bradleycbuchanan.com\/b\/good-enough-golfers\/","title":{"rendered":"Good Enough Golfers"},"content":{"rendered":"<p><a href=\"https:\/\/commons.wikimedia.org\/wiki\/File:Four_gentlemen_golfers_on_the_tee_of_a_golf_course_(5014828806).jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/www.bradleycbuchanan.com\/b\/wp-content\/uploads\/2018\/01\/Four_gentlemen_golfers_on_the_tee_of_a_golf_course_5014828806.jpg\" alt=\"Four gentlemen golfers on the tee of a golf course\" width=\"750\" height=\"534\" class=\"aligncenter size-full wp-image-1505\" srcset=\"https:\/\/www.bradleycbuchanan.com\/b\/wp-content\/uploads\/2018\/01\/Four_gentlemen_golfers_on_the_tee_of_a_golf_course_5014828806.jpg 750w, https:\/\/www.bradleycbuchanan.com\/b\/wp-content\/uploads\/2018\/01\/Four_gentlemen_golfers_on_the_tee_of_a_golf_course_5014828806-300x214.jpg 300w\" sizes=\"auto, (max-width: 750px) 100vw, 750px\" \/><\/a><\/p>\n<blockquote><p>Twenty golfers wish to play in foursomes for 5 days. Is it possible for each golfer to play no more than once with any other golfer?<\/p><\/blockquote>\n<p><a href=\"https:\/\/goodenoughgolfers.com\/\">Find out for yourself.<\/a><!-- more --><\/p>\n<p>This is known in mathematics as the <a href=\"http:\/\/mathworld.wolfram.com\/SocialGolferProblem.html\">Social Golfer Problem<\/a>. Over Thanksgiving 2017, my dad posed a very similar problem: 28 students in discussion groups of size 4, rotated five times so that no two students are grouped together twice &#8211; with additional constraints restricting certain students from ever being grouped together.  Puzzling over the problem together led us into the world of combinatorics.<\/p>\n<p>It turns out the Social Golfer Problem (and the closely related <a href=\"http:\/\/mathworld.wolfram.com\/KirkmansSchoolgirlProblem.html\">Kirkman&#8217;s Schoolgirl Problem<\/a>) are solved, but full generalizations of them are <em>hard<\/em> &#8211; even for computers.  I went looking for an existing solution and couldn&#8217;t find one I was happy with.  Dad assured me that it didn&#8217;t need to be perfect, just good enough for a teacher trying to organize a group.  So I built my own:<\/p>\n<p><a href=\"https:\/\/goodenoughgolfers.com\/\">Good-Enough Golfers<\/a> is a near-solver for this class of scheduling problems. It attempts to schedule <tt>g x p<\/tt> players into <tt>g<\/tt> groups of size <tt>p<\/tt> for <tt>w<\/tt> weeks such that players meet a minimum number of times. Real solutions to this problem can be extremely slow, but GEG&#8217;s approximations are fast and often good enough for real-world purposes.<\/p>\n<p>It&#8217;s also free and <a href=\"https:\/\/github.com\/islemaster\/good-enough-golfers\">open-source<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Twenty golfers wish to play in foursomes for 5 days. Is it possible for each golfer to play no more than once with any other golfer? Find out for yourself. This is known in mathematics as the Social Golfer Problem. Over Thanksgiving 2017, my dad posed a very similar problem: 28 students in discussion groups&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[418,8],"tags":[464,463,432,465,462],"class_list":["post-1504","post","type-post","status-publish","format-standard","hentry","category-blog","category-programmer","tag-combinatorics","tag-kirkmans-schoolgirl-problem","tag-open-source","tag-side-projects","tag-social-golfer-problem"],"_links":{"self":[{"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/posts\/1504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/comments?post=1504"}],"version-history":[{"count":4,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/posts\/1504\/revisions"}],"predecessor-version":[{"id":1509,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/posts\/1504\/revisions\/1509"}],"wp:attachment":[{"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/media?parent=1504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/categories?post=1504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bradleycbuchanan.com\/b\/wp-json\/wp\/v2\/tags?post=1504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}