Presentation is loading. Please wait.

Presentation is loading. Please wait.

10.3 Reformulation 10.4.1 The Lex-Leader Method Shant Karakashian 1.

Similar presentations


Presentation on theme: "10.3 Reformulation 10.4.1 The Lex-Leader Method Shant Karakashian 1."— Presentation transcript:

1 10.3 Reformulation 10.4.1 The Lex-Leader Method Shant Karakashian 1

2 Outline Introduction: Modeling & Reformulation Examples – Social Golfers Problem: Set Variables and Difficulties – n-integer permutation and Reformulation Reformulation Techniques – Different Viewpoints – Prestwich's Reformulation The Properties of Reformulation Adding Constraints Before Search Introduction to Lex-Leader Method Lex-Leader Method – The idea – Procedure – Lex-Leader and Variable Ordering – Limitation 2

3 Introduction Modelling a problem has a substantial effect on the efficiently of the problem solving Different models of the same problem can have different symmetries A problem can be reformulated thus getting different symmetries. Modeling and reformulation are important for symmetry breaking Once a problem is reformulated, the remaining symmetries can be dealt with before or during search 3

4 Social Golfers Problem Golfers play once a week in groups, such that no two people play in the same group in two different weeks – 32 golfers – 8 groups of 4 people each – 10 weeks The problem has 32!10!8!104!80 symmetries. Remodel the problem to get 32!10! symmetries [B. Smith '04] – Adding a variable for each pair of players to indicate which week they played together 4

5 Set Variables Given: a number of indistinguishable variables Encode the variables as a set of variables In the social golfers' example: – Encode the groups playing within each week as sets (total of 8 sets per week) – The size of each set is 4 – Every pair of sets constraint to have empty intersection – Result: lose 4! symmetries in each group – Total reduction of symmetries: 2480 5

6 Difficulties with Set Variables There are theoretical and practical difficulties associated with set variables: – Representations of set variables by the solver can have dramatically different behaviors in propagation: e.g. if the used representation is not suitable for the constraints associated with the variables, search can be dramatically increased. – In cases where set and integer variables are mixed: "Channeling" between set and integer variables can be difficult, and lead to delaying the propagation until late in search. – Reformulating is an art, not a science. 6

7 Example: n-integer permutation Given n integers from 0 to n-1, find a permutation so that the differences between adjacent numbers are also a permutation of the numbers 1 to n-1. n=11: Four obvious symmetries in the problem: – identity – reversing the series – negating each element by subtracting it from (n-1) – reversing and negating 7

8 Reformulation of n-integer permutation [Gent et al. '04] Given a solution to the problem, cycle it about a pivot to generate another solution The difference between first and last terms must always duplicate a difference in the sequence, so this operation can be applied to any solution 8

9 Reformulation of n-integer permutation (contd.) Reformulate the problem to solve a different problem Solutions of reformulated problem lead to solutions to the original problem – Given n integers from 0 to n-1, find a permutation so that: The differences between adjacent numbers and the two extreme numbers are also a permutation of the numbers 1 to n- 1 – The sequence has to obey two constraints: The permutation starts 0,n-1,1 The n differences between consecutive numbers contain all of 1,...n- 1 with one difference occurring exactly twice 9

10 Different Viewpoints Given a CSP with: – n variables – single domain for all variables of size n – all variables must take different values Then there are different 'Viewpoints" of the problem: – Find values for each variable – Find variables for each value If there is symmetry: – Value symmetry in the first viewpoint is interchanged with variable symmetry in the second and vice versa 10

11 Prestwich's Reformulation A significant advance in understanding how reformulation can be applied mechanically Prestwich showed that value symmetries can be eliminated automatically by a new encoding of CSPs to SAT Breaks all value symmetries of a special kind: – Called 'Dynamic Substitutability’ – Is a variant of Freuder's value interchangeability Prestwich's encoding eliminates all dynamic substitutability Symmetry detection not necessary 11

12 The Properties of the Reformulation Disadvantages: – Limited to certain types of value symmetry – No guarantee that the reformulation would lead to improved search Adventages: – From a black art to a science – The concerns are on tradeoffs and implementation – No need for magical insights 12

13 Adding Constraints Before Search Symmetry breaking constraints when added in an ad hoc fashion: – Need to recognize the symmetry – Variables are indistinguishable: force them to be in non-decreasing order. – Variables are indistinguishable and must have different values: Force them to be in strictly increasing order – Can loose solutions if incorrectly done 13

14 Introduction to Lex-Leader Method A CSP has symmetry: – Eliminated by adding constraints to the original problem – Possible to find a 'reduced form‘ [Crawford et al. '96] outlined the technique lex- leader: – For Variable symmetries – Constructs symmetry-breaking ordering constraints 14

15 The idea of Lex-Leader Method For a symmetry group: – For each equivalence class of solutions – Predefine one to be the canonical solution Achieved by: – Adding constraints before search – Satisfy only the canonical solutions – To induce an ordering on full assignments: Requires choosing a static variable ordering 15

16 Lex-Leader Method Defined on variable symmetries For every permutation g converting a tuple into another tuple: – Choose the one that gives the value that is lexicographically least – example: variables: A, B, C constraints: all differnet Permutations: A B C, A C B, B A C, B C A, C A B, C B A Solutions [A=1 B=2 C=3] and [A=1 B=3 C=2] are equivalent With constraint A B C <= A C B only [1 2 3] is a solution For [1 3 2] : [1 3 2] > [1 2 3] 16

17 Lex-Leader Example Consider a 3x2 matrix in a context The rows and columns may be freely permuted The symmetries form the group S3 x S2 Group order is 3!2! = 12 1.ABCDEF ≤lex ABCDEF 2.ABCDEF ≤lex ACBDFE 3.ABCDEF ≤lex BCAEFD 4.ABCDEF ≤lex BACEDF 5.ABCDEF ≤lex CABFDE 6.ABCDEF ≤lex CBAFED 7.ABCDEF ≤lex DFEACB 8.ABCDEF ≤lex EFDBCA 9.ABCDEF ≤lex EDFBAC 10.ABCDEF ≤lex FDECAB 11.ABCDEF ≤lex FEDCBA 12.ABCDEF ≤lex DEFABC 17 ABC DEF DEF ABC

18 Lex-Leader and Variable Ordering Does not respect the variable and value ordering heuristics If the leftmost solution in the search tree is not canonical: – Disallowed – Leads to increased search Limits the power of the constraint programming to use dynamic variable ordering heuristics 18

19 Lex-Leader Limitation Requires one constraint for each element of the symmetry group Many groups contain an exponential number of symmetries In the case of matrix with m rows and n columns, this is m!n! Applicable to many cases but it is impractical 19


Download ppt "10.3 Reformulation 10.4.1 The Lex-Leader Method Shant Karakashian 1."

Similar presentations


Ads by Google