Maintaining generalized arc consistency on ad hoc r ary constraints
Download
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 Constraints

  • GAC on an MDD constraint

  • Implementation of O(1) incrementality

  • Comparisons & empirical results


Multi valued decision diagram mdd
Multi-valued decision diagram (MDD) Constraints

x

2

1

3

y

y

y

3

2

1

1

2

3

2

z

z

z

2

1

3


Multi valued decision diagram mdd1
Multi-valued decision diagram (MDD) Constraints

x

2

1

3

y

y

y

3

2

1

1

2

3

2

z

z

z

2

1

3


Outline1
Outline Constraints

  • GAC on an MDD constraint

  • Implementation of O(1) incrementality

  • Comparisons & empirical results


mddc Constraints

  • Fast support checks

    • Prefix & suffix sharing

    • Built-in indexing

  • Depth-first traversal of the MDD

  • Time complexity is linear to size of MDD


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

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


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

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


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

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


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

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


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

x

2

u

1

x

pruned

consistent

v

v

x

w

w

w

x

x

x

y

y

y

MDD

z

z

z


0 Constraints

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 Constraints

  • GAC on an MDD constraint

  • Implementation of O(1) incrementality

  • Comparisons & empirical results


Trailing of inconsistent mdd nodes
Trailing of inconsistent MDD nodes Constraints

“Is node X pruned?”

during search

“Prune X.”

O(1)

“Undo ‘prune X’.”

backtracks


Trailing of inconsistent mdd nodes1
Trailing of inconsistent MDD nodes Constraints

during

search

stack

array

T0

“Prune 3.” @ T0

sparse set [BT93]


Trailing of inconsistent mdd nodes2
Trailing of inconsistent MDD nodes Constraints

during

search

stack

array

T0

“Prune 3.” @ T0

sparse set [BT93]


Trailing of inconsistent mdd nodes3
Trailing of inconsistent MDD nodes Constraints

during

search

stack

array

T0

“Is 3 pruned?”

“Prune 3.” @ T0

sparse set [BT93]


Trailing of inconsistent mdd nodes4
Trailing of inconsistent MDD nodes Constraints

during

search

stack

array

T0

“Prune 6.” @ T0

sparse set [BT93]


Trailing of inconsistent mdd nodes5
Trailing of inconsistent MDD nodes Constraints

during

search

stack

array

T0

“Prune 6.” @ T0

sparse set [BT93]


Trailing of inconsistent mdd nodes6
Trailing of inconsistent MDD nodes Constraints

during

search

stack

array

T0

T1

“Prune 1.” @ T1

sparse set [BT93]


Trailing of inconsistent mdd nodes7
Trailing of inconsistent MDD nodes Constraints

during

search

stack

array

T0

T1

T2

“Prune 5.” @ T2

sparse set [BT93]


Trailing of inconsistent mdd nodes8
Trailing of inconsistent MDD nodes Constraints

during

search

stack

array

T0

T1

T2

“Backtracks to T0.”

sparse set [BT93]


Trailing of inconsistent mdd nodes9
Trailing of inconsistent MDD nodes Constraints

during

search

stack

array

“Is 6 pruned?”

T0

“Is 5 pruned?”

“Backtracks to T0.”

sparse set [BT93]


Outline3
Outline Constraints

  • 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 Constraints

  • 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) Constraints

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

  • 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) Constraints

  • 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 Constraints

  • 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


hologram Constraints (Minion)

[LR05]

bsearch (Minion)

[LS06]

ndlist (Minion)

[GJMN07]

mtrie (Minion 0.4.1)

[GJMN07]

case(SICStus 4.0.3)

(time-stamp based)


Summary
Summary Constraints

  • 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


  • Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    z

    z

    z

    z

    4

    5

    5

    4

    1

    1


    Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    z

    z

    z

    z

    4

    5

    5

    4

    1

    1


    Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    z

    z

    z

    z

    4

    5

    5

    4

    1

    1


    Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    z

    z

    z

    z

    4

    5

    5

    4

    1

    1

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    z

    z

    a

    z

    z

    4

    5

    5

    4

    1

    1

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    z

    z

    a

    z

    z

    4

    5

    5

    4

    1

    1

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    z

    z

    a

    z

    z

    4

    5

    5

    4

    1

    1

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    z

    z

    a

    z

    z

    4

    4

    5

    5

    1

    1

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    z

    z

    a

    z

    z

    4

    4

    5

    5

    1

    1

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    z

    z

    a

    z

    z

    4

    4

    5

    1

    1

    5

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    y

    y

    2

    1

    1

    2

    b

    z

    z

    a

    z

    z

    4

    4

    5

    1

    1

    5

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    c

    y

    y

    2

    1

    1

    2

    b

    z

    z

    a

    z

    z

    4

    4

    5

    1

    1

    5

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    c

    y

    y

    2

    1

    1

    2

    b

    z

    z

    a

    z

    z

    4

    4

    5

    1

    1

    5

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    c

    y

    y

    2

    1

    1

    2

    b

    z

    z

    a

    z

    z

    4

    4

    5

    1

    1

    5

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    c

    y

    y

    2

    1

    1

    2

    b

    z

    z

    a

    z

    z

    4

    4

    5

    1

    1

    5

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    c

    y

    y

    1

    2

    1

    2

    b

    z

    a

    z

    z

    4

    4

    5

    1

    5

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    c

    y

    y

    1

    1

    2

    2

    b

    a

    z

    z

    4

    1

    5

    T


    Table-to-MDD conversion Constraints

    x

    1

    2

    c

    y

    y

    1

    1

    2

    2

    b

    a

    z

    z

    4

    1

    5

    T


    Table-to-MDD conversion Constraints

    d

    x

    1

    c

    2

    y

    1

    2

    internal representation

    of MDD nodes

    b

    a

    z

    z

    4

    1

    5

    T


    Table-to-MDD conversion Constraints

    d

    x

    1

    c

    2

    y

    1

    2

    internal representation

    of MDD nodes

    b

    a

    z

    z

    4

    1

    5

    T


    Table-to-MDD conversion Constraints

    d

    x

    1

    c

    2

    y

    1

    2

    internal representation

    of MDD nodes

    b

    a

    z

    z

    4

    1

    5

    T


    Car sequencing
    Car sequencing Constraints


    ad