symmetry breaking ordering constraints zeynep kiziltan department of information science uppsala...
Post on 12-Jan-2016
220 Views
Preview:
TRANSCRIPT
Symmetry Breaking Ordering Constraints
Zeynep KiziltanDepartment of Information Science
Uppsala University, Sweden
http://www.dis.uu.se/~zeykiz
A progress report on work in collaboration withAlan Frisch, Brahim Hnich, Chris Jefferson, Ian Miguel, Toby Walsh
Motivations (1) An important class of symmetries in CP
matrices of decision variables rows/columns represent indistinguishable objects, hence symmetric
Rows and columns are subject to permutation
An n X m matrix model with row and column symmetry has n! X m! symmetries
grows super-exponentially
Too many symmetric search states
It can be very expensive to visit all the symmetric branches of a search tree
Motivations (2) Breaking symmetry is very important!
Breaking all row and column symmetries is difficult No one has an effective way of dealing with all row and
column symmetries. Symmetry breaking methods have to deal with very large
number of symmetries. The effort required could easily be exponential.
Aims
Main Goal Eliminate row and column symmetries effectively and
efficiently. Aims:
Investigate types of ordering constraints to break row and column symmetries.
Devise global constraints to easily pose and efficiently solve the ordering constraints.
Examine the effectiveness of the ordering constraint.
Disvantages of the Ordering Constraints
May conflict with the search strategy Increase in the size of the search tree
May already be implied during search No change in the size of the search tree
Theory may not meet practise Theory: posing lex ordering on the rows breaks row
symmetry Practise: posing lex ordering on the rows creates a search
tree bigger than or equal to no symmetry breaking
Advantages of the Ordering Constraints
Given a ”good” search strategy, many symmetries are eliminated effectively and efficiently.
The effort for breaking symmetry is polynomial posing solving
Significant reductions in the size of the search tree
Very practical for large matrices
Outline of Rest of Talk
Ordering Constraints Lexicographic Ordering Lexicographic Ordering Combined with
Sum Constraints Multiset Ordering Permutation Ordering
Future Work
Lexicographic Ordering
Used to order dictionaries
[A,B,C] ≤ lex [D,E,F]
A<D or (A=D and B<E ) or (A=D and B=E and C<F) or (A=D and B=E and C=F)
Lexicographic ordering is total. Enforcing the rows to be lexicographically
ordered breaks all row symmetry.
Breaking Row (Column) Symmetry
A B C
D E F
G H I[A B C] lex [D E F] lex [G H I] [G H I] lex [D E F] lex [A B C]
lexicographic ordering anti-lexicographic ordering
Breaking Row and Column Symmetries
Each symmetry class of assignments has at least one element where both the rows and the columns are lexicographically ordered But there may be no element with rows lex
ordered and columns anti-lex ordered To break row and column symmetries, we can
insist that the rows and columns are both lexicographically ordered (double-lex)
Double-lex breaks some but not necessarily all row and column symmetries
Lexicographic Ordering for a Pair of Vectors (1)
GivenA=[a1,...,an]
B=[b1,...,bn]taking values from {1,...d}
A ≤lex B ↔
(dn-1 a1 + ... + d0 an
) ≤ (dn-1 b1 + ... + d0 bn
) BC(≤) ↔ GAC(≤lex) Feasible for small n
Lexicographic Ordering for a Pair of Vectors (2)
Or decompositionA ≤lex B ↔
(a1 < b1) Or
(a1 = b1 And a2 < b2 )...(a1 = b1 And a2 = b2 ... an ≤ bn
)
And decomposition
A ≤lex B ↔
(a1 ≤ b1) And
(a1 = b1 -> a2 ≤ b2 )...(a1 = b1 And a2 = b2 ... -> an ≤ bn
)
Many solvers use FC =\ GAC
GAC schema is expensive
Design of global constraints for lexicographic orderings
≤lex
<lex
Consistency: GAC Complexity
Worst case: O(n) Amortised:0(1) Shared Variables Inferior to decompisitons and arithmetic
constraint
Global Constraints for Lexicographic Orderings
Lexicographic Ordering with Sum Constraints
Quite often we have a 0/1 matrix to model a collection of sets of fixed cardinality row (column) symmetry sum constraints on the rows (columns)
BIBDs, Steiner Systems, Rack Design, Steel Mill Design, ...
LexAndSum for a pair of vectors
≤lex
∑=S1
∑=S2
∑=S3
∑=S4
Design of global constraints for LexAndSum orderings ≤LexAndSum
<LexAndSum
0/1 variables Sums are non-ground Consistency: GAC Complexity
O(n)
Global Constraints for LexAndSum Orderings
Rows as Multisets
A multiset is a set with repetitions M = {{0, 1, 1, 2, 2, 3}}
Treat each row as a multiset
A B C
D E F
G H I[A B C] m [D E F] m [G H I] [G H I] m [D E F] m [A B C]
multiset ordering anti-multiset ordering
Multiset Ordering
Equal sized multisets M <m N iff
x=max(M), y=max(N) x<y OR (x=y AND M-{{x}} <m N-{{y}} )
R1=[1,2,3,2,3,1,1,2]
R2=[1,1,3,1,3,1,1,3]
R1 <m R2
Breaking Row (Column) Symmetry
Multiset ordering is partial.
Enforcing multiset ordering on the rows breaks some but not necessarily all row (column) symmetry
Breaking Row and Column Symmetries
Multiset ordering the rows is invariant to column permutation.
To break row and column symmetries, we can insist that the rows and columns are both multiset ordered (double-multiset)
Double-multiset breaks some but not necessarily all row and column symmetries
Lex + multiset
lex
≤m
M1
M2
M3
M4M4
M1≤m M2≤mM3≤m M4
Comparison: Lex vs Multiset
Lexicograhic ordering vs multiset ordering incomparable
double-lex vs double-multiset incomparable
double-lex vs lex+multiset incomparable
Multiset Ordering for a Pair of Vectors (1)
GivenA=[a1,...,an]
B=[b1,...,bn]
A ≤m B ↔ (na1+ ... + nan ) ≤ (nb1+ ... + nbn ) BC(≤) ↔ GAC(≤m) Feasible for small n
Given A=[a1,...,an]
B=[b1,...,bn]taking values from {1,...d}
Construct occurrence vectors via Regin’s gcc M=[m1,...,md]
N=[n1,...,nd]
where mi=occurrences(i,A) and ni=occurrences(i,B)
A ≤m B ↔ M ≤lex N GAC(≤m) → GAC(gcc) /\ GAC(≤lex)
Multiset Ordering for a Pair of Vectors (2)
Design of global constraints for multiset orderings
≤m
<m
Consistency: GAC Complexity
O(n) for m<n O(nlogn) for m>>n
Shared Variables
Global Constraints for Multiset Orderings
Permutation Ordering
GivenA=[a1,...,an]
B=[b1,...,bn]
A ≤perm B ↔
A ≤lex B1 And
A ≤lex B2 And... A ≤lex Bn!
B1...Bn! are permutations of B
Permutation ordering is neither total nor partial not reflexive anti-symmetric transitive
rowi ≤perm rowj for all i<j may eliminate solutions
row1 ≤perm rowi for all i>1 (first-row perm) does not eliminate solutions breaks some but not necessarily all row and column symmetries
first-row perm + first-column perm may eliminate solutions
Breaking Row and Column Symmetries
Comparisons
Permutation ordering > lexicographic ordering
first-row perm vs double-lex incomparable
First-row perm vs double-multiset incomparable
double-lex + first-row perm double-lex + row1 ≤perm rowi for all i>1 does not eliminate solutions breaks more symmetry than either of
them does not break all symmetries
Breaking More Row and Column Symmetries
How to pose Permutation Ordering?
Design of a global constraint for permutation ordering ≤perm
<perm
Consistency: GAC Complexity:
O(nlogn) Question: Can the 0(nlogn) multiset ordering algorithm easily
be modified to obtain permutation ordering? No!
Future Work
Multiset and lex when equal
LexAndLambda
A ≤lex B ∑ (Ai=Bi)=k
M1=M2 M1 lex M2
Future Work
write my thesis!
top related