Presentation is loading. Please wait.

Presentation is loading. Please wait.

Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs1 Foundations of Constraint Processing CSCE421/821, Fall 2004:

Similar presentations


Presentation on theme: "Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs1 Foundations of Constraint Processing CSCE421/821, Fall 2004:"— Presentation transcript:

1 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs1 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 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs2 Outline Exploiting problem structure Interchangeability: Introduction Interchangeability: Types Search with Interchangeability Non-binary CSPs: Challenges and approach Databases: Challenges and approach

3 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs3 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

4 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs4 Idea V3V3 {c, d, e, f } {d} {a, b, d}{a, b, c} V4V4 V2V2 V1V1 Consider V 2 Domain value Consistent with c V 3 (a, b, d) V 4 (a, b) d V 3 (a, b) V 4 (a, b, c) e,f V 3 (a, b, d) V 4 (a, b, d)

5 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs5 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 { c d e, f } V2V2

6 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs6 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. ce, fd d V1V1 V2V2 S cefd d V1V1 V2V2 S

7 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs7 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 V3V3 {c, d, e, f } {d} {a, b, d}{a, b, c} V4V4 V2V2 V1V1

8 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs8 Neighborhood Interchangeability Restricted to neighborhood of a variable Easier to compute NI than FI Compute bundles and store for use during search V3V3 {c, d, e, f } {d} {a, b, d}{a, b, c} V4V4 V2V2 V1V1

9 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs9 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

10 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs10 Building the DT Let us work with an example on the board.

11 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs11 Static versus Dynamic NI Static: Bundles computed prior to search Dynamic: Bundles computed during search S cd, e, f d V1V1 V2V2 Dynamic bundling Static bundling ce, fd d V1V1 V2V2 S cefd d V1V1 V2V2 S

12 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs12 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

13 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs13 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

14 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs14 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

15 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs15 Non-binary CSPs Informal introduction Representation C4C4 {1, 2, 3, 4, 5, 6} {1, 2, 3} C2C2 C1C1 C3C3 Constraint Variable

16 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs16 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

17 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs17 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

18 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs18 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 {1, 2} {3} {1, 2} {1, 3} {3} No-good bundle V D C A B Solution bundle

19 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs19 Some results 0 200 400 600 800 1000 1200 0.350.40.450.50.550.60.650.7 # NV in DynBndl # NV in FC First Bundle Size Tightness n = 20, a = 10 p 2 = 0.25 c 3 = 3 c 4 = 2

20 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs20 Some results [2] 0 500 1000 1500 2000 0.350.40.450.50.550.60.650.7 DynBndl FC n = 20, a = 10 p 2 = 0.25 c 3 = 3 c 4 = 2 Tightness Overhead due to large FBS (upto 1200) at low tightness Maximum gains occur around phase- transition area CPU time [ms]

21 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs21 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

22 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs22 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!!

23 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs23 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)

24 Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs24 Partition Unequal partitions Symmetric partitions Bundle {1, 5} R1 A B C 1 12 23 1 13 23 1 14 23 2 10 25 5 12 23 5 13 23 5 14 23 Current bundle of R1.A = {1, 5} Computing a bundle of R1.A


Download ppt "Foundations of Constraint Processing, Fall 2004 October 3, 2004Interchangeability in CSPs1 Foundations of Constraint Processing CSCE421/821, Fall 2004:"

Similar presentations


Ads by Google