Download
language Essence 1.3
$ prob010.essence: Social Golfer Problem
$ Problem details available at http://www.csplib.org/Problems/prob010/
$
$ In a golf club there are a number of golfers who wish to play together in g
$ groups of size s. Find a schedule of play for w weeks such that no pair of
$ golfers play together more than once.

given w, g, s : int(1..)

letting Golfers be new type of size g * s

find sched : set (size w) of
                $ regular is implied by numParts g and partSize s
                partition (regular, numParts g, partSize s) from Golfers

such that
    forAll {week1, week2} subsetEq sched .
        forAll group1 in parts(week1) .
            forAll group2 in parts(week2) .
                |group1 intersect group2| < 2