[gecode-users] Modelling Conditions on Latin Squares

Christian Drescher christian.drescher at nicta.com.au
Fri Oct 30 04:17:31 CET 2009


Dear Subscribers,

I try to model an algebraic problem. In fact, I try to determine the
existence of Latin Squares with certain properties. Hence, my model
contains a Matrix of IntVar:

  Matrix<IntVarArray> mat(l, n, n);

The constraint I want to post is that for all i,j in Q:

  (i*j) * (j*i) == i

or rather

  mat(mat(i,j),mat(j,i)) == i

I tried two different approaches, but gecode's library doesn't support
the following:

  // this doesn't work
  post(home, mat(mat(i,j),mat(j,i)) == i);

  // this neither
  element(home, mat, mat(i,j), mat(j,i), i);

How do I model the constraint correctly?

Best,
Christian





More information about the gecode-users mailing list