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

Slides:



Advertisements
Similar presentations
Non-Binary Constraint Satisfaction Toby Walsh Cork Constraint Computation Center.
Advertisements

Non-binary Constraints Toby Walsh
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
Global Constraints Toby Walsh NICTA and University of New South Wales
Global Constraints Toby Walsh National ICT Australia and University of New South Wales
8.3 Representing Relations Connection Matrices Let R be a relation from A = {a 1, a 2,..., a m } to B = {b 1, b 2,..., b n }. Definition: A n m  n connection.
Reducing Symmetry in Matrix Models Alan Frisch, Ian Miguel, Toby Walsh (York) Pierre Flener, Brahim Hnich, Zeynep Kiziltan, Justin Pearson (Uppsala)
Case study 5: balanced academic curriculum problem Joint work with Brahim Hnich and Zeynep Kiziltan (CPAIOR 2002)
Generating Implied Constraints via Proof Planning Alan Frisch, Ian Miguel, Toby Walsh Dept of CS University of York EPSRC funded project GR/N16129.
Algebraic, transcendental (i.e., involving trigonometric and exponential functions), ordinary differential equations, or partial differential equations...
But Shaun’s already proved P equals NP. Can’t we move onto quantified SAT? Woof!
Leeds: 6 June 02Constraint Technology for the Masses Alan M. Frisch Artificial Intelligence Group Department of Computer Science University of York Collaborators:
Mathematics. Matrices and Determinants-1 Session.
Lecture 8 Jianjun Hu Department of Computer Science and Engineering University of South Carolina CSCE350 Algorithms and Data Structure.
Transforming and Refining Abstract Constraint Specifications Alan Frisch, Brahim Hnich*, Ian Miguel, Barbara Smith, and Toby Walsh *Cork Constraint Computation.
Symmetry as a Prelude to Implied Constraints Alan Frisch, Ian Miguel, Toby Walsh University of York.
Alan M. Frisch Artificial Intelligence Group Department of Computer Science University of York Extending the Reach of Constraint Technology through Reformulation.
Matrix Modelling Alan M. Frisch and Ian Miguel (York) Brahim Hnich, Zeynep Kiziltan (Uppsala) Toby Walsh (Cork)
Matrix Modelling Pierre Flener (Uppsala) Alan M. Frisch (York) Brahim Hnich, Zeynep Kiziltan (Uppsala) Ian Miguel, and Toby Walsh (York)
Reducing Symmetry in Matrix Models Alan Frisch, Ian Miguel, Toby Walsh (York) Pierre Flener, Brahim Hnich, Zeynep Kiziltan, Justin Pearson (Uppsala)
Backtracking Reading Material: Chapter 13, Sections 1, 2, 4, and 5.
Modeling the Covering Test Problem Brahim Hnich, Steven Prestwich, and Evgeny Selensky Cork Constraint Computation Center UCC Supported by SFI.
Alan M. Frisch Artificial Intelligence Group Department of Computer Science University of York Co-authors Ian Miguel, Toby Walsh, Pierre Flener, Brahim.
CGRASS A System for Transforming Constraint Satisfaction Problems Alan Frisch, Ian Miguel (York) Toby Walsh (Cork)
Constraint Systems Laboratory 11/22/2005Zheng – Comprehensive1 Survey of Techniques for Detecting and Exploiting Symmetry in Constraint Satisfaction Problems.
Matrix Modelling: Déjà Vu Pierre Flener (Uppsala) Alan M. Frisch (York) Brahim Hnich, Zeynep Kiziltan (Uppsala) Ian Miguel, and Toby Walsh (York)
Global Constraints for Lexicographic Orderings Alan Frisch, Ian Miguel (University of York) Brahim Hnich, Toby Walsh (4C) Zeynep Kiziltan (Uppsala University)
Modelling a Steel Mill Slab Design Problem Alan Frisch, Ian Miguel, Toby Walsh AI Group University of York.
Cardinality & Sorting Networks. Cardinality constraint Appears in many practical problems: scheduling, timetabling etc’. Also takes place in the Max-Sat.
Daniel Kroening and Ofer Strichman Decision Procedures An Algorithmic Point of View Deciding ILPs with Branch & Bound ILP References: ‘Integer Programming’
1 Representing Relations Epp section ??? CS 202 Aaron Bloomfield.
Relations Chapter 9.
Chapter 9 1. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing.
From Constraints to Finite Automata to Filtering Algorithms Mats Carlsson, SICS Nicolas Beldiceanu, EMN
Decision Procedures An Algorithmic Point of View
Tractable Symmetry Breaking Using Restricted Search Trees Colva M. Roney-Dougal, Ian P. Gent, Tom Kelsey, Steve Linton Presented by: Shant Karakashian.
 Row and Reduced Row Echelon  Elementary Matrices.
Matrix Algebra. Quick Review Quick Review Solutions.
Slide Chapter 7 Systems and Matrices 7.1 Solving Systems of Two Equations.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 7- 1.
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
1 Decision Procedures for Linear Arithmetic Presented By Omer Katz 01/04/14 Based on slides by Ofer Strichman.
Chapter 9. Chapter Summary Relations and Their Properties Representing Relations Equivalence Relations Partial Orderings.
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
Analysis of Algorithms These slides are a modified version of the slides used by Prof. Eltabakh in his offering of CS2223 in D term 2013.
Modelling for Constraint Programming Barbara Smith CP 2010 Doctoral Programme.
DISCRETE COMPUTATIONAL STRUCTURES CS Fall 2005.
Chapter 9. Section 9.1 Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Discrete Mathematics Relation.
Relations and their Properties
Chapter 9. Chapter Summary Relations and Their Properties n-ary Relations and Their Applications (not currently included in overheads) Representing Relations.
CP Summer School Modelling for Constraint Programming Barbara Smith 3. Symmetry, Viewpoints.
Representing Relations Using Matrices A relation between finite sets can be represented using a zero-one matrix Suppose R is a relation from A = {a 1,
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
Matrices and Determinants
Linear Algebra Chapter 2 Matrices.
Chapter 13 Backtracking Introduction The 3-coloring problem
CSCE350 Algorithms and Data Structure Lecture 21 Jianjun Hu Department of Computer Science and Engineering University of South Carolina
ICS 353: Design and Analysis of Algorithms Backtracking King Fahd University of Petroleum & Minerals Information & Computer Science Department.
Binary Relations Definition: A binary relation R from a set A to a set B is a subset R ⊆ A × B. Example: Let A = { 0, 1,2 } and B = {a,b} {( 0, a), (
10.3 Reformulation The Lex-Leader Method Shant Karakashian 1.
Relations Chapter 9.
Chapter - 12 GRAPH MATRICES AND APPLICATIONS.
Póth Miklós Polytechnical Engineering College, Subotica
Constraints and Search
Constraints and Search
Combining relations via relational composition
ICS 353: Design and Analysis of Algorithms
Presentation transcript:

Symmetry Breaking Ordering Constraints Zeynep Kiziltan Department of Information Science Uppsala University, Sweden A progress report on work in collaboration with Alan 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 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

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) Given A=[a 1,...,a n ] B=[b 1,...,b n ] taking values from {1,...d} A ≤ lex B ↔ (d n-1 a d 0 a n ) ≤ (d n-1 b d 0 b n ) BC(≤) ↔ GAC(≤ lex ) Feasible for small n 

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 > a n ≤ b n ) 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 ∑=S 1 ∑=S 2 ∑=S 3 ∑=S 4

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

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

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≤m M1M1 M2M2 M3M3 M4M4 M4M4 M 1 ≤ m M 2 ≤ m M 3 ≤ m M 4

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) Given A=[a 1,...,a n ] B=[b 1,...,b n ] A ≤ m B ↔ (n a n a n ) ≤ (n b n b n ) BC(≤) ↔ GAC(≤ m ) Feasible for small n 

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)

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

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

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 + 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

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 ∑ (A i =B i )=k M 1 =M 2 M 1  lex M 2

Future Work write my thesis!