1 / 24

Foundations of Constraint Processing CSCE421/821, Fall 2004:

Interchangeability in CSPs. Foundations of Constraint Processing CSCE421/821, Fall 2004: www.cse.unl.edu/~choueiry/F04-421-821/ Anagh Lal Avery Hall, Room 123D alal@cse.unl.edu. Outline. Exploiting problem structure Interchangeability: Introduction Interchangeability: Types

moana
Télécharger la présentation

Foundations of Constraint Processing CSCE421/821, Fall 2004:

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. Interchangeability in CSPs Foundations of Constraint Processing CSCE421/821, Fall 2004: www.cse.unl.edu/~choueiry/F04-421-821/ Anagh Lal Avery Hall, Room 123D alal@cse.unl.edu Interchangeability in CSPs

  2. Outline • Exploiting problem structure • Interchangeability: Introduction • Interchangeability: Types • Search with Interchangeability • Non-binary CSPs: Challenges and approach • Databases: Challenges and approach Interchangeability in CSPs

  3. Exploit problem structure • Declared symmetries [Glaisher 1874; Ellman 1993] • Applies to specific class of problems • Requires that a user or designer know the structure of the problem • Discover symmetries • Solver discovers symmetries called interchangeability • Symmetry detection partitions the domain of variables Interchangeability in CSPs

  4. {c, d, e, f } V2 {d} V1 V4 V3 {a, b, d} {a, b, c} Idea Consider V2 Interchangeability in CSPs

  5. { c d e, f } V2 Interchangeability: Basics • Two interchangeable values of a variable behave in the same way • Globally (likely intractable) or • Locally (tractable) • Interchangeable values are redundant • Interchangeable values can be placed in a bundle and treated as a single value Interchangeability in CSPs

  6. S S V1 V1 d d V2 V2 c e f d c e, f d Advantages • Cluster or club together values e and f to form a bundle. • Search effort reduces • Fewer nodes are visited • Solutions produced may represent more than one solution • Solution space is compacted. Interchangeability in CSPs

  7. {c, d, e, f } V2 {d} V1 V4 V3 {a, b, d} {a, b, c} Full Interchangeability • Full Interchangeability (FI) • All constraints constraints are considered • Even when they do not apply to the variable • Two values of a variable are Full Interchangeable if on replacing one with the other gives another solution • Computing FI requires finding all solutions Interchangeability in CSPs

  8. Neighborhood Interchangeability • Restricted to neighborhood of a variable • Easier to compute NI than FI • Compute bundles and store for use during search {c, d, e, f } V2 {d} V1 V4 V3 {a, b, d} {a, b, c} Interchangeability in CSPs

  9. Computing NI • Discrimination Tree (DT) • Data structure for computing bundles of a variable. • Only the constraints that apply to the variable are considered • Requires an ordering of values to be followed Interchangeability in CSPs

  10. Building the DT • Let us work with an example on the board. Interchangeability in CSPs

  11. S S S V1 V1 V1 d d d Static bundling V2 V2 V2 c e f d c e, f d c d, e, f Dynamic bundling Static versus Dynamic NI • Static: Bundles computed prior to search • Dynamic: Bundles computed during search Interchangeability in CSPs

  12. Finding all solutions • Dynamic bundling has strong results • Guaranteed no more expensive than forward checking • Guaranteed no more expensive than static bundling • Guaranteed to produce larger bundles than static bundling Interchangeability in CSPs

  13. Finding one solution • Traditionally dynamic bundling was thought to be an overkill for finding one solution • Theoretical claims can not be made • Show empirically that dynamic bundling is effective for finding one solution also Interchangeability in CSPs

  14. Extending to non-binary • Now we start getting into my work, finally! • Non-binary CSP: CSP with at least one constraint of arity greater than 2. • Many problems modeled more naturally by non-binary constraints • Theoretically all non-binary CSPs can be decomposed to binary • Binary version may not be a good choice all the time Interchangeability in CSPs

  15. Constraint Variable {1, 2, 3} {1, 2, 3, 4, 5, 6} C2 C1 {1, 2, 3} {1, 2, 3} C3 {1, 2, 3} C4 Non-binary CSPs • Informal introduction • Representation Interchangeability in CSPs

  16. The Challenges • Constraints of different arities cause problems • Not possible to make one composite DT like structure • Comparing different length tuples (set of variable-value pairs) is awkward • Handling “Partially instantiated” constraints Interchangeability in CSPs

  17. Bundling non-binary CSPs • Data structure used: non-binary Discrimination Tree (DT) • For bundling nb-CSP variables • Create a non-binary DT for each constraint that applies to the variable • Note difference from binary: All constraints were in one DT • Intersect the bundles from all the nb-DTs to get the bundles Interchangeability in CSPs

  18. V {1, 2} {1, 2} A {1, 3} {3} B {3} {3} C {3} No-good bundle {3} D Solution bundle The reason behind the gains • A no-good is a partial instantiation that does not lead to a solution • When search with bundling BTs on a no good a larger search space is eliminated • Of course, the same logic applies to a solution bundle Interchangeability in CSPs

  19. 1200 First Bundle Size 1000 800 600 First Bundle Size # NV in FC 400 # NV in DynBndl 200 0 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 Tightness n = 20, a = 10 p2 = 0.25 c3 = 3 c4 = 2 Some results Interchangeability in CSPs

  20. Maximum gains occur around phase-transition area n = 20, a = 10 2000 p2 = 0.25 c3 = 3 c4 = 2 1500 CPU time [ms] DynBndl 1000 FC 500 Overhead due to large FBS (upto 1200) at low tightness 0 0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.7 Tightness Some results [2] Interchangeability in CSPs

  21. Moving on to databases • Observations • The gains due to dynamic bundling are more for larger domain sizes • For finding all solutions bundling is always better • Bundling produces compact solution spaces • Deduction • Lets try it in Databases Interchangeability in CSPs

  22. Database facts & challenges • Database is about I/O, CPU comparisons don’t matter • Data does not fit in memory • Memory efficiency is key to database algorithms • Database query processing algorithms provide an iterator interface to the query engine • Dynamic bundling as is, does not fit!! Interchangeability in CSPs

  23. How did we handle it for DB • A new bundling algorithm • No DTs • Sort constraints (the tables of the DB), use the structure introduced by sorting to detect bundles • Model search with bundling to fit the framework of query processing algorithms (join algorithm, in particular) Interchangeability in CSPs

  24. Computing a bundle of R1.A R1 A B C Current bundle of R1.A = {1, 5} 1 12 23 Partition 1 13 23 1 14 23 Unequal partitions 2 10 25 Bundle {1, 5} Symmetric partitions 5 12 23 5 13 23 5 14 23 Interchangeability in CSPs

More Related