Skip to main content
Log in

Backtracking with multi-level dynamic search rearrangement

  • Published:
Acta Informatica Aims and scope Submit manuscript

Summary

The order in which the variables are tested in a backtrack program can have a major effect on its running time. The best search order usually varies among the branches of the backtrack tree, so the number of possible search orders can be astronomical. We present an algorithm that chooses a search order dynamically by investigating all possibilities for k levels below the current level, extending beyond k levels wherever possible by setting the variables that have unique forced values. The algorithm takes time O(n k+1) to process a node. For k=2 and binary variables the analysis for selecting the next variable to introduce into the backtrack tree makes complete use of the information contained in the two-level investigations. For larger k or variables of higher degree there is no polynomial-time algorithm that makes complete use of the k-level investigations to limit searching (unless P=NP). The search rearrangement algorithm is closely related to constraint propagation. Experimental studies on conjunctive normal form predicates confirm that 1-level search rearrangement saves a great deal of time compared to 0-level (ordinary backtracking), and show that 2-level saves time over 1-level on large problems. For such problems with 256 variables 2-level is better than 1-level by a factor of two.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Knuth, D.E.: Estimating the efficiency of backtrack programs. Math. Comp. 29, 121–136 (1975)

    Google Scholar 

  2. Bitner, J.R., Reingold, E.M.: Backtrack programming techniques. CACM 18, 651–655 (1975)

    Google Scholar 

  3. Knuth, D.E.: Mathematics and computer science: Coping with finiteness. Science 194, 1235–1242 (1976)

    Google Scholar 

  4. Tompkins, C: Machine attacks on problems whose variables are permutations. Proc. Symp. Appl. Math. 6. Amer. Math. Soc. 195 (1956) Paige, L.J., Tompkins, C.: The size of the 10×10 latin square problem, ibid 10, 71 (1960)

  5. Parker, E.T.: Computer investigations of orthogonal latin squares of order ten. Proc. Symp. Appl. Math. 15. Amer. Math. Soc. 73 (1963)

  6. Waltz, D.: Understanding line drawings of scenes with shadows. In: The psychology of computer vision. (P.H. Winston, ed.). New York: McGraw-Hill 1975

    Google Scholar 

  7. Cook, S.A.: The complexity of theorem-proving procedures. Third Annual ACM Symposium on Theory of Computing (1971), pp. 151–158

  8. Purdom, P.: Tree size by partial backtracking. SIAM J. Comp. 7, 481–491 (1978)

    Google Scholar 

  9. Davis, M., Putnam, H.: A computational procedure for quantification theory. JACM 7, 201–215 (1960)

    Google Scholar 

  10. Schaefer, J.: The complexity of the satisfiability problem. Tenth Annual ACM Symposium on Theory of Computing, 216–226 (1978)

  11. Johnson, D.S.: Approximation algorithms for combinatorial problems. J. Comput. Systems Sci. 9, 256–278 (1974)

    Google Scholar 

  12. Zobrist, A.L.: A hashing method with application to game playing. Tech. Report 88, Computer Sci.. Dept., U. of Wisconsin, Madison, Wis. (1970)

    Google Scholar 

  13. Brown, C.A., Purdom, Jr., P.W.: An average time analysis of backtracking. To appear in SIAM J. Comp.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Purdom, P.W., Brown, C.A. & Robertson, E.L. Backtracking with multi-level dynamic search rearrangement. Acta Informatica 15, 99–113 (1981). https://doi.org/10.1007/BF00288958

Download citation

  • Received:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00288958

Keywords

Navigation