1 constraint symmetry and solution symmetry presented by beau m. christ symmetry in csp’s spring...
TRANSCRIPT
11
Constraint Constraint Symmetry andSymmetry and
Solution SymmetrySolution Symmetry
Constraint Constraint Symmetry andSymmetry and
Solution SymmetrySolution Symmetry
Presented by Beau M. ChristPresented by Beau M. Christ
Symmetry in CSP’s Spring 2010Symmetry in CSP’s Spring 2010Presented by Beau M. ChristPresented by Beau M. Christ
Symmetry in CSP’s Spring 2010Symmetry in CSP’s Spring 2010
22
OutlineOutlineOutlineOutlineIntroductionIntroduction
DefinitionsDefinitions
Constraint and Solution Symmetry Constraint and Solution Symmetry RelationshipsRelationships
Symmetry in CSPs with Few SolutionsSymmetry in CSPs with Few Solutions
Symmetry in SATSymmetry in SAT
Symmetry in PracticeSymmetry in Practice
ConclusionConclusion
33
IntroductionIntroductionIntroductionIntroduction
Symmetry can be problematicSymmetry can be problematic
Thus, symmetry-breaking research is Thus, symmetry-breaking research is
activeactive
And yet, how do we define symmetry?And yet, how do we define symmetry?
44
OutlineOutlineOutlineOutlineIntroductionIntroduction
DefinitionsDefinitions
Constraint and Solution Symmetry Constraint and Solution Symmetry RelationshipsRelationships
Symmetry in CSPs with Few SolutionsSymmetry in CSPs with Few Solutions
Symmetry in SATSymmetry in SAT
Symmetry in PracticeSymmetry in Practice
ConclusionConclusion
55
Definition #1Definition #1Definition #1Definition #1
A A CSP instanceCSP instance is a triple ⟨V,D,C⟩ where: is a triple ⟨V,D,C⟩ where:• V is a set of variables;V is a set of variables;• D is a universal domain, specifying the D is a universal domain, specifying the possible values for those variables;possible values for those variables;• C is a set of constraints. Each constraint c ∈ C C is a set of constraints. Each constraint c ∈ C is a pair c = ⟨σ,ρ⟩ where σ is a list of variables is a pair c = ⟨σ,ρ⟩ where σ is a list of variables from V, called the from V, called the constraint scopeconstraint scope, and ρ is a , and ρ is a ∣σ∣-ary relation over D, called the ∣σ∣-ary relation over D, called the constraint constraint relation.relation.
66
DefinitionsDefinitionsDefinitionsDefinitions
An An assignment of values to variablesassignment of values to variables is a is a set {⟨vset {⟨v11,a,a11⟩,⟨v⟩,⟨v22,a,a22⟩, ..., ⟨v⟩, ..., ⟨vkk,a,akk⟩} where {v⟩} where {v11,v,v22, ..., , ..., vvkk} ⊆ V and a} ⊆ V and aii ∈ D, for all 1 ≤ i ≤ k. ∈ D, for all 1 ≤ i ≤ k.
A A solution to a CSP instancesolution to a CSP instance ⟨V,D,C⟩ ⟨V,D,C⟩ is a is a mapping from V into D whose restriction to mapping from V into D whose restriction to each constraint scope is in the corresponding each constraint scope is in the corresponding constraint relation, i.e., is allowed by the constraint relation, i.e., is allowed by the constraintconstraint
77
DefinitionsDefinitionsDefinitionsDefinitionsA general agreement for A general agreement for symmetry in CSPssymmetry in CSPs
Acts on variable-value pairsActs on variable-value pairs
Symmetries map solutions to solutions Symmetries map solutions to solutions
and non-solutions to non-solutionsand non-solutions to non-solutions
But should any bijective mapping that But should any bijective mapping that
preserves solutions be considered a preserves solutions be considered a
symmetry, or just a consequence of leaving symmetry, or just a consequence of leaving
the constraints unchanged?the constraints unchanged?
88
Definition #2Definition #2Definition #2Definition #2
For any CSP instance P = ⟨V,D,C⟩, a For any CSP instance P = ⟨V,D,C⟩, a solution solution symmetrysymmetry of P is a permutation of the set V × D of P is a permutation of the set V × D that preserves the set of solutions to P.that preserves the set of solutions to P.
99
DefinitionsDefinitionsDefinitionsDefinitions
But we do not want to have to examine all But we do not want to have to examine all solutions to a problem in order to identify solutions to a problem in order to identify symmetry.symmetry.
This leads us to the second viewpoint of This leads us to the second viewpoint of symmetry, which uses the microstructure of the symmetry, which uses the microstructure of the CSP.CSP.
1010
Definition #3Definition #3Definition #3Definition #3
For any CSP instance P = ⟨V,D,C⟩, the For any CSP instance P = ⟨V,D,C⟩, the microstructure complement of Pmicrostructure complement of P is a is a hypergraph with set of vertices V× D. A set of hypergraph with set of vertices V× D. A set of vertices is a hyperedge of the microstructure vertices is a hyperedge of the microstructure complement if it represents an assignment complement if it represents an assignment disallowed by a constraint, or consists of a pair disallowed by a constraint, or consists of a pair of incompatible assignments for the same of incompatible assignments for the same variable.variable.
1111
DefinitionsDefinitionsDefinitionsDefinitions
Note: The vertices of the microstructure Note: The vertices of the microstructure complement are variable-value pairs of the complement are variable-value pairs of the CSP, and a set of vertices CSP, and a set of vertices {⟨v{⟨v11,a,a11⟩,⟨v⟩,⟨v22,a,a22⟩, ..., ⟩, ..., ⟨v⟨vkk,a,akk⟩} is a hyper edge if and only if:⟩} is a hyper edge if and only if:
• {v{v11,v,v22, ..., v, ..., vkk} is the set of variables in the } is the set of variables in the scope of some constraint, but the constraint scope of some constraint, but the constraint disallows the assignment {⟨vdisallows the assignment {⟨v11,a,a11⟩,⟨v⟩,⟨v22,a,a22⟩, ..., ⟩, ..., ⟨v⟨vkk,a,akk⟩}; or⟩}; or• k=2, vk=2, v11 = v = v22, and a, and a11 ≠ a ≠ a22
1212
Definition #4Definition #4Definition #4Definition #4
For any CSP instance P = For any CSP instance P = ⟨V,D,C⟩, a ⟨V,D,C⟩, a constraint symmetryconstraint symmetry is an automorphism of is an automorphism of the microstructure complement of P (or, the microstructure complement of P (or, equivalently, of the microstructure).equivalently, of the microstructure).
1313
Example #1: n-Example #1: n-queensqueens
Example #1: n-Example #1: n-queensqueens
Standard formulationStandard formulation
V = {rV = {r11,r,r22, ..., r, ..., rnn} representing the rows} representing the rows
D = {1,2, ..., n} representing the columnsD = {1,2, ..., n} representing the columns
C (intension)C (intension)
for all i, j, 1 ≤ i < j ≤ n, rfor all i, j, 1 ≤ i < j ≤ n, rii ≠ r ≠ rj j ;;
for all i, j, 1 ≤ i < j ≤ n, ∣rfor all i, j, 1 ≤ i < j ≤ n, ∣rii - r - rjj∣ ≠ ∣i - j∣∣ ≠ ∣i - j∣
1414
Example #1: n-Example #1: n-queensqueens
Example #1: n-Example #1: n-queensqueens
Chessboard has 8 symmetries (x, y, d1, Chessboard has 8 symmetries (x, y, d1,
d2, r90, r180, r270, id)d2, r90, r180, r270, id)
Symmetries map vvp ⟨rSymmetries map vvp ⟨rii,k⟩ to ,k⟩ to
(respectively):(respectively):
⟨r⟨rn+1-in+1-i,k⟩ , ⟨r,k⟩ , ⟨rii,n+1-k⟩ , ⟨r,n+1-k⟩ , ⟨rii,i⟩ , ⟨r,i⟩ , ⟨rn+1-kn+1-k,n+1-i⟩ ,,n+1-i⟩ ,
⟨r⟨rkk,n+1-i⟩ , ⟨r,n+1-i⟩ , ⟨rn+1-in+1-i,n+1-k⟩ , ⟨r,n+1-k⟩ , ⟨rn+1-kn+1-k,i⟩ , ⟨r,i⟩ , ⟨rii,k⟩,k⟩
1515
Example 1: n-Example 1: n-queensqueens
Example 1: n-Example 1: n-queensqueens
This hides symmetry between rows and This hides symmetry between rows and
columnscolumns
This symmetry is restored using the This symmetry is restored using the
microstructure complement, as it treats microstructure complement, as it treats
both reasons for a disallowed pair of both reasons for a disallowed pair of
assignments equallyassignments equally
1616
OutlineOutlineOutlineOutlineIntroductionIntroduction
DefinitionsDefinitions
Constraint and Solution Symmetry Constraint and Solution Symmetry RelationshipsRelationships
Symmetry in CSPs with Few SolutionsSymmetry in CSPs with Few Solutions
Symmetry in SATSymmetry in SAT
Symmetry in PracticeSymmetry in Practice
ConclusionConclusion
1717
Relationships: Relationships: Theorem 1Theorem 1
Relationships: Relationships: Theorem 1Theorem 1
The group of constraint symmetries of a The group of constraint symmetries of a CSP instance P CSP instance P is a subgroup ofis a subgroup of the group the group of solution symmetries of P.of solution symmetries of P.
Note: The converse is not true.Note: The converse is not true.
1818
Relationships: Definition Relationships: Definition #5#5
Relationships: Definition Relationships: Definition #5#5
For any CSP instance P, a k-ary nogood is For any CSP instance P, a k-ary nogood is an assignment to k variables of P that an assignment to k variables of P that cannot be extended to a solution of P.cannot be extended to a solution of P.
The k-nogood hypergraph of P is a The k-nogood hypergraph of P is a hypergraph whose set of vertices is V× D hypergraph whose set of vertices is V× D and whose set of edges is the set of all m-and whose set of edges is the set of all m-ary nogoods for all m ≤ k.ary nogoods for all m ≤ k.
1919
Relationships: Relationships: Theorem 2Theorem 2
Relationships: Relationships: Theorem 2Theorem 2
For any k-ary CSP instance P, the group of For any k-ary CSP instance P, the group of all solution symmetries of P all solution symmetries of P is equal tois equal to the automorphism group of the k-nogood the automorphism group of the k-nogood hypergraph of P.hypergraph of P.
Thus, the k-nogood hypergraph of a CSP Thus, the k-nogood hypergraph of a CSP instance has the same vertices as the instance has the same vertices as the microstructure component.microstructure component.
2020
Example 2: 4-Example 2: 4-queensqueens
Example 2: 4-Example 2: 4-queensqueens
Fig. 1: The 4-queens solutions and the complementFig. 1: The 4-queens solutions and the complementof the binary no-good hypergraphof the binary no-good hypergraph
2121
Example 2: 4-Example 2: 4-queensqueens
Example 2: 4-Example 2: 4-queensqueens
The automorphisms are:The automorphisms are:
vertices within either clique can be vertices within either clique can be
permutedpermuted
vertices in one clique can be swapped vertices in one clique can be swapped
with the otherwith the other
eight isolated vertices can be permutedeight isolated vertices can be permuted
compose these permutationscompose these permutations
2222
Example 2: 4-Example 2: 4-queensqueens
Example 2: 4-Example 2: 4-queensqueens
Since the automorphisms of a Since the automorphisms of a graph are the same as the graph are the same as the automorphisms of its automorphisms of its complement, then theorem 2 complement, then theorem 2 tells us these are the solution tells us these are the solution symmetries for the 4-queens symmetries for the 4-queens problem.problem.
2323
OutlineOutlineOutlineOutlineIntroductionIntroduction
DefinitionsDefinitions
Constraint and Solution Symmetry Constraint and Solution Symmetry RelationshipsRelationships
Symmetry in CSPs with Few SolutionsSymmetry in CSPs with Few Solutions
Symmetry in SATSymmetry in SAT
Symmetry in PracticeSymmetry in Practice
ConclusionConclusion
2424
CSPs with Few CSPs with Few SolutionsSolutions
CSPs with Few CSPs with Few SolutionsSolutions
Any permutation of vvp’s is a solution Any permutation of vvp’s is a solution symmetry when a CSP instance has no symmetry when a CSP instance has no solutions.solutions.
Furthermore, CSP instances with very few Furthermore, CSP instances with very few solutions must have many solution solutions must have many solution symmetries.symmetries.
2525
Example 3Example 3Example 3Example 3
Suppose a CSP instance with n variables and d Suppose a CSP instance with n variables and d
values for each variable has only one solutionvalues for each variable has only one solution
Any permutation of the n vvp’s in the solution Any permutation of the n vvp’s in the solution
is a solution symmetryis a solution symmetry
The permutations of the n(d-1) vvp’s not in The permutations of the n(d-1) vvp’s not in
the solution are also solution symmetriesthe solution are also solution symmetries
Thus, the solution symmetry group has n! × Thus, the solution symmetry group has n! ×
(n(d-1))! elements(n(d-1))! elements
2626
Example 4Example 4Example 4Example 4
Suppose we have a CSP instance with 2 Suppose we have a CSP instance with 2
solutions, where each solution has k solutions, where each solution has k
assignments in commonassignments in common
A solution symmetry must permute the k A solution symmetry must permute the k
common assignments amongst themselvescommon assignments amongst themselves
The remaining (n-k) assignments in each The remaining (n-k) assignments in each
solution can also be permutedsolution can also be permuted
2727
Example 4Example 4Example 4Example 4
The two solutions can be swappedThe two solutions can be swapped
The other (nd-2n+k) assignments can also The other (nd-2n+k) assignments can also
be permuted.be permuted.
Thus, we have k! × (n-k)!Thus, we have k! × (n-k)!2 2 × 2 × (nd-× 2 × (nd-
2n+k)! solution symmetries2n+k)! solution symmetries
Note: This is 4-queens with k=0Note: This is 4-queens with k=0
2828
CSPs with Few CSPs with Few SolutionsSolutions
CSPs with Few CSPs with Few SolutionsSolutions
The basic idea is that it is often more The basic idea is that it is often more
difficult to construct permutations with difficult to construct permutations with
more solutionsmore solutions
For n-queens where n >6, it appears that For n-queens where n >6, it appears that
the solution symmetries are exactly the 8 the solution symmetries are exactly the 8
symmetries of the constraint symmetry symmetries of the constraint symmetry
groupgroup
2929
CSPs with Few CSPs with Few SolutionsSolutions
CSPs with Few CSPs with Few SolutionsSolutions
One way of dealing with constraint One way of dealing with constraint
symmetry is to add symmetry-breaking symmetry is to add symmetry-breaking
constraintsconstraints
Symmetry breaking can eliminate Symmetry breaking can eliminate
constraint symmetry but lead to a much constraint symmetry but lead to a much
larger solution symmetry grouplarger solution symmetry group
3030
OutlineOutlineOutlineOutlineIntroductionIntroduction
DefinitionsDefinitions
Constraint and Solution Symmetry Constraint and Solution Symmetry RelationshipsRelationships
Symmetry in CSPs with Few SolutionsSymmetry in CSPs with Few Solutions
Symmetry in SATSymmetry in SAT
Symmetry in PracticeSymmetry in Practice
ConclusionConclusion
3131
Symmetry in SATSymmetry in SATSymmetry in SATSymmetry in SAT
A SAT instance can be viewed as a CSP A SAT instance can be viewed as a CSP
instanceinstance
We can define a symmetry of a SAT We can define a symmetry of a SAT
instance as a permutation of the variables instance as a permutation of the variables
that leaves the set of clauses unchangedthat leaves the set of clauses unchanged
(Aloul et al. 2003) allow symmetries to act (Aloul et al. 2003) allow symmetries to act
on literals, and thus is similar to our on literals, and thus is similar to our
definition of constraint symmetrydefinition of constraint symmetry
3232
Symmetry in SATSymmetry in SATSymmetry in SATSymmetry in SAT
They construct a graph to represent the They construct a graph to represent the
set of clauses, whose automorphisms are set of clauses, whose automorphisms are
the symmetries of the SAT instancethe symmetries of the SAT instance
The graph is similar to the microstructure The graph is similar to the microstructure
complement, but has vertices for clauses complement, but has vertices for clauses
as well as literals, and colors for different as well as literals, and colors for different
types of vertextypes of vertex
3333
OutlineOutlineOutlineOutlineIntroductionIntroduction
DefinitionsDefinitions
Constraint and Solution Symmetry Constraint and Solution Symmetry RelationshipsRelationships
Symmetry in CSPs with Few SolutionsSymmetry in CSPs with Few Solutions
Symmetry in SATSymmetry in SAT
Symmetry in PracticeSymmetry in Practice
ConclusionConclusion
3434
Symmetry in Symmetry in PracticePractice
Symmetry in Symmetry in PracticePractice
Identifying symmetry helps ease searchIdentifying symmetry helps ease search
Add symmetry breaking constraints OR use Add symmetry breaking constraints OR use
a dynamic method that adds symmetry a dynamic method that adds symmetry
breaking constraints upon backtrackingbreaking constraints upon backtracking
In practice, researchers identify constraint In practice, researchers identify constraint
symmetries rather than solution symmetries rather than solution
symmetriessymmetries
3535
InterchangeabilityInterchangeabilityInterchangeabilityInterchangeability
Freuder’s interchangeability is an explicit Freuder’s interchangeability is an explicit
form of solution symmetryform of solution symmetry
Full interchangeability can determine Full interchangeability can determine
values that are, in a sense, equivalentvalues that are, in a sense, equivalent
This, in general, requires finding all This, in general, requires finding all
solutionssolutions
3636
InterchangeabilityInterchangeabilityInterchangeabilityInterchangeability
Freuder defines local forms of Freuder defines local forms of
interchangeability (such as neighborhood interchangeability (such as neighborhood
interchangeability, which is a form of interchangeability, which is a form of
constraint symmetry)constraint symmetry)
Future work aims to identify values that Future work aims to identify values that
are interchangeable in the set of solutions, are interchangeable in the set of solutions,
and not just the constraintsand not just the constraints
3737
OutlineOutlineOutlineOutlineIntroductionIntroduction
DefinitionsDefinitions
Constraint and Solution Symmetry Constraint and Solution Symmetry RelationshipsRelationships
Symmetry in CSPs with Few SolutionsSymmetry in CSPs with Few Solutions
Symmetry in SATSymmetry in SAT
Symmetry in PracticeSymmetry in Practice
ConclusionConclusion
3838
ConclusionConclusionConclusionConclusion
Constraint symmetry: automorphism groups of the Constraint symmetry: automorphism groups of the
microstructure complementmicrostructure complement
Solution symmetry: automorphism groups of the k-ary Solution symmetry: automorphism groups of the k-ary
nogood hypergraphnogood hypergraph
Solution symmetry may be less useful than constraint Solution symmetry may be less useful than constraint
symmetrysymmetry
Although most research has dealt with constraint Although most research has dealt with constraint
symmetry, new research is being done with symmetry, new research is being done with
interchangeabilityinterchangeability
3939
OutlineOutlineOutlineOutlineIntroductionIntroduction
DefinitionsDefinitions
Constraint and Solution Symmetry Constraint and Solution Symmetry RelationshipsRelationships
Symmetry in CSPs with Few SolutionsSymmetry in CSPs with Few Solutions
Symmetry in SATSymmetry in SAT
Symmetry in PracticeSymmetry in Practice
ConclusionConclusion
4040
ReferenceReferenceReferenceReference
““Constraint Symmetry and Solution Constraint Symmetry and Solution Symmetry”Symmetry”
---Cohen et. al------Cohen et. al---AAAI 2006AAAI 2006
4141
That’s all, folks!That’s all, folks!That’s all, folks!That’s all, folks!
Questions?Questions?
Comments?Comments?
Remarks?Remarks?