Generalised arc consistency (GAC) is a constraint propagation technique used in CSPs.

First, some definitions:

  • Suppose a value in is not consistent wrt a constraint, i.e., there are no assignments to the other variables that satisfy the constraints when .
  • Then, is said to be arc inconsistent.
  • We can remove from the domain of as this value cannot lead to a solution.
  • A support for a value assignment in a constraint is an assignment to all of the other variables in st satisfies .

We say that a constraint is generalised arc consistent if and only if for every variable in its scope, every value has a support in . Then, we say CSP is GAC iff all of its constraints are GAC.

Pruning

The procedure is a little tricky. If we prune the domain of one variable to make a constraint GAC, we might make a different constraint non-GAC. Thus, we may need to re-achieve GAC for some constraints whenever a domain value is pruned. Thus, GAC is fairly time-intensive.

All constraints must be GAC at every node of the search space. This is accomplished by removing from the domains of the variables all arc inconsistent values. Each time we assign a value to a variable , we check all constraints over and prune arc inconsistent (i.e., if there’s no support) values from the current domain of the other variables of the constraints.

Since removing a value may trigger inconsistency, we have to repeat the procedure until everything is consistent. We maintain a queue of constraints that need to be made GAC. Constraints are added back to the queue if the domain of one of their variables is changed. The procedure stops when the queue is empty.

When all constraints are GAC, three outcomes are possible:

  • Each domain has a single value.
  • At least one domain is empty, i.e., it is unsatisfiable.
  • Some domains have more than one value. We then need to solve this new CSP, but this is usually a simpler problem to solve.

Analysis

If we have a problem with variables, binary constraints, and max size of a variable domain.

  • The maximum number of times we prune the domain of a variable is .
  • The number of constraints that will be put on the queue when pruning the domain of a variable is .
    • We define the degree of a variable as the number of constraints defined over the variable.
  • The sum of degrees of all variables is .
  • So the total number of constraints that will be placed on the queue is .
  • And to check the consistency of each constraint, we need .
  • So the overall time complexity is .

However, with higher-order constraints, the time complexity is dominated by the number of variables each constraint has to operate over. For scope of a constraint :

  • Checking consistency is given by .
  • So the overall complexity is .
    • Where is the number of inconsistent values for .