Download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
language Essence 1.3
$ prob033.essence: Word Design for DNA Computing on Surfaces
$ Problem details available at http://www.csplib.org/Problems/prob033/
 
letting Base be new type enum {A,C,G,T},
        Index be domain int(1..8)
 
find words : set of function (total) Index --> Base
 
maximising |words|
 
such that
    forAll w in words . |preImage(w,C)| + |preImage(w,G)| = 4,
    forAll w1,w2 in words
        , w1 != w2
        . (sum i : Index . toInt(w1(i) = w2(i))) <= 4,
    forAll w1,w2 in words
        , w1 = w2
        . (sum i : Index
            . toInt(w1(i) = A /\ w2(9-i) = T \/
               w1(i) = C /\ w2(9-i) = G \/
               w1(i) = G /\ w2(9-i) = C \/
               w1(i) = T /\ w2(9-i) = A)
          ) <= 4