Download presentation

Presentation is loading. Please wait.

Published byEmanuel Postle Modified about 1 year ago

1
DIRECTIONAL ARC-CONSISTENCY ANIMATION Fernando Miranda 5986/M

2
DIRECTIONAL ARC-CONSISTENCY (DAC) ALGORITHM This presentation animates the directional arc- consistency algorithm using the coloring graph problem as an example. For a better comprehension it is also presented here the arc-consistency algorithm between two variables also called here as revise.

3
DIRECTIONAL ARC-CONSISTENCY (DAC) ALGORITHM procedure DAC( ) input: a network =(X,D,C), its constraint graph G, and an ordering d = (x1, …, xn). output: a directional arc-consistent network for i = n to 1 by -1 do for each j < i such that Rij Dj ← Dj ∩ j(Rij Di), this is revise((xj), xi)) endfor end procedure procedure REVISE((x1), x2) input: a subnetwork defined by two variables X = {xi, xj}, a distinguished variable xi, domains Di and Dj, and constraint Rij output: Di, such that xi is arc-consistency relative to xj. for each ai Di if there is no aj Dj such that (ai, aj) Rij then delete ai from Di endif endfor end procedure

4
x1 First, it's explained how REVISE algorithm works. There are two variables x1 and x2 with their domain D1 and D2. D1 = {,,, } D2 = {,, } There is a constraint between x1 and x2. R12 = {equal} x2 Final domain: D1 = {, } D2 = {,, } x1 is arc-consistency relative to x2 = One or more equal: stays No equal: removes

5
COLORING GRAPH PROBLEM x1 x2 x6x4x5 x3 x7

6
x5 x1x3x2x7x6x4 Now, the variables of the network are put in the order d with all it’s relations. In this case it was chosen the order d = {x4, x5, x6, x7, x2, x3, x1} From x1 to x3 and x2 From x3 to x6 and x7 From x2 to x4 and x5

7
Finally, the DAC algorithm is applied to the variables in the reverse order: x1 to x3 and revise((x3), x1) X1 to x2 and revise((x2), x1) X3 to x7 and revise((x7), x3) X3 to x6 and revise((x6), x3) X2 to x5 and revise((x5), x2) X2 to x4 and revise((x4), x2) x5 x1x3x2x7x6x4 x1 x2 x6x4x5 x3 x7 A directional arc-consistency network and luckily a solution!

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google