1 / 75

Maintaining Generalized Arc Consistency on Ad Hoc r-ary Constraints

Maintaining Generalized Arc Consistency on Ad Hoc r-ary Constraints. Kenil Cheng and Roland Yap School of Computing National University of Singapore. Outline. GAC on an MDD constraint Implementation of O(1) incrementality Comparisons & empirical results. Multi-valued decision diagram (MDD).

tacey
Download Presentation

Maintaining Generalized Arc Consistency on Ad Hoc r-ary Constraints

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. Maintaining Generalized Arc Consistency on Ad Hoc r-ary Constraints Kenil Cheng and Roland Yap School of Computing National University of Singapore

  2. Outline • GAC on an MDD constraint • Implementation of O(1) incrementality • Comparisons & empirical results

  3. Multi-valued decision diagram (MDD) x 2 1 3 y y y 3 2 1 1 2 3 2 z z z 2 1 3

  4. Multi-valued decision diagram (MDD) x 2 1 3 y y y 3 2 1 1 2 3 2 z z z 2 1 3

  5. Outline • GAC on an MDD constraint • Implementation of O(1) incrementality • Comparisons & empirical results

  6. mddc • Fast support checks • Prefix & suffix sharing • Built-in indexing • Depth-first traversal of the MDD • Time complexity is linear to size of MDD

  7. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  8. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y Any support for (z=1)? y MDD z z z

  9. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  10. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y Found a support for (z=1) y MDD z z z

  11. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  12. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  13. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  14. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  15. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  16. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  17. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  18. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  19. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  20. 0 x 2 u 1 x pruned consistent v v x w w w x x x I knew it’s consistent. y y y MDD z z z

  21. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  22. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  23. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  24. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  25. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  26. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  27. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z I knew it. z z

  28. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  29. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  30. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  31. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  32. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  33. 0 x 2 u 1 x pruned consistent v v x w w w x x x y y y MDD z z z

  34. Outline • GAC on an MDD constraint • Implementation of O(1) incrementality • Comparisons & empirical results

  35. Trailing of inconsistent MDD nodes “Is node X pruned?” during search “Prune X.” O(1) “Undo ‘prune X’.” backtracks

  36. Trailing of inconsistent MDD nodes during search stack array T0 “Prune 3.” @ T0 sparse set [BT93]

  37. Trailing of inconsistent MDD nodes during search stack array T0 “Prune 3.” @ T0 sparse set [BT93]

  38. Trailing of inconsistent MDD nodes during search stack array T0 “Is 3 pruned?” “Prune 3.” @ T0 sparse set [BT93]

  39. Trailing of inconsistent MDD nodes during search stack array T0 “Prune 6.” @ T0 sparse set [BT93]

  40. Trailing of inconsistent MDD nodes during search stack array T0 “Prune 6.” @ T0 sparse set [BT93]

  41. Trailing of inconsistent MDD nodes during search stack array T0 T1 “Prune 1.” @ T1 sparse set [BT93]

  42. Trailing of inconsistent MDD nodes during search stack array T0 T1 T2 “Prune 5.” @ T2 sparse set [BT93]

  43. Trailing of inconsistent MDD nodes during search stack array T0 T1 T2 “Backtracks to T0.” sparse set [BT93]

  44. Trailing of inconsistent MDD nodes during search stack array “Is 6 pruned?” T0 “Is 5 pruned?” “Backtracks to T0.” sparse set [BT93]

  45. Outline • GAC on an MDD constraint • Implementation of O(1) incrementality • Comparisons & empirical results

  46. mddc vs state-of-the-art • For structural constraints, up to • r^2timesfaster than binary search [LS06] • dtimesfaster than hologram [LR05] • 2^r times faster than mtrie & nd-list [GJMN07] • N.B. arity (r) and domain size(d) dominate the time complexity O(rd^r) of generic GAC • Empirical comparison is not easy • Ease & quality of implementation • Dependence on other solver components

  47. mddc vs regular (global constraint) sparse set (GeCode) bit vector (GeCode) [CY06] time stamp (GeCode) mimics SICStus Prolog’s case regular (GeCode) [P04] Solving Still-Life Problem using MDD constraints MDD size: Θ(0.9121n x 6.486n)

  48. mddc vs regular (global constraint) • Solving Car Sequencing using MDD constraints (global sequence constraints) • Bottom-up labeling (worst for mddc)  Incrementality is critical

  49. mddc vs regular (global constraint) • Solving Car Sequencing using MDD constraints (global sequence constraints) • Top-down labeling (best for mddc)  Incrementality is implicitly achieved

  50. mddc vs state-of-the-art • For random constraints  worst case for MDDs • Similar to [GJMN07] • Arity: 5, 7, …, 17 • # of variables: (arity+2), (arity+5), …, 30 • Domain size: 2, 3, …, 11 • # of constraints: based on RB model • Looseness: 20%, 50%, 80% • 1000 ≤ # of tuples ≤ 100K  36 ≤ MDD size ≤ 10588 • Time limit: 3 minutes • 5 instances per setting 1747 instances • Implemented in GeCode 2.1.1 Small MDDs Larger, harder benchmarks in paper

More Related