An optimal coarsegrained arc consistency algorithm Christian Bessiere
An optimal coarse-grained arc consistency algorithm Christian Bessiere, Jean-Charles Regin, Roland H. C Yap and Yuanlin Zhang Presented by Krishnam Raju Jampani
Overview Preliminaries AC-3 Algorithm AC-2001/3. 1 Algorithm Experimental Results Algorithms based on AC-2001/3. 1 – Path Consistency (PC-2001/3. 1) – Generalized Arc Consistency (GAC-2001/3. 1)
Preliminaries Finite Binary Constraint Network (N, D, C) – – N = (x 1, x 2, …, xn) D = (D 1, D 2, …, Dn) C = {cij : 1 <= i, j <= n, i != j} Assumption: (a, b) belongs to cij iff (b, a) belongs to cji. A solution is an assignment of a value to each variable such that all constraints in the network are satisfied.
Preliminaries (Contd…) The Support of a value a in Di under cij is a value b in Dj such that (a, b) belongs to cij. A constraint cij is consistent from xi to xj if every a in Di has a support in Dj. cij is arc consistent if it is consistent from “xi to xj” and “xj to xi” A constraint network is arc consistent if every constraint in the network is arc consistent. Two approaches for arc consistency – – Coarse-grained algorithms. Fine-grained algorithms.
Schema for coarse-grained arc consistency algorithms Algorithm AC-X begin Q = {(xi, xj) | cij or cji belongs to C, i != j } while Q not empty do select and delete any arc (xi, xj) from Q if REVISE-X(xi, xj) then Q = Q u {(xk, xi) | cki belongs to C, k != j} end
Procedure REVISE for AC-3 Procedure REVISE-3(xi, xj) begin DELETE = false for each a in Di do if there is no b in Dj such that cij(a, b) then delete a from Di DELETE = true return DELETE end
Scope for Improvement Run-time of AC-3 is O(ed 3). Let Di = Dj = [1… 11] and let Cij be xi = xj. Removal of 11 from Dj leads to a revision of (xi , xj). Cost of REVISE-3 is 1 + 2 + … + 10 = 65. Idea: – – – Instead of re-computing supports from scratch, we can use the previously computed supports to determine the new support. Use a data-structure Last ((xi, a), xj) to maintain the support of (xi, a) in xj. If Last((xi, a), xj) is no longer valid, look for support among its ‘successors’ in xj.
AC-2001/3. 1 Algorithm Procedure REVISE-2001/3. 1(xi, xj) DELETE = false for each a in Di do b = Last((xi, a), xj) if b doesn’t belong to Dj then b = succ(b, Dj) while (b != NULL) and (!cij(a, b)) do b = succ(b, Dj) if (b != NULL) then Last((xi, a), xj) = b else delete a from Di and set DELETE = true return DELETE
Performance of AC-2001/3. 1 Both AC-3 and AC-2001/3. 1 have the same initialization phase. Worst-Case time complexity of AC-2001/3. 1 is O(ed 2). – – Each arc (xi, xj) is revised at most d times. Time spent on each value a in Di with respect to (xi, xj) is O(d). Matches the complexity of AC-6 and is hence worst-case optimal. Space-complexity = O(ed).
Experimental results
DOMINO problem
Performance on the DOMINO problem
Path Consistency (PC 2001/3. 1) A network is path consistent if for any cij in C, any tuple (a, b) in cij and any variable k in N, there exists a value v in Dk such that the values a, b, and v satisfy the constraints among variables i, j, and k. Same idea behind AC 2001/3. 1 applies here. To find a new support for each (a, b) in cij with respect to variable k we use Last( (i, a), (j, b), k) to remember the previous support. Time complexity is O(n 3 d 3). Space complexity is O(n 3 d 2).
Generalized Arc Consistency (GAC 20001/3. 1) AC 2001/3. 1 can be extended to GAC 2001/3. 1 to deal with non-binary constraints. Now supports are tuples. Last ( (xi, a), cj) stores a tuple t of cj such that t[xi] = a. Removing a value from xi results in revisiting all the constraints involving xi. Time complexity is O(er 2 dr).
Conclusion First paper to obtain optimal coarse-grained arc consistency. Simple Technique. Easy to implement. AC 2001/3. 1 has performance comparable to fine grained algorithms like AC-6. Technique can be directly applied to path consistency and for non-binary constraints.
Questions?
- Slides: 16