Searching for Doubly Self Searching for Doubly Self- Orthogonal - - PowerPoint PPT Presentation
Searching for Doubly Self Searching for Doubly Self- Orthogonal - - PowerPoint PPT Presentation
Searching for Doubly Self Searching for Doubly Self- Orthogonal Latin Squares Orthogonal Latin Squares Runming Lu Sheng Liu g Jian Zhang Outline Introduction (Latin square problems DSOLS) Introduction (Latin square problems, DSOLS)
Outline
- Introduction (Latin square problems DSOLS)
- Introduction (Latin square problems, DSOLS)
- Approaches based on SAT and CSP
- A new approach based on set systems
- Experimental results
- Experimental results
- Conclusion
Introduction
- Latin squares (Quasigroups)
1 2 3 3 1 2 2 3 1
- Challenging problems in mathematics (simple to
describe difficult to solve) describe, difficult to solve)
– Counting problem – Existence of Latin squares with certain properties Mutually orthogonal Latin squares (MOLS) u u y o
- go
squ es ( O S)
Latin Square problems and Constraint Solving
- Computer-aided research in combinatorics
i f ll L i i l ! – existence of small Latin squares – crucial !
- Clement Lam and other mathematicians
- AI researchers (using CSP / SAT tech.)
Ji Zh (1990/1991) – Jian Zhang (1990/1991) – M. Fujita, J. Slaney, M. Stickel (IJCAI-1993, 1995) – Hantao Zhang, W. McCune , … – C Gomes
- C. Gomes, …
– O. Dubois and G. Dequen (CP-2001)
Definition of DSOLS
A i f l ti A pair of latin squares A=(aij) and B=(bij) are ┴
j j
- rthogonal ( A ┴ B) iff
the ordered pairs (aij,bij) p (
ij ij)
are distinct for all i and j DSOLS: a Latin square A which is orthogonal to
A ┴ AT A ┴ A*
g both its transpose to the diagonal AT and its
A ┴ AT A ┴ A pairs (aij,at
ij) are
(0,0) (2,3) (3,1) (1,2)
diagonal A and its transpose to the back diagonal A
(0,0) (2,3) (3,1) (1,2) (3,2) (1,1) (0,3) (2,0) (1,3) (3,0) (2,2) (0,1) (2,1) (0,2) (1,0) (3,3)
diagonal A
( , ) ( , ) ( , ) ( , )
First Order Logic Formulas of DSOLS g
Latin Square Constraints: Latin Square Constraints: A(x,y) = A(x,z) → y = z A(x y) = A(z y) → x = z A(x,y) = A(z,y) → x = z A┴AT: A A : A(x1,y1)=A(x2,y2) ∧ A(y1,x1)=A(y2,x2) → x1=x2 ∧ y1=y2 A┴A*: A(x1,y1)=A(x2,y2) ∧ A(n−1−y1,n−1−x1)=A(n−1−y2,n−1−x2) → x1=x2 ∧ y1=y2
Finding DSOLS as SAT g
Introduce n3 boolean variables Vijk (i,j,k ∈ [0, n-1]) Vijk = 1 iff A(i,j) = k
ijk
( ,j) Vijk = 0 iff A(i,j) ≠ k Encode the DSOLS constraints into SAT clauses directly: O(n6) clauses // but there are other kinds of encodings (Hantao Zhang)
Finding DSOLS as Classical CSP g
classical CSP search framework Arc-consistency Li ht i ht i l t ti Light-weight implementation
A New Approach pp
Cluster the cells which are possibly p y assigned the same value into a set Si
Admissible Set:
Th l t f S ll f th
- The elements of Si are cells of the
n×n table and |Si|=n
- No two elements are in the same row
- r column: (x1,y1),(x2,y2) ∈ Si, if
(x1,y1) ≠ (x2,y2), then x1 ≠ x2 and y1 ≠ y ≠ y2
- If (x,y) ∈ Si and (x,y) ≠ (x,y)T then
(x,y)T NOT IN Si
- If (x,y) ∈ Si and (x,y) ≠ (x,y)* then
(x,y)* NOT IN Si
If the cells in the same admissible set are assigned the same value, can the assignments in two sets be combined together without violating the constraints of DSOLS? DSOLS? Compatible sets: Si and its compatible sets Compatible sets: Admissible sets Si and Sj, i ≠ j are compatible iff compatible iff
- Si ∩ Sj =
- | Si ∩ S j
T | = 1
| Si ∩ S j | 1
- | Si ∩ S j
| = 1
Choose n sets to construct a whole n×n table There exists a solution to DSOLS(n) iff there is a collection of n admissible sets each pair of which are compatible The cells in the same set are assigned the same value assigned the same value. The cells in different sets are assigned different values assigned different values.
Finding a clique in a graph
- Constructing a graph:
– admissible sets as vertices admissible sets as vertices – Two sets are compatible – There is an edge connecting them connecting them.
- Finding a clique in the graph
too e pensi e too expensive
Enumerate all admissible sets(less than n!). Backtrack Search:
- 1. Select a set from the candidate admissible sets;
- 2. Remove all sets not compatible to it from the
candidate sets;
- 3. Combine this set with the sets selected in the previous
h t t t t ti l l ti search step to construct a partial solution;
- 4. If a complete solution is found, stop;
5 If no candidate set remains Backtrack;
- 5. If no candidate set remains, Backtrack;
- 6. Repeat the above steps.
The constraints of compatible sets are very strong. The number of candidate admissible sets (compatible to the selected sets) drops dramatically with the search levels moving down.
Tools and Experiments p
We developed a DSOLS generator named DSOLver and compared it to the famous SAT solver Minisat and a light- p g weight CSP solver written by ourselves.
These two tables show that DSOLver is quite efficient w r t These two tables show that DSOLver is quite efficient w.r.t. both CPU time and branching numbers. With the help of DSOLver, we were able to examine the whole search space of DSOLS(10) within one day and whole search space of DSOLS(10) within one day and proved the non-existence of DSOLS(10) which was an
- pen case.