Presentation is loading. Please wait.

Presentation is loading. Please wait.

Symmetry Breaking Ordering Constraints Zeynep Kiziltan Department of Information Science Uppsala University, Sweden A progress.

Similar presentations


Presentation on theme: "Symmetry Breaking Ordering Constraints Zeynep Kiziltan Department of Information Science Uppsala University, Sweden A progress."— Presentation transcript:

1 Symmetry Breaking Ordering Constraints Zeynep Kiziltan Department of Information Science Uppsala University, Sweden http://www.dis.uu.se/~zeykiz A progress report on work in collaboration with Alan Frisch, Brahim Hnich, Chris Jefferson, Ian Miguel, Toby Walsh

2 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

3 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.

4 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.

5 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

6 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

7 Outline of Rest of Talk Ordering Constraints Lexicographic Ordering Lexicographic Ordering Combined with Sum Constraints Multiset Ordering Permutation Ordering Future Work

8 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)

9 Lexicographic ordering is total. Enforcing the rows to be lexicographically ordered breaks all row symmetry. Breaking Row (Column) Symmetry ABC DEF GHI [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

10 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

11 Lexicographic Ordering for a Pair of Vectors (1) Given A=[a 1,...,a n ] B=[b 1,...,b n ] taking values from {1,...d} A ≤ lex B ↔ (d n-1 a 1 +... + d 0 a n ) ≤ (d n-1 b 1 +... + d 0 b n ) BC(≤) ↔ GAC(≤ lex ) Feasible for small n 

12 Lexicographic Ordering for a Pair of Vectors (2) Or decomposition A ≤ lex B ↔ (a 1 < b 1 ) Or (a 1 = b 1 And a 2 < b 2 )... (a 1 = b 1 And a 2 = b 2... a n ≤ b n ) And decomposition A ≤ lex B ↔ (a 1 ≤ b 1 ) And (a 1 = b 1 -> a 2 ≤ b 2 )... (a 1 = b 1 And a 2 = b 2... -> a n ≤ b n ) Many solvers use FC =\ GAC GAC schema is expensive

13 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

14 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 ∑=S 1 ∑=S 2 ∑=S 3 ∑=S 4

15 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

16 Rows as Multisets A multiset is a set with repetitions M = {{0, 1, 1, 2, 2, 3}} Treat each row as a multiset ABC DEF GHI [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

17 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}} ) R 1 =[1,2,3,2,3,1,1,2] R 2 =[1,1,3,1,3,1,1,3] R 1 < m R 2

18 Breaking Row (Column) Symmetry Multiset ordering is partial. Enforcing multiset ordering on the rows breaks some but not necessarily all row (column) symmetry

19 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

20 Lex + multiset  lex ≤m≤m M1M1 M2M2 M3M3 M4M4 M4M4 M 1 ≤ m M 2 ≤ m M 3 ≤ m M 4

21 Comparison: Lex vs Multiset Lexicograhic ordering vs multiset ordering incomparable double-lex vs double-multiset incomparable double-lex vs lex+multiset incomparable

22 Multiset Ordering for a Pair of Vectors (1) Given A=[a 1,...,a n ] B=[b 1,...,b n ] A ≤ m B ↔ (n a 1 +... + n a n ) ≤ (n b 1 +... + n b n ) BC(≤) ↔ GAC(≤ m ) Feasible for small n 

23 Given A=[a 1,...,a n ] B=[b 1,...,b n ] taking values from {1,...d} Construct occurrence vectors via Regin’s gcc M=[m 1,...,m d ] N=[n 1,...,n d ] where m i =occurrences(i,A) and n i =occurrences(i,B) A ≤ m B ↔ M ≤ lex N GAC(≤ m ) → GAC(gcc) /\ GAC(≤ lex )  Multiset Ordering for a Pair of Vectors (2)

24 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

25 Permutation Ordering Given A=[a 1,...,a n ] B=[b 1,...,b n ] A ≤ perm B ↔ A ≤ lex B 1 And A ≤ lex B 2 And... A ≤ lex B n! B 1...B n! are permutations of B

26 Permutation ordering is neither total nor partial not reflexive anti-symmetric transitive row i ≤ perm row j for all i<j may eliminate solutions row 1 ≤ perm row i 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

27 Comparisons Permutation ordering > lexicographic ordering first-row perm vs double-lex incomparable First-row perm vs double-multiset incomparable

28 double-lex + first-row perm double-lex + row 1 ≤ perm row i 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

29 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!

30 Future Work Multiset and lex when equal LexAndLambda A ≤ lex B ∑ (A i =B i )=k M 1 =M 2 M 1  lex M 2

31 Future Work write my thesis!


Download ppt "Symmetry Breaking Ordering Constraints Zeynep Kiziltan Department of Information Science Uppsala University, Sweden A progress."

Similar presentations


Ads by Google