Improving Relational Consistency Algorithms Using Dynamic Relation - - PowerPoint PPT Presentation

improving relational consistency algorithms using dynamic
SMART_READER_LITE
LIVE PREVIEW

Improving Relational Consistency Algorithms Using Dynamic Relation - - PowerPoint PPT Presentation

Improving Relational Consistency Algorithms Using Dynamic Relation Partitioning Anthony Schneider 1 Robert J. Woodward 1,2 Berthe Y. Choueiry 1 & Christian Bessiere 2 1 Constraint Systems Laboratory, University of


slide-1
SLIDE 1

Constraint Systems Laboratory

Anthony Schneider1 Robert J. Woodward1,2 
 Berthe Y. Choueiry1 & Christian Bessiere2

  • 1Constraint Systems Laboratory, University of Nebraska-Lincoln
  • 2LIRMM, CNRS & University of Montpellier II

Improving Relational Consistency Algorithms Using Dynamic Relation Partitioning

9/23/14 CP 2014 1 Acknowledgements

  • Experiments conducted at UNL’s Holland Computing Center
  • Woodward supported by a NSF Graduate Research Fellowship grant number 1041000
  • NSF Grant No. RI-111795 and EU project ICON (FP7-284715)
slide-2
SLIDE 2

Constraint Systems Laboratory

Outline

  • Introduction

– R(∗,m)C property and its algorithm PERTUPLE

  • Partitioning a relation

– Coarse, fine, intermediate blocks

  • Improve PERTUPLE using partitions

– PERTUPLE → PERFB

  • Experimental results
  • Conclusion

9/23/14 CP 2014 2

slide-3
SLIDE 3

Constraint Systems Laboratory

R(∗,m)C (a.k.a. m-wise consistency)

  • 9/23/14

CP 2014 3

  • A CSP is R(∗,m)C iff

– Every tuple in a relation can be extended – to the variables in the scope of any (m-1) other relations – in an assignment satisfying all m relations simultaneously

  • R(∗,m)C ≡ Every set of m relations is minimal

..…

∀ m-1 relations

∀ ¡tuple ¡ ∀ ¡rela)on ¡

slide-4
SLIDE 4

Constraint Systems Laboratory

PERTUPLE

  • 9/23/14

CP 2014 4

[Karakashian+ AAAI 10]

  • PERTUPLE enforces R(∗,m)C
  • Store all connected combinations of m relations
  • Update propagation queue

t1 ti t2 t3

  • For each relation in a combination

– For each tuple in the relation – SEARCHSUPPORT: Conduct backtrack search with FC over the dual CSP induced by the m relations – Remove the tuple if no solution is found

slide-5
SLIDE 5

Constraint Systems Laboratory

Piecewise Functional Constraints

9/23/14 CP 2014 5

A B C D G t1 0 0 0 0 0 t2 0 0 0 1 0 t3 0 0 1 0 0 t4 0 0 1 1 1 t5 0 1 1 0 1 t6 0 1 1 1 1 t7 1 1 1 1 1 A B E 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1

✗ ✗

R1 R2

R2 R1 A,B,C,D,G A,B,E A,B,F C,F B,E,G A,B

  • PW-AC enforces R(∗,2)C

[Samaras & Stergiou JAIR 05]

slide-6
SLIDE 6

Constraint Systems Laboratory

Types of Partitions

9/23/14 CP 2014 6

  • 1

cb1 t1 t2 t3 t4 cb2 t5 t6 cb3 t7

  • 2

cb4 t1 t2 t3 cb5 t4 cb6 t5 t6 t7

  • 3

cb7 t1 t2 cb8 t3 t4 t5 t6 t7

  • 1∪o2∪o3

fb1 t1 t2 fb2 t3 fb3 t4 fb4 t5 t6 fb5 t7

  • 1∪o3

ib1 t1 t2 ib2 t3 t4 ib3 t5 t6 ib4 t7

C1

  • 1

C3 C5 C2

  • 2
  • 1

C4

  • 3

R1 t1 t2 t3 t4 t5 t6 t7 R1: coarse blocks R1: fine blocks R1: intermediate

  • For ¡each ¡rela)on, ¡we ¡store ¡

– A ¡single ¡par))on ¡of ¡fine ¡blocks ¡ – As ¡many ¡par))ons ¡of ¡coarse ¡blocks ¡as ¡shared ¡subscopes ¡

slide-7
SLIDE 7

Constraint Systems Laboratory

PERTUPLE → PERFB

9/23/14 CP 2014 7

  • Tuple → Fine Block (FB)
  • General mechanism is identical

– Combinations, queuing, and propagation

  • SEARCHSUPPORT

– Search enumerates fine blocks, not tuples – Forward checking operates on coarse blocks

  • Calls to SEARCHSUPPORT reduced

– Skips tuples in the same fine blocks – Skips fine blocks in the same intermediate block – Using two local data structures

  • Details in paper
slide-8
SLIDE 8

Constraint Systems Laboratory

Enforcing R(∗,m)C with PERFB

  • 9/23/14

CP 2014 8

A B E

fb6 0 0 0 fb7 0 0 1 fb8 0 1 0 fb9 0 1 1 fb10 1 0 0 fb11 1 0 1

C F

fb20 0 0 fb21 0 1 fb22 1 0

R5 R2 A B C D G

fb1 t1 0 0 0 0 0 t2 0 0 0 1 0 fb2 t3 0 0 1 0 0 fb3 t4 0 0 1 1 1 fb4 t5 0 1 1 0 1 t5 0 1 1 1 1 fb5 t7 1 1 1 1 1

R1 A B C Consistent

  • - -
  • Equiv FBs for R1

Rel Variables R1 ABC

v

  • A B C Consistent

0 0 0 True Vars in subscopes

slide-9
SLIDE 9

Constraint Systems Laboratory

A B C Consistent 0 0 0 True

Enforcing R(∗,m)C with PERFB

  • 9/23/14

CP 2014 9

A B E

fb6 0 0 0 fb7 0 0 1 fb8 0 1 0 fb9 0 1 1 fb10 1 0 0 fb11 1 0 1

C F

fb20 0 0 fb21 0 1 fb22 1 0

R5 R2 A B C D G

fb1 t1 0 0 0 0 0 t2 0 0 0 1 0 fb2 t3 0 0 1 0 0 fb3 t4 0 0 1 1 1 fb4 t5 0 1 1 0 1 t5 0 1 1 1 1 fb5 t7 1 1 1 1 1

R1 Equiv FBs for R1 Rel Variables R1 ABC Vars in subscopes

?

A B C Consistent 0 0 0 True 0 0 1 True

slide-10
SLIDE 10

Constraint Systems Laboratory

A B C Consistent 0 0 0 True 0 0 1 True

Enforcing R(∗,m)C with PERFB

  • 9/23/14

CP 2014 10

A B E

fb6 0 0 0 fb7 0 0 1 fb8 0 1 0 fb9 0 1 1 fb10 1 0 0 fb11 1 0 1

C F

fb20 0 0 fb21 0 1 fb22 1 0

R5 R2 A B C D G

fb1 t1 0 0 0 0 0 t2 0 0 0 1 0 fb2 t3 0 0 1 0 0 fb3 t4 0 0 1 1 1 fb4 t5 0 1 1 0 1 t5 0 1 1 1 1 fb5 t7 1 1 1 1 1

R1 Equiv FBs for R1 Rel Variables R1 ABC

? Yes!

Vars in subscopes

slide-11
SLIDE 11

Constraint Systems Laboratory

Experimental Setup

9/23/14 CP 2014 11

  • Backtrack search, find first solution, dom/deg
  • m = 2, 3, 4, |𝜔(cl)|
  • XCSP benchmark of CP Solver Competition

[Karakashian+ AAAI 13]

  • Maintaining R(∗,m)C

– Use a tree-decomposition of the CSP – Enforce consistency on individual clusters – Add projection of constraints to separators to bolster propagation between adjacent clusters – Use a minimal dual graph to reduce number of combinations of m constraints – Better performance than GAC, maxRPWC

[Lecoutre+]

slide-12
SLIDE 12

Constraint Systems Laboratory

PERFB vs. PERTUPLE: completed instances

  • 9/23/14

CP 2014 12

1000 2000 3000 4000 5000 6000 7000 8000 350 362 374 386 398 410 422 434 446 458 470 482 494 506 518 530 542 554

m=2

PerTuple PerFB

1000 2000 3000 4000 5000 6000 7000 8000 450 460 470 480 490 500 510 520 530 540 550 560 570 580 590 600 610

m=3

PerTuple PerFB

CPU Time (s) Number of instances completed

slide-13
SLIDE 13

Constraint Systems Laboratory

9/23/14 CP 2014 13

1000 2000 3000 4000 5000 6000 7000 8000 400 411 422 433 444 455 466 477 488 499 510 521 532 543 554 565 576 587

m=4

PerTuple PerFB

1000 2000 3000 4000 5000 6000 7000 8000 400 412 424 436 448 460 472 484 496 508 520 532 544 556 568 580 592 604

m=|ψ(cl)|

PerTuple PerFB

CPU Time (s) Number of instances completed

PERFB vs. PERTUPLE: completed instances

slide-14
SLIDE 14

Constraint Systems Laboratory

9/23/14 CP 2014 14

1000 2000 3000 4000 5000 6000 7000 8000 400 404 408 412 416 420 424 428 432 436 440 444 448 452 456 460 464 468 472 476 480 484 488 492 496 500 504 508 512 516 520 524 528 532 536 540 544 548 552 556 560 564 568 572 576 580 584 588 592 596 600 604 608 612 616

PerFB

m=2 m=3 m=4 m=|C| m=|ψ(cl)|

Number of instances completed CPU Time (s)

PERFB m = 2,3,4, ¡|𝜔(cl)|

m = 2 m = 3 m = 4 m = |𝜔(cl)|

slide-15
SLIDE 15

Constraint Systems Laboratory

m = 2 m = 3 m = 4 m = |𝜔(cl)|

PERTUPLE PERFB PERTUPLE PERFB PERTUPLE PERFB PERTUPLE PERFB

#Completed 546 557 604 616 566 589 597 615 … only by 5 16 1 13 2 25 8 26 … by both 541 603 564 589

  • Avg. CPU (sec)

538 227 521 362 472 314 669 458 SEARCHSUPPORT calls (109) 86.4 0.0 88.1 26.1 52.7 19.6 24.7 8.1 Call ratio

  • 3.37

2.69 3.06

Detailed Results

9/23/14 CP 2014 15

Number of instances tested: 853

slide-16
SLIDE 16

Constraint Systems Laboratory

Conclusions

  • Contributions

– Designed PERFB

  • to replace PERTUPLE of [Karakashian+ AAAI 10]
  • by extending the work of [Samaras & Stergiou JAIR 05]

– Empirically showed benefits of our approach

  • Future work

– Extend our approach to our other algorithm for enforcing R(∗,m)C [Karakashian PhD 13]

  • 9/23/14

CP 2014 16

slide-17
SLIDE 17

Constraint Systems Laboratory

Thank you for listening

Wake up the Chair!

  • 9/23/14

CP 2014 17

slide-18
SLIDE 18

Constraint Systems Laboratory

CSP: Graphical Representations

  • Hyper graph
  • Dual graph
  • Minimal dual graph

9/23/14 CP 2014 18

Hyper graph Minimal dual graph

[Janssen+,1989] R2 R1 A,B,C,D,G A,B,E A,B,F C,F B,E,G A,B A,B C A,B R3 R4 R5 B,E F B,G B

Dual graph

R2 R1 A,B,C,D,G A,B,E A,B,F C,F B,E,G A,B A,B C A,B R3 R4 R5 B,E F B,G B R3 B C D E A R5 R1 R4 F R2 G

slide-19
SLIDE 19

Constraint Systems Laboratory

Block Statistics

9/23/14 CP 2012 19

slide-20
SLIDE 20

Constraint Systems Laboratory

Block Statistics

9/23/14 CP 2014 20

slide-21
SLIDE 21

Constraint Systems Laboratory

Partitioning Relations -- Definitions

9/23/14 CP 2014 21

  • Scope
  • Subscope
  • Combination

R2 R1 A,B,C,D,G A,B,E A,B,F C,F B,E,G A,B A,B C A,B R3 R4 R5 B,E F B,G B

slide-22
SLIDE 22

Constraint Systems Laboratory

Coarse Partitions

9/23/14 CP 2014 22

R2 R1 A,B,C,D,G A,B,E A,B,F C,F B,E,G A,B A,B C A,B R3 R4 R5 B,E F B,G B

A B C D G

fb1 t1 0 0 0 0 0 t2 0 0 0 1 0 fb2 t3 0 0 1 0 0 fb3 t4 0 0 1 1 1 fb4 t5 0 1 1 0 1 t5 0 1 1 1 1 fb5 t7 1 1 1 1 1

R1 A B E

fb6 0 0 0 fb7 0 0 1 fb8 0 1 0 fb9 0 1 1 fb10 1 0 0 fb11 1 0 1

R2 A B F

fb12 0 0 0 fb13 0 0 1 fb14 0 1 1 fb15 1 1 0 fb16 1 1 1

R3

slide-23
SLIDE 23

Constraint Systems Laboratory

Fine Partitions

9/23/14 CP 2014 23

  • Equivalence class that induces smallest

set of tuples

R2 R1 A,B,C,D,G A,B,E A,B,F C,F B,E,G A,B A,B C A,B R3 R4 R5 B,E F B,G B

A B C D G

fb1 t1 0 0 0 0 0 t2 0 0 0 1 0 fb2 t3 0 0 1 0 0 fb3 t4 0 0 1 1 1 fb4 t5 0 1 1 0 1 t5 0 1 1 1 1 fb5 t7 1 1 1 1 1

R1 A B E

fb6 0 0 0 fb7 0 0 1 fb8 0 1 0 fb9 0 1 1 fb10 1 0 0 fb11 1 0 1

R2

slide-24
SLIDE 24

Constraint Systems Laboratory

A B C D G

fb1 t1 0 0 0 0 0 t2 0 0 0 1 0 fb2 t3 0 0 1 0 0 fb3 t4 0 0 1 1 1 fb4 t5 0 1 1 0 1 t5 0 1 1 1 1 fb5 t7 1 1 1 1 1

A B E

fb6 0 0 0 fb7 0 0 1 fb8 0 1 0 fb9 0 1 1 fb10 1 0 0 fb11 1 0 1

C F

fb20 0 0 fb21 0 1 fb22 1 0

R1 R2 R5

  • Consider a combination of size m=3 …

Intermediate Partitions

9/23/14 CP 2014 24

R2 R1 A,B,C,D,G A,B,E A,B,F C,F B,E,G A,B A,B C A,B R3 R4 R5 B,E F B,G B

slide-25
SLIDE 25

Constraint Systems Laboratory

Intermediate Partitions

9/23/14 CP 2014 25

A B C D G

fb1 t1 0 0 0 0 0 t2 0 0 0 1 0 fb2 t3 0 0 1 0 0 fb3 t4 0 0 1 1 1 fb4 t5 0 1 1 0 1 t5 0 1 1 1 1 fb5 t7 1 1 1 1 1

A B E

fb6 0 0 0 fb7 0 0 1 fb8 0 1 0 fb9 0 1 1 fb10 1 0 0 fb11 1 0 1

C F

fb20 0 0 fb21 0 1 fb22 1 0

R1 R5 R2

  • First, identify the subscopes that affect R1
slide-26
SLIDE 26

Constraint Systems Laboratory

Intermediate Partitions

9/23/14 CP 2014 26

A B C D G

ib1 fb1 t1 0 0 0 0 0 t2 0 0 0 1 0 ib2 fb2 t3 0 0 1 0 0 fb3 t4 0 0 1 1 1 ib3 fb4 t5 0 1 1 0 1 t5 0 1 1 1 1 ib4 fb5 t7 1 1 1 1 1

A B E

fb6 0 0 0 fb7 0 0 1 fb8 0 1 0 fb9 0 1 1 fb10 1 0 0 fb11 1 0 1

C F

fb20 0 0 fb21 0 1 fb22 1 0

R1 R5 R2

  • Project the union of those subscopes over

the relation