Download
language Essence 1.3

$ Problem : Steiner triplets
$
$ Problem details available at http://www.csplib.org/Problems/prob044/
$
$ Essence model by Andrew Martin
$
$ Licenced under CC-BY-4.0 : http://creativecommons.org/licenses/by/4.0/



given n : int(1..)

where    n % 6 = 1
      \/ n % 6 = 3

letting nb be n*(n-1) / 6

find sets : matrix indexed by [int(1..nb)] of set (size 3) of int(1..n)

$for each pair of sets, must share at most one element

such that

    forAll setA : int(1..nb-1) .
    forAll setB : int(setA+1..nb) .

        | sets[setA] intersect sets[setB] | <= 1