320 likes | 444 Views
Relational Neighborhood Inverse Consistency for Constraint Satisfaction: A Structure-Based Approach for Adjusting Consistency & Managing Propagation. Robert J. Woodward Constraint Systems Laboratory Department of Computer Science & Engineering University of Nebraska-Lincoln.
E N D
Relational Neighborhood Inverse Consistency for Constraint Satisfaction: A Structure-Based Approach for Adjusting Consistency & Managing Propagation Robert J. Woodward Constraint Systems Laboratory Department of Computer Science & Engineering University of Nebraska-Lincoln • Acknowledgements • Software platform developed in collaboration with Shant Karakashian (to a large extent) & Chris Reeson • Elizabeth Claassen & David B. Marx of the Department of Statistics @ UNL • Experiments conducted at UNL’s Holland Computing Center • NSF Graduate Research Fellowship & NSF Grant No. RI-111795 Woodward-MS Thesis Defense
Main Contributions • Relational Neighborhood Inverse Consistency (RNIC) • Characterization on binary & non-binary CSPs • An algorithm for enforcing RNIC • Comparison to other consistency properties • Variations of RNIC • Reformulation by redundancy removal, triangulation, both • A strategy for selecting the appropriate variation • Managing constraint propagation • Four queue-management strategies (QMSs) • Empirical evaluations on benchmark problems Woodward-MS Thesis Defense
Outline • Background • Relational Neighborhood Inverse Consistency (RNIC) • Property, characterization • Dual Graphs of Binary CSPs • Complete constraint network • Non-complete constraint network • RNIC on binary CSPs • Enforcing RNIC • Algorithm for RNIC • Dual-graph reformulation • Selection strategy • Evaluating RNIC • Propagation-Queue Management • Conclusions & Future Work Woodward-MS Thesis Defense
Constraint Satisfaction Problem R6 B • Warning • Consistency properties vs. algorithms • CSP • Variables, Domains • Constraints: Relations & scopes • Representation • Hypergraph • Dual graph • Solved with • Search • Enforcing consistency • Lookahead = Search + enforcing consistency A Hypergraph R4 E R1 R2 R5 R3 C F D R5 R3 R1 C D AD BCD CF Dual graph A B BD AD F AB ABDE EF AB E R6 R4 R2 Woodward-MS Thesis Defense
Neighborhood Inverse Consistency • Binary CSPs [Debruyene+ 01] • Not effective on sparse problems • Too costly on dense problems • Non-binary CSPs? • Neighborhoods likely too large • Property [Freuder+ 96] • Every value can be extended to a solution in its variable’s neighborhood • Domain-based property • Algorithm • No space overhead • Adapts to graph connectivity R4 A C 0,1,2 0,1,2 R0 R1 R3 B D 0,1,2 0,1,2 R2 R6 B A R4 E R1 R2 R5 C F D R3 Woodward-MS Thesis Defense
Relational NIC B A R4 E R1 R2 R5 R3 C F D Hypergraph R5 R3 R1 C D AD BCD CF A B BD AD F • Domain filtering • Property: RNIC+DF • Algorithm: Projection AB ABDE EF AB E R6 R4 R2 Dual graph • Property • Every tuple can be extended to a solution in its relation’s neighborhood • Relation-based property • Algorithm • Operates on dual graph • Filters relations • Does not alter topology of graphs Woodward-MS Thesis Defense
From NIC to RNIC • Neighborhood Inverse Consistency (NIC)[Freuder+ 96] • Proposed for binary CSPs • Operates on constraint graph • Filters domain of variables • Relational Neighborhood Inverse Consistency (RNIC) • Proposed for both binary & non-binary CSPs • Operates on dual graph • Filters relations; last step projects updated relations on domains • Both • Adapt consistency level to local topology of constraint network • Add no new relations (constraint synthesis) • NIC was shown to be ineffective or costly, we show that RNIC is worthwhile Woodward-MS Thesis Defense
Characterizing RNIC: Binary CSPs • On binary CSPs [Luchtel, 2011] • NIC (on the constraint graph) and RNIC (on the dual graph) are not comparable • Empirically, RNIC does more filtering than NIC Woodward-MS Thesis Defense
Characterizing RNIC (I): Nonbinary CSPs • GAC, SGAC • Variable-based properties • So far, most popular for non-binary CSPs R(*,m)C[Karakashian+ 10] • Relation-based property • Every tuple has a support in every subproblem induced by a combination of m connected relations RNIC+DF R(*,2)C+DF GAC R5 R3 R1 SGAC R6 R4 R2 p p’ : pis strictly weaker than p’ Woodward-MS Thesis Defense R(*,2)C R(*,3)C RNIC R(*,δ+1)C
Characterizing RNIC (II): Nonbinary CSPs • The fuller picture, details are in the thesis • w: Property weakened by redundancy removal • tri: Property strengthened by triangulation • δ: Degree of dual network wR(*,4)C R(*,4)C R(*,2)C≡ wR(*,2)C wR(*,3)C R(*,3)C RNIC R(*,δ+1)C wR(*,δ+1)C wRNIC triRNIC wtriRNIC Woodward-MS Thesis Defense
Outline • Background • Relational Neighborhood Inverse Consistency • Property, characterization • Dual Graphs of Binary CSPs • Complete constraint network • Non-complete constraint network • RNIC on binary CSPs • Enforcing RNIC • Algorithm for RNIC • Dual-graph reformulation • Selection strategy • Evaluating RNIC • Propagation-Queue Management • Conclusions & Future Work Woodward-MS Thesis Defense
Complete Binary CSPs Vn Vn Vn C1,n Cn-1,n C3,n C2,n • Triangle-shaped grid • n-1 vertices for V1 • C1,ii∈[2,n] • Completely connected • n-1 vertices for Vi≥2 • Centered on C1,i • i-2 along horizontal • n-i along vertical • Completely connected • Not shown for clarity V1 Vn-1 V3 V2 V1 V5 V4 V3 V2 V5 V5 V5 C1,5 C4,5 C3,5 C2,5 V1 V4 V3 V2 V4 V4 C1,4 C3,4 C2,4 V3 V2 V1 V3 V1 C1,3 C2,3 uv V2 V1 C1,i uh C1,2 V3 V2 Vn-1 V1 Vn Woodward-MS Thesis Defense
Complete Binary CSPs: RR (I) • A triangle-shaped grid • Every CSP variable annotates a chain of length n-2 • Remove edges that link two non-consecutive vertices • An edge is redundant if • There exists an alternate path between two vertices • Shared variables appear in every vertex in the path Vn Vn Vn C1,n Cn-1,n C3,n C2,n V1 Vn-1 V3 V2 R5 R3 V1 V5 V4 V3 V2 D V5 V5 V5 AD BCD C1,5 C4,5 C3,5 C2,5 A B BD D A V1 V4 V3 V2 V4 V4 C1,4 C3,4 C2,4 AB ABDE B A V3 V2 V1 R6 R4 V3 V1 C1,3 C2,3 uv V2 V1 C1,i uh C1,2 Woodward-MS Thesis Defense
Complete Binary CSPs: RR (II) • A redundancy-free dual graph is not unique • No chain for V2, but a star V1 C7 C2 C10 C1 V2 V2 V5 V5 C9 C6 C9 C5 C8 V5 V4 V2 C3 C6 C7 C1 C5 V2 V1 V5 V3 V4 V4 V1 C4 V3 C2 C4 C8 V3 V3 V4 C10 C3 V4 Woodward-MS Thesis Defense
Non-complete Binary CSPs • Non-complete binary CSP • Is a complete binary constraint graph with missing edges • In the dual graph • There are missing dual vertices • The dual vertices with variable Vi in their scope are completely connected • Redundancy-free dual graph • Can still form a chain using alternate edges V1 C1,3 C1,2 C1,5 C1,4 C2,5 C2,4 V2 V5 C3,5 C4,5 C2,3 V3 V4 C3,4 V5 V5 V5 C1,5 C4,5 C3,5 C2,5 V1 V4 V3 V2 V4 V4 C1,4 C3,4 C2,4 V3 V2 V3 C1,3 C2,3 V1 V2 V1 C1,2 Woodward-MS Thesis Defense
RNIC on Binary CSPs • After RR, RNIC is never stronger than R(*,3)C • Configurations for R(*,4)C • C1 has three adjacent constraints C2, C3, C4 • C1 is not an articulation point • Two configurations, neither is possible V1 V1 V1 V2 C1 C1 V2 V1 C2 C2 C4 C4 C3 C3 Woodward-MS Thesis Defense
Outline • Background • Relational Neighborhood Inverse Consistency • Property, characterization • Dual Graphs of Binary CSPs • Complete constraint network • Non-complete constraint network • RNIC on binary CSPs • Enforcing RNIC • Algorithm for RNIC • Dual-graph reformulation • Selection strategy • Evaluating RNIC • Propagation-Queue Management • Conclusions & Future Work Woodward-MS Thesis Defense
Algorithm for Enforcing RNIC • Two queues • Q: relations to be updated • Qt(R): The tuples of relation Rwhose supports must be verified • SEARCHSUPPORT(τ,R) • Backtrack search on Neigh(R) • Loop until all Qt(⋅)are empty τi ✗ τ √ ..… • Complexity • Space: O(ketδ) • Time: O(tδ+1eδ) • Efficient for a fixed δ R Neigh(R) Woodward-MS Thesis Defense
Improving Algorithm’s Performance • UseIndexTree[Karakashian+ AAAI10] • To quickly check consistency of 2 tuples • Dynamically detect dangles • Tree structures may show in subproblem @ each instantiation • Apply directional arc consistency Note that exploiting dangles is • Not useful in R(*,m)C: small value of m, subproblem size • Not applicable to GAC: does not operate on dual graph R5 R3 R1 R6 R4 R2 Woodward-MS Thesis Defense
Reformulating the Dual Graph • High degree • Large neighborhoods • High computational cost • Redundancy Removal (wRNIC) • Use minimal dual graph RR+Triangulation (wtriRNIC) • Local, complementary, do not ‘clash’ • Cycles of length ≥ 4 • Hampers propagation • RNICR(*,3)C • Triangulation (triRNIC) • Triangulate dual graph R5 R3 R1 C D AD BCD CF A B BD F AD R5 R3 R1 AB ABDE EF AB E C D AD BCD CF R6 R4 R2 A B BD F D A AB ABDE EF B A E R6 R4 R2 RNIC wRNIC triRNIC wtriRNIC Woodward-MS Thesis Defense
Selection Strategy: Which? When? • Density of dual graph ≥ 15% is too dense • Remove redundant edges • Triangulation increases density no more than two fold • Reformulate by triangulation • Each reformulation executed at most once Start No Yes dGo≥ 15% No No Yes Yes dGtri≤ 2 dGo dGwtri≤ 2 dGw Gwtri Gtri Gw Go Woodward-MS Thesis Defense
Outline • Background • Relational Neighborhood Inverse Consistency • Property, characterization • Dual Graphs of Binary CSPs • Complete constraint network • Non-complete constraint network • RNIC on binary CSPs • Enforcing RNIC • Algorithm for RNIC • Dual-graph reformulation • Selection strategy • Evaluating RNIC • Propagation-Queue Management • Conclusions & Future Work Woodward-MS Thesis Defense
Experimental Setup • Backtrack search with full lookahead • We compare • wR(*,m)C for m = 2,3,4 • GAC • RNIC and its variations • General conclusion • GAC best on random problems • RNIC-based best on structured/quasi-structued problems • We focus on non-binary results (960 instances) • triRNIC theoretically has the least number of nodes visited • selRNIC solves most instances backtrack free (652 instances) Woodward-MS Thesis Defense
Experimental Results • Statistical analysis on CP benchmarks • Time: Censored data calculated mean • Rank: Censored data rank based on probability of survival data analysis • #F: Number of instances fastest • [⋅]CPU: Equivalence classes based on CPU • [⋅]Completion: Equivalence classes based on completion • #C: Number of instances completed • #BT-free: # instances solved backtrack free Woodward-MS Thesis Defense
Outline • Background • Relational Neighborhood Inverse Consistency • Property, characterization • Dual Graphs of Binary CSPs • Complete constraint network • Non-complete constraint network • RNIC on binary CSPs • Enforcing RNIC • Algorithm for RNIC • Dual-graph reformulation • Selection strategy • Evaluating RNIC • Propagation-Queue Management • Conclusions & Future Work Woodward-MS Thesis Defense
Propagation-Queue Management • Three directions for ordering the relations: • Arbitrary ordering (previous) • Perfect elimination ordering (PEO) of some triangulation • Ordering of the maximal cliques, corresponds to a tree-decomposition ordering (TD) R1 CF R1,R2,R4 C4 R2 EF R5 R3 R1 R1,R3,R4 C3 AD BCD CF R4 ABDE Ordering R5,R4 C2 R3 BCD AB ABDE EF R6 R4 R2 R5 AD R6,R4 PEO C1 Maximal cliques R6 AB Woodward-MS Thesis Defense
Queue-Management Strategies R1 CF R2 EF R5 R3 R1 AD BCD CF R4 ABDE Ordering R3 BCD AB ABDE EF R6 R4 R2 AD R5 PEO AB R6 Woodward-MS Thesis Defense
Queue-Management Strategies R1,R2,R4 C4 R5 R3 R1 R1,R3,R4 Ordering C3 AD BCD CF R5,R4 C2 AB ABDE EF maximal cliques R6 R4 R2 R6,R4 C1 Woodward-MS Thesis Defense
Propagation-Queue Management • [⋅]CPU: Equivalence classes based on CPU • %: Percent increased gain by the algorithm • Statistical analysis on CP benchmarks • Time: Censored data rank based on probability of survival data analysis Woodward-MS Thesis Defense
Conclusions • RNIC • Structure of binary dual graph • Algorithm for enforcing RNIC • Polynomial for fixed-degree dual graphs • BT-free search: hints to problem tractability • Various reformulations of the dual graph • Adaptive, unifying, self-regulatory, automatic strategy • New propagation-queue management strategies • Empirical evidence, supported by statistics Woodward-MS Thesis Defense
Future Work • Extension to singleton-type consistencies • Extension to constraints defined in intension • Possible by only domain filtering (weakening) • Study influence of redundancy removal algorithms • Redundancy removal algorithm of [Janssen+ 89] seems to favor grids • Evaluate new queue-management strategies on other consistency algorithms Woodward-MS Thesis Defense
Thank You! Questions? Woodward-MS Thesis Defense