Download
language Essence 1.3
$ prob028.essence: Balanced Incomplete Block Design
$ Problem details available at http://www.csplib.org/Problems/prob028/

given v, b, r, k, lambda : int(1..)

$ the following conditions define a symmetric BIBD:
$ where v = b
$ where r = k

$ the following conditions are necessary for solutions to exist, see ../results/
$ where r * v = b * k
$ where lambda * (v - 1) = r * (k - 1)
$ where b >= v

letting Obj   be new type of size v,
        Block be new type of size b

find bibd : relation of (Obj * Block)

such that
    forAll o  : Obj   . |toSet(bibd(o,_ ))| = r,
    forAll bl : Block . |toSet(bibd(_,bl))| = k,
    forAll o1, o2 : Obj
        , o2 != o1
        . |toSet(bibd(o1,_)) intersect toSet(bibd(o2,_))| = lambda