40
11/22/2005 Zheng – Comprehensive 1 Constraint Systems Laboratory Survey of Techniques for Detecting and Exploiting Symmetry in Constraint Satisfaction Problems Yaling Zheng Constraint Systems Laboratory

Survey of Techniques for Detecting and Exploiting Symmetry in Constraint Satisfaction Problems

  • Upload
    alida

  • View
    29

  • Download
    0

Embed Size (px)

DESCRIPTION

Survey of Techniques for Detecting and Exploiting Symmetry in Constraint Satisfaction Problems Yaling Zheng Constraint Systems Laboratory. Outline. Definition of a CSP Motivation of the study of symmetry in CSP Definitions of symmetry in a CSP Techniques of symmetry exploitation - PowerPoint PPT Presentation

Citation preview

Page 1: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 1

Constraint Systems Laboratory

Survey of Techniques for Detecting and Exploiting

Symmetry in Constraint Satisfaction Problems

Yaling Zheng

Constraint Systems Laboratory

Page 2: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 2

Constraint Systems Laboratory

Outline• Definition of a CSP• Motivation of the study of symmetry in C

SP• Definitions of symmetry in a CSP• Techniques of symmetry exploitation• Techniques of symmetry detection• Summary & future research directions

Page 3: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 3

Constraint Systems Laboratory

Definition of a CSP [from Dr. Choueiry's slides for CSCE421] • Given P = (V, D, C )

– V is a set of variables,

– D is a set of variable domains (domain values)

– C is a set of constraints,

• Query: can we find a value for each variable such that all constraints are satisfied?

nVVV ,,, 21 V

nVVV DDD ,,, 21 D

iVbVaVVVV DDDzyxiba

),,,(,...,,C with

lCCC ,,, 21 C

Page 4: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 4

Constraint Systems Laboratory

5-queens problemRotate 90

QQ

QQ

Q

A solution

QQ

QQ

Q

QQ

QQ

Q

Rotate 180 Rotate 270

Q

QQ

QQ

Flip horizontally

QQ

Q

Q

Q

Flip vertically Flip \ diagonally

QQ

QQ

Q

Flip / diagonally

Q

Q

Q

Q

Q

QQ

QQ

Q

Page 5: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 5

Constraint Systems Laboratory

Round robin tournaments• Given:

– 8 teams over 7 weeks – 4 periods per week– 2 slots per period

• Constraints: – Every team plays each week– Every team plays at most twice in each period– Every team plays every other team

• Query: Can we find a schedule which assigns a team for every slot?

Page 6: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 6

Constraint Systems Laboratory

A schedule to the tournament

Week 1 Week2 Week 3 Week 4 Week 5 Week 6 Week 7Period 1 0 v 1 0 v 2 4 v 7 3 v 6 3 v 7 1 v 5 2 v 4Period 2 2 v 3 1 v 7 0 v 3 5 v 7 1 v 4 0 v 6 5 v 6Period 3 4 v 5 3 v 5 1 v 6 0 v 4 2 v 6 2 v 7 0 v 7Period 4 6 v 7 4 v 6 2 v 5 1 v 2 0 v 5 3 v 4 1 v 3

• Every permutation of the week is a solution (7!)• Every permutation of the period is a solution (4!)• Every permutation of the slot is a solution (228)• Total: (7!)(4!)(228) such permutations

Page 7: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 7

Constraint Systems Laboratory

Motivation of exploiting symmetry• From the viewpoint of the backtrack search

1 2 3 4

1 2 3 4

1 2 3 4

1 2 3 4 1 2 3 4

1 2 3 4

1 2 3 4

V1

V2

V3

V4

……

……

a state solution 1 solution 2

Page 8: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 8

Constraint Systems Laboratory

Question:1. What is the formal definition of symmet

ry in a CSP?2. How do we exploit the symmetries withi

n a CSP to solve it? 3. How do we detect the symmetries withi

n a given CSP so that we can exploit them?

Page 9: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 9

Constraint Systems Laboratory

Outline• Definition of a CSP• Motivation of the study of symmetry in C

SP• Definitions of symmetry in a CSP• Techniques of symmetry exploitation• Techniques of symmetry detection• Summary & future research directions

Page 10: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 10

Constraint Systems Laboratory

Definitions of symmetry• Functional interchangeability [Freuder’91] • Solution symmetry [Cohen et al.’05] • Defined as a bijective mapping between solutions

(i.e., complete assignments of values to variables): {Vi,aj|Vi V , ajDVi} {Vi,aj |ViV , aj DVi}

• Maps – solutions to solutions – non-solutions to non-solutions

Page 11: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 11

Constraint Systems Laboratory

Relationship of symmetry concepts

Solution SymmetryInterchangeability

Partial Interchangeability

ConstraintSymmetry

FullInterchangeability

NeighborhoodInterchangeability

ValueSymmetry

VariableSymmetry

Matrix Symmetry

Row Symmetry Column Symmetry

Row and Column Symmetry[Freuder’91, Puget’02, Flenner’02, Cohen et al.’05]

Page 12: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 12

Constraint Systems Laboratory

Outline• Definition of a CSP• Motivation of the study of symmetry in CSP• Definitions of symmetry in a CSP• Techniques of symmetry exploitation

– CSP remodeling, propagation, bundling, static symmetry breaking, dynamic symmetry breaking, heuristic symmetry breaking

• Techniques of symmetry detection• Summary & future research directions

Page 13: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 13

Constraint Systems Laboratory

Techniques of exploiting symmetries

1. Remodeling a given CSP to a model with fewer symmetries

2. Exploiting symmetries during constraint propagation

3. Using bundling techniques (group symmetrical values together)

Page 14: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 14

Constraint Systems Laboratory

4. Adding static symmetry breaking constraints before search

5. Dynamic symmetry breaking during search

6. Using symmetry-breaking heuristic to guide search

Techniques of exploiting symmetries

Page 15: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 15

Constraint Systems Laboratory

Remodeling• Remove a subset of dimensions from a multi-dimen

sional model [Freuder’97]

• Model a CSP as a set domain CSP which can be solved by Conjunto [Gervet’97]– As far as I know, Conjunto is the only existing constraint logic prog

ramming language for solving set domain CSPs• Automation of remodeling (CGRASS) by condition-a

ction rules [Frisch et al.’02]

Page 16: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 16

Constraint Systems Laboratory

Remodeling 4-queens prob.Original model (search space 416)Variables: 4 queens Q1, Q2, Q3, Q4 on 44 boardDomains: DQ1=DQ2=DQ3=DQ4= {1,1, …, 4,4}Constraints: no two queens in the same row/colu

mn/diagonalNew model (search space 44)Variables: 4 queens Q1, Q2, Q3, Q4 in 4 rowsDomains: DQ1=DQ2=DQ3=DQ4= {1,2,3,4}Constraints: no two queens in the same column/di

agonal

Page 17: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 17

Constraint Systems Laboratory

Constraint propagation • Constraint propagation is to remove values f

rom variable domains by enforcing consistency techniques

• Exploit symmetry during constraint propagation – symAC2001 [Gent and MacDonald’03] symPC2001/3.1

[Gent et al.’05]– When a value of a variable is consistent (inconsis

tent), its symmetrical values of the variable is also consistent (inconsistent).

Page 18: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 18

Constraint Systems Laboratory

Bundling Techniques• Group neighborhood interchangeable values

together – before search [Benson and Freuder’92, Haselbock’93]

– during search [Beckwith et al.’01, Lal and Choueiry’03]

• Technique: – discrimination tree, domain partition

• Find solution bundles• Dynamic bundling performs better than static

bundling

Page 19: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 19

Constraint Systems Laboratory

Symmetry-breaking constraints• Add constraints over symmetrical variables before search• Examples of such constraints

– Symmetry breaking predicates [Crawford’96]– Lexicographical ordering constraints [Flener’02]– Multiset ordering constraints [Kiziltan’04]

• Good for finding all solutions by BT search• Sometimes not good for finding 1 solution• Use some (not all) symmetry-breaking constraints

before search [Puget’03]

Page 20: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 20

Constraint Systems Laboratory

Dynamic symmetry breaking• Symmetry excluding search (SES)

[Backofen and Will’99,’02]

• Symmetry-breaking during search (SBDS) [G

ent and Smith’00] • Symmetry-breaking via dominance detectio

n (SBDD) [Fahle et al.’01]

• CGT+SBDS [Gent et al.’02]

• CGT+SBDD [Gent et al.’03]

Page 21: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 21

Constraint Systems Laboratory

SES, SBDS, short SBDSQ1 2 Q1 2

Q2 = 1 Q2 1

(Sym(Q1 2))

(Sym(Q1 2) (sym(Q2 = 1))

• SES: inserting symmetry breaking constraints (expressed by logic formulae) at the right branch of the binary search tree.

• SBDS is similar to SES. • Good for CSPs with few symmetries• Impractical for CSPs with millions of symmetries. • Short SBDS choose partial symmetries.

Page 22: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 22

Constraint Systems Laboratory

SBDD

• Good for solving CSPs with millions of symmetries

• For every CSP, SBDD needs a special dominance checker

1 2

1

1

1 2 3 4

Q1

Q2

Q3

Q4

……

Is current state dominated by previously visited states?

Page 23: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 23

Constraint Systems Laboratory

CGT+SBDS/SBDD• CGT: Computational Group Theory• By CGT, a small set of symmetries can g

enerate a huge number of symmetries• CGT+SBDS do not need to explicitly list

all the symmetries (GAP-ECLiPSe SBDS)• CGT+SBDD do not need a specific domi

nance checker any more (GAP-ECLiPSe

SBDD)

Page 24: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 24

Constraint Systems Laboratory

Symmetry-breaking heuristic

• dddd

Page 25: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 25

Constraint Systems Laboratory

Outline• Definition of a CSP• Motivation of the study of symmetry in CSP• Definitions of symmetry in a CSP• Techniques of symmetry exploitation• Techniques of symmetry detection

– Discrimination tree (neighborhood interchangeability)

– CGRASS– Graph automorphism

• Summary & future research directions

Page 26: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 26

Constraint Systems Laboratory

Symmetry detection1. Discrimination tree (to detect NI)

– Before search [Benson and Freuder’92, Haselbock’93]

– During search [Beckwith et al.’01,

Lal and Choueiry’03]

2. CGRASS: for every pair of variables, check whether exchanging these two variables in all occurrences of these two variables does not change the problem [Frisch et al.’02]

Page 27: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 27

Constraint Systems Laboratory

Symmetry detection3. First construct a graph

– SAT problem [Crawford’96]– 0-1 ILP problem [Aloul’04]– Problem whose constraints declared in C-like specificati

on language [Ramani and Markov’04]– CSP [Puget’05]

Then use automorphism algorithms: – NAUTY [McKay’81] – SAUCY [Darga et al.’04]– AUTOM [Puget’05]

Page 28: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 28

Constraint Systems Laboratory

Outline• Definition of a CSP• Motivation of the study of symmetry in C

SP• Definitions of symmetry in a CSP• Techniques of symmetry exploitation• Techniques of symmetry detection• Summary & future research directions

Page 29: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 29

Constraint Systems Laboratory

Summary• Definitions of symmetry• Techniques of exploiting symmetries

– Bundling technique (group NI values together)

– Symmetry breaking (Only visit one of the symmetrical states)

• Static or dynamic• Techniques of detecting symmetries

– Discrimination tree– Graph construction + graph automorphism

Page 30: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 30

Constraint Systems Laboratory

Future Research Directions• Lattice domain CSPs

[Gervet’97]

• Exploit symmetries in sub CSPs after structural decomposition of a CSP

• Propagation in non-binary CSPs• Dynamically detect symmetries (beside

s neighborhood interchangeability) during search

Page 31: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 31

Constraint Systems Laboratory

Future Research Directions• Develop criteria for systematically

selecting subsets of static symmetry breaking constraints

• Study whether degree-maximization xxx can also be integrated with symmetry-breaking heuristic

• Investigate the possibility of exploiting symmetries for a heuristic function (such as in local search)

Page 32: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 32

Constraint Systems Laboratory

Thank you • Thank you for your time and patience to

– read my paper and – attend my presentation

• Questions?

Page 33: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 33

Constraint Systems Laboratory

Additional Slides

Page 34: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 34

Constraint Systems Laboratory

Computation Group Theory (CGT)Geometric symmetry of 2 2 square• Two symmetries p1= [3, 1, 4, 2] (denote a rotat

ion by 90) and p2= [3, 4, 1, 2] (denote a flip through horizontal axis) can be used to generate other 5 symmetries. For example,

• p1◦p1◦p1 = [4, 3, 2, 1] (rotation by 270)• p2 ◦p1 = [4, 2, 3, 1] (rotation by 90 and then filp)• p1◦p1◦p2 = [2, 1, 4, 3] (flip through vertical axis) ……

Page 35: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 35

Constraint Systems Laboratory

Bundling Techniques• Use discrimination tree to find neighborhood i

nterchangeable values [Freuder’91]bluered

white

bluegreenyellow

bluegreenyellow

blue

W Y

ZX

blue|X

green|X

yellow|X

green|Y

yellow|Y

green|X

yellow|X

green|Y

yellow|Y

{red, white}

{blue}

• Joint discrimination tree [Choueiry and Noubir’98]• Non-binary discrimination tree [Lal and Choueiry’03]

Page 36: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 36

Constraint Systems Laboratory

Detecting symmetries • Example of graph construction for a SAT

problem [Crawford’96]

C1

x1 x2 x3

I1 I2

C2 C3

x1’ x3’

(x1, x2, x3)= (x1 x2 x3) (x1 x4) (x3 x4)Implied clauses: x1 x1 x3 x3

x4

Page 37: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 37

Constraint Systems Laboratory

Detecting symmetries• Example of graph construction for a 0-1 I

LP problem [Aloul et al.’04]

x1 x2 x3 (x1, x2, x3)= P1: 2 x1 + x2 + x3 2 P2: x1 + 2 x2 + x3 2

Y2 Y1

X2,1 X1,1

X1,2 X2,2

Page 38: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 38

Constraint Systems Laboratory

Detecting symmetries• Example of graph construction for a C-like spec

ification language [Ramani and Markov’04]

int3 x1, x2;x1*x1 + x2*x2 == 25;x1 >= 1;x2 >= 1;

25

==

+

*

x1

>=

1

*

x2

>=

1

Page 39: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 39

Constraint Systems Laboratory

Detecting symmetries• Example of graph construction for an extensiona

l constraint Cxy = {(1, 2), (1, 3), (2, 3)} [Puget’05]

2

1

A3

A2

Cxy

3

x

A1

2

1

3

y

Page 40: Survey of Techniques for Detecting and Exploiting  Symmetry in Constraint Satisfaction Problems

11/22/2005 Zheng – Comprehensive 40

Constraint Systems Laboratory

Detecting symmetries• Example of graph construction for two in

tensional constraints [Puget’05]

< d

x

10y

+

x y z

=

x < y x + y + z = 10