1 / 85

Global Constraints for Lexicographic Orderings

Global Constraints for Lexicographic Orderings. Alan Frisch, Ian Miguel (University of York) Brahim Hnich, Toby Walsh (4C) Zeynep Kiziltan (Uppsala University). GACLex. A new family of global constraints. GACLex. A new family of global constraints.

thetis
Download Presentation

Global Constraints for Lexicographic Orderings

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Global Constraints for Lexicographic Orderings Alan Frisch, Ian Miguel (University of York) Brahim Hnich, Toby Walsh (4C) Zeynep Kiziltan (Uppsala University)

  2. GACLex • A new family of global constraints.

  3. GACLex • A new family of global constraints. Non-binary constraint. Specialised propagator.

  4. GACLex • A new family of global constraints. Non-binary constraint. Specialised propagator. GACLex maintains Generalised Arc Consistency: Given an assignment to any constrained variable, we can find consistent assignments for the remainder.

  5. GACLex • A new family of global constraints. • Linear time complexity.

  6. GACLex • A new family of global constraints. • Linear time complexity. • Ensures that a pair of vectors of variables are lexicographically ordered.

  7. GACLex • A new family of global constraint. • Linear time complexity. • Ensures that a pair of vectors of variables are lexicographically ordered. lex

  8. Motivation • Many problems can be modelled by matrices of decision variables.

  9. Motivation • Many problems can be modelled by matrices of decision variables. • E.g. Combinatorial Problems • Balanced Incomplete Block Design.

  10. Motivation • Many problems can be modelled by matrices of decision variables. • E.g. Configuration Problems: • Rack Configuration.

  11. Motivation • Many problems can be modelled by matrices of decision variables. • E.g. Scheduling Problems: • Social Golfers.

  12. Motivation • Many problems can be modelled by matrices of decision variables. • E.g. Design Problems: • Steel Mill Slab Design.

  13. Motivation • Many problems can be modelled by matrices of decision variables. • Frequently these matrices exhibit row and/or column symmetry.

  14. Motivation • Many problems can be modelled by matrices of decision variables. • Frequently these matrices exhibit row and/or column symmetry. • We can permute the rows/columns in any (non)solution to obtain another (non)solution.

  15. Motivation • Many problems can be modelled by matrices of decision variables. • Frequently these matrices exhibit row and/or column symmetry. • We can permute the rows/columns in any (non)solution to obtain another (non)solution. • It can be very expensive to search fruitless symmetric branches of the search tree.

  16. Motivation • Many problems can be modelled by matrices of decision variables. • Frequently these matrices exhibit row and/or column symmetry. • Lexicographic ordering is an effective way to break a lot of this symmetry.

  17. Example • Consider 2 identical bins: A B

  18. Example • Consider 2 identical bins: A B • We must pack 6 items: 1 2 3 4 5 6

  19. Example • Here is one solution: 5 6 3 4 1 2 A B

  20. Example • Here is another: 6 5 4 3 2 1 A B

  21. Example • Is there any fundamental difference? 5 6 a) 3 4 1 2 A B 6 5 b) 4 3 2 1 A B

  22. Example • Consider a matrix model: 5 6 a) 3 4 1 2 A B 6 5 b) 4 3 2 1 A B

  23. Example NB: ‘1’ means place this item in this bin: • Consider a matrix model: 5 6 a) 3 4 1 2 A B 6 5 b) 4 3 2 1 A B

  24. If we insist that row A lex row B, we remove a) from the solution set. Example • Consider a matrix model: 6 5 b) 4 3 2 1 A B

  25. Example • Notice that items 3 and 4 are identical. 6 5 b) 4 3 2 1 A B 6 5 c) 3 4 2 1 A B

  26. If we insist that col 3 lex col 4, we remove c) from the solution set. Example • Notice that items 3 and 4 are identical. 6 5 b) 4 3 2 1 A B

  27. How GACLex Works • Consider the following example. • We have two vectors of decision variables:

  28. How GACLex Works • Consider the following example. • We have two vectors of decision variables:

  29. How GACLex Works • Consider the following example. • We have two vectors of decision variables: • We want to enforce GAC on: xlexy.

  30. A Tale of Two Pointers • We use two pointers, α and β, to avoid repeatedly traversing the vectors.

  31. A Tale of Two Pointers • We use two pointers, α and β, to avoid repeatedly traversing the vectors. • We index the vectors as follows:

  32. Most Significant Index A Tale of Two Pointers • We use two pointers, α and β, to avoid repeatedly traversing the vectors. • We index the vectors as follows:

  33. A Tale of Two Pointers • We use two pointers, α and β, to avoid repeatedly traversing the vectors. • α: index such that all variables at more significant indices are ground and equal.

  34. A Tale of Two Pointers • We use two pointers, α and β, to avoid repeatedly traversing the vectors. • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  35. A Tale of Two Pointers • We use two pointers, α and β, to avoid repeatedly traversing the vectors. • α: index such that all variables at more significant indices are ground and equal. • β: If tails never violate the constraint: 

  36. Pointer Initialisation • Needs one traversal of the vectors (linear). • Details in the paper. • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  37. Pointer Initialisation • Needs one traversal of the vectors (linear). α • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  38. Pointer Initialisation • Needs one traversal of the vectors (linear). α β • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  39. Failure • Inconsistent if βα. • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  40. How GACLex Works • We maintain α and β as assignments made. • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  41. How GACLex Works • We maintain α and β as assignments made. • When β = α + 1 we enforce bounds consistency on: xα < yα • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  42. The variable at the αth element of each vector. How GACLex Works • We maintain α and β as assignments made. • When β = α + 1 we enforce bounds consistency on: xα < yα • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  43. How GACLex Works • We maintain α and β as assignments made. • When β = α + 1 we enforce bounds consistency on: xα < yα • When β > α + 1 we enforce bounds consistency on: xαyα • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  44. How GACLex Works • We maintain α and β as assignments made. • Key: we reduce GAC on vectors to BC on binary constraints. • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  45. How GACLex Works • 0, 1 removed from yα. α β • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  46. How GACLex Works • 0, 1 removed from yα. α β • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  47. How GACLex Works • Update α. α β • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  48. How GACLex Works • Update α. α β • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  49. How GACLex Works • 3, 4 removed from xα. α β • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

  50. How GACLex Works • 3, 4 removed from xα. α β • α: index such that all variables at more significant indices are ground and equal. • β: most significant index from which the two vectors’ tails necessarily violate the constraint.

More Related