1 / 7

DIRECTIONAL ARC-CONSISTENCY ANIMATION

Fernando Miranda 5986/M (miras1@mail.telepac.pt). DIRECTIONAL ARC-CONSISTENCY ANIMATION. DIRECTIONAL ARC-CONSISTENCY (DAC) ALGORITHM.

onan
Télécharger la présentation

DIRECTIONAL ARC-CONSISTENCY ANIMATION

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Fernando Miranda 5986/M (miras1@mail.telepac.pt) DIRECTIONAL ARC-CONSISTENCYANIMATION

  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 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 procedureDAC() 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 endfor end procedure

  4. x1 x2 Final domain: D1 = { , } D2 = { , , } 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} = x1 is arc-consistency relative to x2 One or more equal: stays No equal: removes

  5. COLORING GRAPH PROBLEM x1   x3 x2     x4 x5 x6 x7

  6. x1 x4 x5 x3 x6 x2 x7 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. x1   x3 x2     x1 x4 x5 x4 x5 x6 x7 x3 x6 x2 x7 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) A directional arc-consistency network and luckily a solution!

More Related