Arc consistency (slides5) Flashcards

1
Q

arc consistency

A

simplest form of propagation makes each arc consistent
X–>Y is consistent iff
-for every value x of X there is some allowed y
-If X loses a value, neighbors of X need to be rechecked

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

arc consistency properties

A

detects failure earlier than forward checking

can be run as a preprocessor or after each assignment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Generalized Arc Consistency (GAC)

A

implementation of Arc Consistency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

GACSupport

A

does a value v for variable X have support in constraint c?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

IsItGAC

A

does GACSupport answer yes for every value in the domain of each variable of a constraint c?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

NoGACWipeout

A

are there non empty subsets of the domains of the variables such that IsItGAC answer yes?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

MaxGAC

A

will IsItGAC answer yes for the domains of the variables and no for every superset of the domains

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

GACDomain

A

return the domains of the variables such that MaxGAC will answer yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

arc consistency algorithm

A

receives a binary CSP as input and returns the CSP possibly with reduced domains

main function is AC-3
calls RM-Inconsistent -Values function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

function AC-3

A
function AC-3(csp) returns the CSP , possibly with reduced domains
inputs: csp, a binary CSP with variables {X1,X2,...,Xn}
local variables: queue: a queue of arcs, initially all the arcs in csp

while queue is not empty do

  • (Xi,Xj)<–Remove-First(queue)
  • if RM-Inconsistent-Values(Xi,Xj) then
  • -for each Xk in Neighbors[Xi] do
  • –add(Xk,Xi) to queue
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

function RM-Inconsistent-Values

A
function RM-Inconsistent-Values(Xi,Xj) returns true iff remove a value
removed<--true
return removed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

complexity of AC-3

A
for binary constraint networks
Time: O(ed^3) and O(n^2d^3) since e=O(n^2)
-n = number of variables
-e = number of constraints
-d = domain size

Space: O(e): the queue contains at most e elements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Directional arc Consistency (DAC)

A

observation 1: arc revisions have a directional character but CSP is not directional

obs2: AC has to repeat arc revisions; the total number of revisions depends on the number of arcs but also on the size of domains

Definition: A binary CSP is directional arc consistent using a given order of variables iff for every constraint c(Xi,Xj) such that Xi<Xj the (Xi,Xj) is arc consistent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Algorithm DAC-1

A

1) Consistency of the constraint is required just in one direction
2) Variables are ordered

if the arc are explored in a “good” order, no revision has to be repeated!

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

how to use DAC setup

A

-AC is stronger than DAC(if CSP is AC then it is DAC as Well)
-is it useful?
–DAC-1 is much faster than any algorithm for AC
–there exist problems where DAC is enough
Example: if the constraint graph forms a tree then DAC is enough to solve the problem without backtracks
-how to order the vertices for DAC?
-How to order the vertices for search?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How to use DAC

A

1) apply DAC in the order from the leaf nodes to the root
2) Label vertices starting from the root

DAC guarantees that there is a value for the child node compatible with all the ancestors

17
Q

problems with arc consistency

A

we dont get a solution from using it

we dont know if a solution exists from using it

18
Q

benefits of arc consistency

A

-Many incompatible values can be removed
-sometimes we have a solution after AC
–a domain is empty–> no solution exists
–all the domains are singleton–> we have a solution
in general, AC prunes the search space –> equivalent easier problem