Search in Artificial Intelligence pp 287-342 | Cite as

# Tree Search and ARC Consistency in Constraint Satisfaction Algorithms

## Abstract

Constraint satisfaction problems are ubiquitous in Artificial Intelligence and many algorithms have been developed for their solution. This paper provides a unified introduction to some of these algorithms, including Backtracking, Haralick’s Forward Checking, Partial Lookahead and Full Lookahead, and three based on the arc-consistency algorithms that Mackworth has called AC1, AC2 and AC3. It is shown that these can all be unified as having the common structure of tree search (TS) augmented with arc-consistency algorithms (AC) of various extent. Haralick’s algorithms, and even traditional Backtracking, are seen to contain a partial-arc-consistency component. In analogy to Mackworth’s nomenclature these are named AC1/5, AC1/4, AC1/3 and AC1/2 — the fractional suffix being more or less proportional to the degree of arc-consistency attained. The algorithms may then be unified as being of the form TS + AC*i* _{1} or TS + AC*i* _{1} + AC*i* _{2}, for various fractional and integer *i* _{1} and *i* _{2}. A combined algorithm based on this structure is presented and algorithm efficiencies are compared empirically, using the *n*-queens problem and a new version called confused *n*-queens. We find that it may very well pay to trade more tree search for a reduction in arc consistency — that is, to allow a larger search tree (in terms of nodes), as a result of less arc consistency at the nodes, in order that the overall effort (in terms of constraint checks) be reduced.

## Keywords

Tree Search Constraint Satisfaction Constraint Satisfaction Problem Combine Algorithm Constraint Check## Preview

Unable to display preview. Download preview PDF.

## References

- [1]Bitner J. R. and Reingold E., “Backtrack programming techniques”
*Communications ACM*, vol. 18, 1975, pp. 651–656.MATHCrossRefGoogle Scholar - [2]Davis L. S. and Rosenfeld A., “Cooperating processes for low-level vision: a survey”,
*Artificial Intelligence (Special Issue on Computer Vision)*, vol. 17, 1981, pp. 245–263.Google Scholar - [3]Dechter A. and Dechter R., “Minimal constraint graphs”,
*Proc. Nat. Conf. on Artificial Intelligence (AAAI)*, Seattle, Washington, August 1987.Google Scholar - [4]Dechter R. and Pearl J., “Network-based heuristics for constraint-satisfaction problems”, To appear in
*Artificial Intelligence*, 1988. Also in*Search in Artificial Intelligence*, Eds. L. Kanal and V. Kumar, Springer-Verlag, 1988.Google Scholar - [5]Dechter R., “A constraint-network approach to truth-maintenance”, Tech. Report R-870009, Cognitive Systems Lab., Computer Science Dept., U.C.L.A., Los Angeles, February 1987.Google Scholar
- [6]DeKleer J., “An assumption-based TMS”,
*Artificial Intelligence*, vol. 28, 1986, pp. 127–162.CrossRefGoogle Scholar - [7]Doyle J., “A truth maintenance system”,
*Artificial Intelligence*, vol. 12, 1979, pp. 231–272.MathSciNetCrossRefGoogle Scholar - [8]Eastman C., “Preliminary report on a system for general space planning”
*Communications ACM*, vol. 15, 1972, pp. 76–87.CrossRefGoogle Scholar - [9]Fikes R. E., “REF-ARF: A system for solving problems stated as procedures”,
*Artificial Intelligence*, Vol. 1, 1970, pp. 27–120.MATHCrossRefGoogle Scholar - [10]Fowler G., Haralick R., Gray F. G., Feustel C. and Grinstead C., “Efficient graph automorphism by vertex partitioning”,
*Artificial Intelligence (special issue on search and heuristics)*, vol. 21, nos. 1 and 2, March 1983, pp. 245–269. Also in book:*Search and Heuristics*, North-Holland, Amsterdam, 1983.Google Scholar - [11]Freuder E. C., “Synthesizing constraint expressions”,
*Comm. ACM*, vol. 21, 1978, pp. 958–966.MathSciNetMATHCrossRefGoogle Scholar - [12]Freuder E. C., “A sufficient condition for backtrack-free search”,
*J. ACM*, vol. 29, no. 1, 1982, pp. 24–32.MathSciNetMATHCrossRefGoogle Scholar - [13]Freuder E. C. and Quinn M. J., “Parallelism in an algorithm that takes advantage of stable sets of variables to solve constraint satisfaction problems”, Tech. Report 85–21, Dept. Computer Science, U. New Hampshire, Durham, New Hampshire, 1985.Google Scholar
- [14]Gaschnig J., “A constraint satisfaction method for inference making”,
*Proc. 12-th Annual Allerton Conf. on Circuit System Theory*,U. Illinois, 1974, pp. 866–874.Google Scholar - [15]Gaschnig J., “A general Backtracking algorithm that eliminates most redundant tests”,
*Proc. 5-th Int. Joint Conf. on Artificial Intelligence*, M.I.T., Cambridge, Mass., August, 1977.Google Scholar - [16]Gaschnig J., “Experimental case studies of Backtrack vs. Waltz-type vs. new algorithms for satisficing assignment problems”,
*Proc. 2-nd Biennial Conf. Canadian Society for Computational Study of Intelligence*, Toronto, Ont., July 1978.Google Scholar - [17]Gaschnig J.,
*Performance Measurement and Analysis of Certain Search Algorothms*, Dept. Computer Science, Carnegie-Mellon University, May 1979. Ph. D. dissertation.Google Scholar - [18]Golomb S. W. and Baumert L. D., “Backtrack programming”,
*J. ACM*, vol. 12, 1965, pp. 516–524.MathSciNetMATHCrossRefGoogle Scholar - [19]Haralick R. M., Davis L. S. and Rosenfeld A., “Reduction Operations for Constraint Satisfaction”,
*Information Sciences*, Vol. 14, 1978, pp. 199–219.MathSciNetMATHCrossRefGoogle Scholar - [20]Haralick R. M. and Shapiro L. G., “The consistent labeling problem: part I”,
*I.E.E.E. Trans. Pattern Analysis and Machine Intelligence*vol. PAMI-1, no. 2, 1979, pp. 173–184.Google Scholar - [21]Haralick R. M. and Elliot G. L., “Increasing tree search efficiency for constraint satisfaction problems”,
*Artificial Intelligence*, vol. 14, 1980, pp. 263–313.CrossRefGoogle Scholar - [22]Horowitz E. and Sahni S., “Fundamentals of Computer Algorithms”,
*Computer Science Press Inc.*, Maryland, 1978.Google Scholar - [23]Kasif S., “On parallel complexity of some constraint satisfaction problems”,
*Proc. Fifth Nat. Conf. on Artificial Intelligence (AAAI)*, Philadelphia, Pennsylvania, August 1986.Google Scholar - [24]Mackworth A. K., “Consistency in networks of relations”,
*Artificial Intelligence*, vol. 8, 1977, pp. 99–118.MATHCrossRefGoogle Scholar - [25]Mackworth A. K., “On reading sketch maps”,
*Proc. 5-th Int. Joint Conf. on Artificial Intelligence*, M.I.T., Cambridge, Mass., August 1977, pp. 598–606.Google Scholar - [26]Mackworth A. K. and Freuder E. C., “The complexity of some polynomial network consistency algorithms for constraint satisfaction problems”,
*Artificial Intelligence*, vol. 25, 1985, pp. 65–74.CrossRefGoogle Scholar - [27]McCall J. T., Tront J. G., Gray F. G., Haralick R. M. and McCormack W. M., “Parallel computer architectures and problem solving strategies for the consistent labeling problem”,
*I.E.E.E. Trans. Computers*, vol. C-34, no. 11, 1985, pp. 973–980.CrossRefGoogle Scholar - [28]McGregor J., “Relational consistency algorithms and their application in finding subgraph and graph isomorphisms”,
*Information Sciences*, vol. 19, 1979, pp. 229–250.MathSciNetMATHCrossRefGoogle Scholar - [29]Mohr R. and Henderson T. C., “Arc and path consistency revisited”,
*Artificial Intelligence*, vol. 28, 1986, pp. 225–233.CrossRefGoogle Scholar - [30]Montanari U., “Networks of constraints: Fundamental properties and applications to picture processing”,
*Information Sciences*, vol. 7, 1974, pp. 95–132.MathSciNetCrossRefGoogle Scholar - [31]Nadel B. A.,
*The Consistent Labeling Problem and its Algorithms: Towards Exact-Case Complexities and Theory-Based Heuristics*, Computer Science Dept., Rutgers University, New Brunswick, N. J., May 1986, Ph. D. dissertation.Google Scholar - [32]Nadel B. A., “Representation selection for constraint satisfaction problems: a case study using n-queens”, to appear in
*IEEE Expert*, February, 1988. Also in technical reports CRL-TR-2–87, Dept. Elec. Eng. and Computer Science, U. Michigan, Ann Arbor, Michigan, and DCS-TR-208, Dept. Computer Science, Rutgers U., New Brunswick, New Jersey. February 1987.Google Scholar - [33]Nudel B. A., “Consistent labeling problems and their algorithms”,
*Proc. Nat. Conf. on Artificial Intelligence (AAAI)*, Pittsburg, PA, August 1982, pp. 128–132.Google Scholar - [34]Nudel B. A., “Consistent-labeling problems and their algorithms: expected-complexities and theory-based heuristics”,
*Artificial Intelligence (special issue on search and heuristics)*, vol. 21, nos. 1 and 2, March 1983, pp. 135–178. Also in book: Search and Heuristics, North-Holland, Amsterdam, 1983.Google Scholar - [35]Nudel B. A., “Solving the general consistent labeling (or constraint satisfaction) problem: Two algorithms and their expected complexities”,
*Proc. Nat. Conf. on Artificial Intelligence (AAAI)*, Washington D.C., August 1983, pp. 292–296.Google Scholar - [36]Purdom P. W. Jr. and Brown C., “An average time analysis of backtracking”,
*SIAM J. Comput.*,vol. 10, no. 3, 1981, pp. 583–593.MathSciNetMATHCrossRefGoogle Scholar - [37]Purdom P. W. Jr., “Evaluating search methods analytically”,
*Proc. Nat. Conf. on Artificial Intelligence (AAAI)*, Pittsburg, PA, August 1982, pp. 124–127.Google Scholar - [38]Purdom P. W. Jr., “Search rearrangement backtracking and polynomial average time”,
*Artificial Intelligence (special issue on Search and Heuristics)*, vol. 21, nos. 1 and 2, March 1983, pp. 117–133.Google Scholar - [39]Rit J., “Propogating temporal constraints for scheduling”,
*Proc. Fifth Nat. Conf on Artificial Intelligence (AAAI)*, Philadelphia, Pennsylvania, August 1986.Google Scholar - [40]Rosenfeld A., “Networks of automata: Some applications”,
*I.E.E.E. Trans. Systems*,*Man and Cybernetics*,SMC-5, 1975, pp. 380–383.Google Scholar - [41]Rosenfeld A., Hummel R. A. and Zucker S. W., “Scene labeling by relaxation operations”,
*I.E.E.E. Trans. Systems, Man and Cybernetics*, SMC-6, no. 6, 1976, pp. 420–433.MathSciNetMATHCrossRefGoogle Scholar - [42]Stefik M., “Planning with constraints (MOLGEN: Part I)”
*Artificial Intelligence*,*vol*. 16, 1981, pp. 111–140.CrossRefGoogle Scholar - [43]Tsang P., “The consistent labeling problem in temporal reasoning”, Proc. Sixth Nat. Conf. on Artificial Intelligence (AAAI), Seattle, Washington, August 1987.Google Scholar
- [44]Ullman J. R.,
*Pattern Recognition Techniques*, Crane Russak, New York, 1973, p. 198.Google Scholar - [45]Ullman J. R., “An algorithm for subgraph isomorphism”,
*J. ACM*,*vol.*23, 1976, pp. 31–42.MATHCrossRefGoogle Scholar - [46]Walker R. J., “An enumerative technique for a class of combinatorial problems”
*Combinatorial Analysis (Proc. Symp. Applied Math., vol. X)*, American Mathematical Society, Providence, R. I., 1960.Google Scholar - [47]Waltz D., “Understanding line drawings of scenes with shadows”, in
*The Psychology of Computer Vision*, Winston P. H., Ed. McGraw-Hill, New York, 1975. Originally in technical report AITR-271, Artificial Intelligence Lab., M.I.T., Cambridge, Mass., August 1972.Google Scholar