maintaining generalized arc consistency on ad hoc r ary constraints
Download
Skip this Video
Download Presentation
Maintaining Generalized Arc Consistency on Ad Hoc r-ary Constraints

Loading in 2 Seconds...

play fullscreen
1 / 75

Maintaining Generalized Arc Consistency on Ad Hoc r-ary Constraints - PowerPoint PPT Presentation


  • 68 Views
  • Uploaded on

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).

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Maintaining Generalized Arc Consistency on Ad Hoc r-ary Constraints' - tacey


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
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
Outline
  • GAC on an MDD constraint
  • Implementation of O(1) incrementality
  • Comparisons & empirical results
outline1
Outline
  • GAC on an MDD constraint
  • Implementation of O(1) incrementality
  • Comparisons & empirical results
slide6
mddc
  • Fast support checks
    • Prefix & suffix sharing
    • Built-in indexing
  • Depth-first traversal of the MDD
  • Time complexity is linear to size of MDD
slide7
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide8
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

slide9
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide10
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

slide11
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide12
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide13
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide14
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide15
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide16
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide17
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide18
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide19
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide20
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

slide21
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide22
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide23
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide24
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide25
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide26
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide27
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

slide28
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide29
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide30
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide31
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide32
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

slide33
0

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z

outline2
Outline
  • GAC on an MDD constraint
  • Implementation of O(1) incrementality
  • Comparisons & empirical results
trailing of inconsistent mdd nodes
Trailing of inconsistent MDD nodes

“Is node X pruned?”

during search

“Prune X.”

O(1)

“Undo ‘prune X’.”

backtracks

trailing of inconsistent mdd nodes1
Trailing of inconsistent MDD nodes

during

search

stack

array

T0

“Prune 3.” @ T0

sparse set [BT93]

trailing of inconsistent mdd nodes2
Trailing of inconsistent MDD nodes

during

search

stack

array

T0

“Prune 3.” @ T0

sparse set [BT93]

trailing of inconsistent mdd nodes3
Trailing of inconsistent MDD nodes

during

search

stack

array

T0

“Is 3 pruned?”

“Prune 3.” @ T0

sparse set [BT93]

trailing of inconsistent mdd nodes4
Trailing of inconsistent MDD nodes

during

search

stack

array

T0

“Prune 6.” @ T0

sparse set [BT93]

trailing of inconsistent mdd nodes5
Trailing of inconsistent MDD nodes

during

search

stack

array

T0

“Prune 6.” @ T0

sparse set [BT93]

trailing of inconsistent mdd nodes6
Trailing of inconsistent MDD nodes

during

search

stack

array

T0

T1

“Prune 1.” @ T1

sparse set [BT93]

trailing of inconsistent mdd nodes7
Trailing of inconsistent MDD nodes

during

search

stack

array

T0

T1

T2

“Prune 5.” @ T2

sparse set [BT93]

trailing of inconsistent mdd nodes8
Trailing of inconsistent MDD nodes

during

search

stack

array

T0

T1

T2

“Backtracks to T0.”

sparse set [BT93]

trailing of inconsistent mdd nodes9
Trailing of inconsistent MDD nodes

during

search

stack

array

“Is 6 pruned?”

T0

“Is 5 pruned?”

“Backtracks to T0.”

sparse set [BT93]

outline3
Outline
  • GAC on an MDD constraint
  • Implementation of O(1) incrementality
  • Comparisons & empirical results
mddc vs state of the art
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
mddc vs regular global constraint
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)

mddc vs regular global constraint1
mddc vs regular (global constraint)
  • Solving Car Sequencing using MDD constraints (global sequence constraints)
  • Bottom-up labeling (worst for mddc)

 Incrementality is critical

mddc vs regular global constraint2
mddc vs regular (global constraint)
  • Solving Car Sequencing using MDD constraints (global sequence constraints)
  • Top-down labeling (best for mddc)

 Incrementality is implicitly achieved

mddc vs state of the art1
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

slide51
hologram (Minion)

[LR05]

bsearch (Minion)

[LS06]

ndlist (Minion)

[GJMN07]

mtrie (Minion 0.4.1)

[GJMN07]

case(SICStus 4.0.3)

(time-stamp based)

summary
Summary
    • Thanks to the compactness of MDD and the efficient sparse set data structure, mddc is a fast and simple GAC algorithm for structural, non-structural or randomad hoc constraints.
  • For “MDD-friendly” global constraints,mddc can be used immediately.
    • (Generic) MDD manipulation vs

(Specific) algorithm design

slide54
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

z

z

z

z

4

5

5

4

1

1

slide55
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

z

z

z

z

4

5

5

4

1

1

slide56
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

z

z

z

z

4

5

5

4

1

1

slide57
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

z

z

z

z

4

5

5

4

1

1

T

slide58
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

z

z

a

z

z

4

5

5

4

1

1

T

slide59
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

z

z

a

z

z

4

5

5

4

1

1

T

slide60
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

z

z

a

z

z

4

5

5

4

1

1

T

slide61
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

z

z

a

z

z

4

4

5

5

1

1

T

slide62
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

z

z

a

z

z

4

4

5

5

1

1

T

slide63
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

z

z

a

z

z

4

4

5

1

1

5

T

slide64
Table-to-MDD conversion

x

1

2

y

y

2

1

1

2

b

z

z

a

z

z

4

4

5

1

1

5

T

slide65
Table-to-MDD conversion

x

1

2

c

y

y

2

1

1

2

b

z

z

a

z

z

4

4

5

1

1

5

T

slide66
Table-to-MDD conversion

x

1

2

c

y

y

2

1

1

2

b

z

z

a

z

z

4

4

5

1

1

5

T

slide67
Table-to-MDD conversion

x

1

2

c

y

y

2

1

1

2

b

z

z

a

z

z

4

4

5

1

1

5

T

slide68
Table-to-MDD conversion

x

1

2

c

y

y

2

1

1

2

b

z

z

a

z

z

4

4

5

1

1

5

T

slide69
Table-to-MDD conversion

x

1

2

c

y

y

1

2

1

2

b

z

a

z

z

4

4

5

1

5

T

slide70
Table-to-MDD conversion

x

1

2

c

y

y

1

1

2

2

b

a

z

z

4

1

5

T

slide71
Table-to-MDD conversion

x

1

2

c

y

y

1

1

2

2

b

a

z

z

4

1

5

T

slide72
Table-to-MDD conversion

d

x

1

c

2

y

1

2

internal representation

of MDD nodes

b

a

z

z

4

1

5

T

slide73
Table-to-MDD conversion

d

x

1

c

2

y

1

2

internal representation

of MDD nodes

b

a

z

z

4

1

5

T

slide74
Table-to-MDD conversion

d

x

1

c

2

y

1

2

internal representation

of MDD nodes

b

a

z

z

4

1

5

T

ad