com compsci sci 275
play

Com CompSci Sci 275, 75, C ONSTRAI ONSTRAINT Netw Network orks - PowerPoint PPT Presentation

Com CompSci Sci 275, 75, C ONSTRAI ONSTRAINT Netw Network orks Rina Dechter, Fall 2020 Directional consistency Chapter 4 Fall 2020 1 Outline Arc consistency algorithms Path consistency and i consistency Arc


  1. Com CompSci Sci 275, 75, C ONSTRAI ONSTRAINT Netw Network orks Rina Dechter, Fall 2020 Directional consistency Chapter 4 Fall 2020 1

  2. Outline • Arc ‐ consistency algorithms • Path ‐ consistency and i ‐ consistency • Arc ‐ consistency, Generalized arc ‐ consistency, relation arc ‐ consistency • Global and bound consistency • Consistency operators: join, resolution, Gausian elimination • Distributed (generalized) arc ‐ consistency Fall 2020 2

  3. Boolean constraint propagation • (A V � B) and (B) • B is arc ‐ consistent relative to A but not vice ‐ versa • Arc ‐ consistency by resolution: res((A V � B),B) = A Given also (B V C), path ‐ consistency: res((A V B),(B V C) = (A V C) Relational arc ‐ consistency rule = unit ‐ resolution        A B G , G , A B Fall 2020 3

  4. Boolean constraint propagation Fall 2020 4

  5. Consistency for numeric constraints (Gausian elimination)   x [ 1 , 10 ], y [ 5 , 15 ],   x y 10     arc consistenc y x [ 1 , 5 ], y [ 5 , 9 ]        by adding x y 10 , y 5 Gausian elimination of   z [ 10 , 10 ],   y z 3     path consistenc y x z 7         obtained by adding , x y 10 , y z 3 Gausian Elinination of: Fall 2020 7

  6. Impact on graphs of i ‐ consistency Fall 2020 8

  7. Tr Tractable classes classes • Examples of Horn theories (each clause has at most one positive literal) • ( � A, � B , � C, D), ( � D, F), �� A) Fall 2020 9

  8. Outline • Directional Arc ‐ consistency algorithms • Directional Path ‐ consistency and directional i ‐ consistency • Greedy algorithms for induced ‐ width • Width and local consistency • Adaptive ‐ consistency and bucket ‐ elimination Fall 2020 10

  9. Backtrack ‐ free search: or What level of consistency will guarantee global ‐ consistency Let’s explore how we can make a problem backtrack ‐ free with a minimal amount of effort Backtrack free and queries: Consistency, All solutions Counting optimization Fall 2020 11

  10. Directional arc ‐ consistency: another restriction on propagation D4={white,blue,black} D3={red,white,blue} D2={green,white,black} D1={red,white,black} X1=x2, x1=x3, x3=x4 Fall 2020 12

  11. Algorithm for directional arc ‐ consistency (DAC) • Complexity : 2 O ( ek ) Fall 2020 13

  12. Directional arc ‐ consistency may not be enough  Directional path ‐ consistency Not equal constraints Is it arc ‐ consistent? Fall 2020 15

  13. Algorithm directional path consistency (DPC) Fall 2020 17

  14. Example of DPC • d=A,B,C,D,E R_CB = { (1,3)(2,3)} R_DB = {((1,1)(2,2)} { 1 , 2 } E   R_DC = {(1,1)(2,2)(1,3)(2,3)} { 1 , 2 , 3 } { 1 , 2 } D C    B A  { 1 , 2 } { 1 , 2 } Fall 2020 18

  15. Directional i ‐ consistency Fall 2020 19

  16. The induced ‐ width DPC recursively connects parents in the ordered graph, yielding Induced ‐ ordered graph: • Width along ordering d , w(d): E • max # of previous parents D C • Induced width w*(d): • The width in the ordered B A induced graph: recursively connecting the parents from last to first • Induced ‐ width w*: • Smallest induced ‐ width over all orderings • Finding w* • NP ‐ complete (Arnborg, 1985) but greedy heuristics (min ‐ fill). Fall 2020 21

  17. Induced ‐ width (continued) Fall 2020 22

  18. Induced ‐ width and DPC • The induced graph of (G,d) is denoted (G*,d) • The induced graph (G*,d) contains the graph generated by DPC along d, and the graph generated by directional i ‐ consistency along d. Fall 2020 23

  19. Refined complexity using induced ‐ width • Consequently we wish to have ordering with minimal induced ‐ width • Induced ‐ width is equal to tree ‐ width to be defined later. • Finding min induced ‐ width ordering is NP ‐ complete Fall 2020 24

  20. Outline • Directional Arc ‐ consistency algorithms • Directional Path ‐ consistency and directional i ‐ consistency • Greedy algorithms for induced ‐ width • Width and local consistency • Adaptive ‐ consistency and bucket ‐ elimination Fall 2020 25

  21. How to find a good induced ‐ width greedily  * w ( d ) the induced width of the primal graph along ordering d The effect of the ordering: A E B D C C B C D B E A D E A Primal (moraal) graph   * * w ( d ) 4 w ( d ) 2 1 2 slides4 COMPSCI 2020

  22. Greedy algorithms for induced ‐ width • Min ‐ width ordering • Min ‐ induced ‐ width ordering • Max ‐ cardinality ordering A • Min ‐ fill ordering • Chordal graphs B C D E Primal (moraal) graph Fall 2020 27

  23. Min ‐ induced ‐ width Fall 2020 28

  24. Min ‐ width ordering Fall 2020 29

  25. Min ‐ fill algorithm • Prefers a node who adds the least number of fill ‐ in arcs. • Empirically, fill ‐ in is the best among the greedy algorithms (MW,MIW,MF,MC) Fall 2020 30

  26. Chordal graphs and max ‐ cardinality ordering • A graph is chordal if every cycle of length at least 4 has a chord • Finding w* over chordal graph is easy using the max ‐ cardinality ordering • If G* is an induced graph it is chordal • K ‐ trees are special chordal graphs. • Finding the max ‐ clique in chordal graphs is easy (just enumerate all cliques in a max ‐ cardinality ordering Fall 2020 31

  27. Max ‐ cardinality ordering Figure 4.5 The max-cardinality (MC) ordering procedure. Fall 2020 32

  28. Example We see again that G in Figure 4.1(a) is not chordal since the parents of A are not connected in the max ‐ cardinality ordering in Figure 4.1(d). If we connect B and C , the resulting induced graph is chordal. Fall 2020 33

  29. Outline • Directional Arc ‐ consistency algorithms • Directional Path ‐ consistency and directional i ‐ consistency • Greedy algorithms for induced ‐ width • Width and local consistency • Adaptive ‐ consistency and bucket ‐ elimination Fall 2020 34

  30. Width vs local consistency: solving trees Fall 2020 35

  31. Tree ‐ solving 2 complexity : O ( nk ) Fall 2020 36

  32. Width ‐ 2 and DPC Fall 2020 37

  33. Width vs directional consistency (Freuder 82) Fall 2020 38

  34. Width vs i ‐ consistency • DAC and width ‐ 1 • DPC and width ‐ 2 • � and width ‐ (i ‐ 1) •  backtrack ‐ free representation • If a problem has width 2, will DPC make it backtrack ‐ free? • Adaptive ‐ consistency : applies i ‐ consistency when i is adapted to the number of parents Fall 2020 39

  35. Adaptive ‐ consistency Fall 2020 40

  36. Bucket elimination Adaptive Consistency (Dechter & Pearl, 1987) =  = Bucket E: E  D, E  C Bucket D: D  A D = C Bucket C: C  B A  C Bucket B: B  A B = A Bucket A: contradiction Fall 2020 41

  37. Adaptive ‐ consistency , bucket ‐ elimination Fall 2020 42

  38. Bucket elimination Adaptive Consistency (Dechter & Pearl, 1987) E    Bucket ( E ) : E D, E C, E B D { 1 , 2 }  Bucket ( D ) : D A E || R DCB   C  Bucket ( C ) : C B || R ACB { 1 , 2 , 3 } { 1 , 2 }  Bucket ( B ) : B A D C || R AB B    Bucket ( A ) : R A A B A    Bucket ( A ) : A D, A B A { 1 , 2 } { 1 , 2 }  Bucket ( D ) : D E || R DB D   Bucket ( C ) : C B , C E || R D R C  Bucket ( B ) : B E BE , C BE Bucket ( E ) : || R E B  * Time : O(n exp(w (d) 1)) , E * space : O(n exp(w (d))) * w (d) - induced - width - along - ordering - d Fall 2020 43

  39. The Idea of elimination eliminating E C R DBC D 3 value assignment B   R R R R DBC ED EB EC DBC  Eliminate variable E join and project Fall 2020 44

  40. Variable elimination Eliminate variables one by one: “constraint propagation” Solution generation 3 after elimination is backtrack-free Fall 2020 45

  41. Back to Induced width • Finding minimum ‐ w* ordering is NP ‐ complete (Arnborg, 1985) • Greedy ordering heuristics: min ‐ width, min ‐ degree, max ‐ cardinality (Bertele and Briochi, 1972; Freuder 1982), Min ‐ fill. Fall 2020 46

  42. Solving Trees (Mackworth and Freuder, 1985) Adaptive consistency is linear for trees and equivalent to enforcing directional arc-consistency (recording only unary constraints) Fall 2020 47

  43. Relational consistency ( Chapter 8 ) • Relational arc ‐ consistency • Relational path ‐ consistency • Relational m ‐ consistency • Relational consistency for Boolean and linear constraints: • Unit ‐ resolution is relational ‐ arc ‐ consistency • Pair ‐ wise resolution is relational path ‐ consistency Fall 2020 48

  44. Outline • Directional Arc ‐ consistency algorithms • Directional Path ‐ consistency and directional i ‐ consistency • Greedy algorithms for induced ‐ width • Width and local consistency • Adaptive ‐ consistency and bucket ‐ elimination Fall 2020 49

  45. Sudoku’s propagation • http://www.websudoku.com/ • What kind of propagation we do? Fall 2020 50

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend