Download presentation

Presentation is loading. Please wait.

Published byGuadalupe Stapp Modified over 2 years ago

1
Foundations of Constraint Processing Lookahead Schemas 1 Foundations of Constraint Processing CSCE421/821, Spring 2011 www.cse.unl.edu/~choueiry/S11-421-821/ All questions to cse421@cse.unl.edu Berthe Y. Choueiry (Shu-we-ri) Avery Hall, Room 360 choueiry@cse.unl.edu Tel: +1(402)472-5444 Lookahead Schemas

2
Foundations of Constraint Processing Lookahead Schemas 2 Outline Looking ahead Schemas –Forward checking (FC) –Directional Arc Consistency (DAC) –Maintaining Arc Consistency (a.k.a. full arc- consistency)

3
Foundations of Constraint Processing Lookahead Schemas 3 Looking ahead Rationale: –As decisions are made (conditioning), Revise the domain of future variables to propagate the effects of decisions i.e., eliminate inconsistent choices in future sub-problem –Domain annihilation of a future variable avoids expansion of useless portions of the tree Techniques –Partial: forward-checking (FC), directional arc- consistency (DAC) –Full: Maintaining arc-consistency (MAC) –Use: Revise (V f, V c ), V f future variable, V c current variable

4
Foundations of Constraint Processing Lookahead Schemas 4 Revise the domain of V i Revising the domain of V i given a constraint C Vi,Vj on V i (i.e., V i Scope (C)) General notation: Revise (V i,C Vi,Vj ) In a binary CSP: Revise (V i,C Vi,Vj )= Revise (V i, V j )

5
Foundations of Constraint Processing Lookahead Schemas 5 Revise (V i, V j ) NOTE: only D Vi may be updated Revise (V i, V j ) 1.revised nil 2. x D Vi 3. found nil 4. y D Vj 5. If Check ((V i,x),(V j,y)) Then Begin 6. found t 7. Break 8. End 9. If found=nil Then Begin 10. revised t 11. D Vi D Vi \ {x} 12. End 13.Return (revised)

6
Foundations of Constraint Processing Lookahead Schemas 6 Revise (V i, V j ) 1.revised nil 2. x D vi 3. y D Vj 4. If Check ((V i,x),(V j,y)) Then Break () 5. revised t 6. D Vi D Vi \ {x} 7.Return (revised) Simpler, equivalent code but not as obvious as the previous one

7
Foundations of Constraint Processing Lookahead Schemas 7 Domain filtering in lookahead V c current variable V f future variable {V f } all future variables Revise (V f, V c ) FC (V c ): 1. V f {V f } connected to V c 2. Revise (V f,V c ) 3. If D Vf ={} then return(nil)

8
Foundations of Constraint Processing Lookahead Schemas Directional Arc Consistency Choose an ordering d, stick to it After instantiating a variable at level i, do the following 1.For k from i to (n-1) in the ordering d Do 2. If FC (V k )=nil then Return (nil) 8

9
Foundations of Constraint Processing Lookahead Schemas Maintaining Arc Consistency First, FC (V c ), If it does not fail, then, form a queue with all constraints (V i,V j ) and (V j,V i ) between future variables, and run AC AC-1 1.Q {(V i,V j ),(V j,V i ), …, (V k,V m ), (V m,V K )} 2.Change true 3.While Change Do 4. Change false 5. For all (V a,V b ) in Q Do 6. If Revise (V a,V b ) 7. Then If Dom (V a ) = 8. Then Return (nil) 9. Else Change true 9

10
Foundations of Constraint Processing Lookahead Schemas 10 FC: DAC: –assumes a fixed variable ordering d MAC: –does more pruning (search may visit fewer nodes) at the cost of more consistency checks Look-ahead techniques: FC, DAC, MAC FC (V c ); While not failure: For the next V f in the ordering d, FC (V f ) FC (V c ); AC ({V f }) FC (V c ) FC (V c ); Repeat until quiescence or failure V f1,V f2 {V f }, Revise (V f1,V f2 )

11
Foundations of Constraint Processing Lookahead Schemas 11 Terminology overload alert: FC FC is used to denote any of the following: –a partial look-ahead schema –a specific chronological backtrack search algorithm that uses the partial look-ahead schema Meaning is inferred from context Not a healthy situation, but a fact of reality Advice: state upfront the meaning of your terms and stick to them throughout your paper

12
Foundations of Constraint Processing Lookahead Schemas 12 (BT Search +) MAC vs. FC Reference: [Sabin & Freuder, ECAI94], [Bessière & Régin, CP97], [Sabin & Freuder, CP97], [Gent & Prosser, APES-20-2000], [Experiments by Lin XU, 2001], [Yang, MS thesis 2003] Results: (sketchy) Low tightnessHigh tightness Low density (sparse) FCMAC High density (dense) FC Note: Results depend on Variable ordering (static vs. dynamic) Problem difficulty (positive relative to crossover point)

Similar presentations

OK

Foundations of Constraint Processing Temporal Constraints Networks 1Topic Foundations of Constraint Processing CSCE421/821, Spring 2011 www.cse.unl.edu/~cse421.

Foundations of Constraint Processing Temporal Constraints Networks 1Topic Foundations of Constraint Processing CSCE421/821, Spring 2011 www.cse.unl.edu/~cse421.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on forests in india Ppt on public private partnership in india Ppt on importance of science and technology Ppt on law against child marriage in islam Ppt on global warming for class 9 free download Ppt on object oriented technologies Ppt on properties of different quadrilaterals Ppt on natural disasters in hindi Ppt on different layers of atmosphere Ppt on energy giving food for kids