skip to main content
article

Las Vegas does n-queens

Published:01 June 2006Publication History
Skip Abstract Section

Abstract

This paper presents two Las Vegas algorithms to generate single solutions to the n-queens problem. One algorithm generates and improves on random permutation vectors until it achieves one that is a successful solution, while the other algorithm randomly positions queens within each row in positions not under attack from above.

References

  1. E. J. Hoffman, J. C. Loessi and R. C. Moore, "Constructions for the Solution of the m Queens Problem", Mathematics Magazine, Vol. 42, No. 2 (Mar. 1969), p. 66--72. The construction is that of A. M. Yaglom and I. M. Yaglom, Neelementarnye Zadachi v Elementarnom Izlozhenii (Moscow, 1954), translated by James McCawley, Jr., revised and edited by Basil Gordon, Challenging Mathematical Problems with Elementary Solutions: Volume I, Combinatorial Analysis and Probability Theory (1964, reprinted by Dover 1987), pp. 92--98.Google ScholarGoogle ScholarCross RefCross Ref
  2. Bo Bernhardsson, "Explicit solutions to the n-queens problems for all n", ACM SIGART Bulletin, Vol. 2, No. 2 (Apr. 1991), p.7. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Rok Sosič and Jun Gu, "A Polynomial Time Algorithm for the N-Queens Problem", ACM SIGART Bulletin, Vol. 1, No. 3 (xx, 1990), pp. 7--11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Rok Sosič and Jun Gu, "Fast Search Algorithms for the N-Queens Problem", IEEE Transactions on Systems, Man, and Cybernetics, Vo. 21, No. 6 (Nov/Dec 1991), pp. 1572--76.Google ScholarGoogle ScholarCross RefCross Ref
  5. http://www.acmcontest-pacnw.org/ProblemSet/2005/Problem I.Google ScholarGoogle Scholar
  6. Niklaus Wirth, "Program Development by Stepwise Refinement", Communications of the ACM, Vol. 14, No. 4 (April 1971), pp. 221--27, specifically p. 224. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Niklaus Wirth, Algorithms and Data Structures (Prentice-Hall, 1986), pp. 153--57. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. http://penguin.ewu.edu/~trolfe/QueenLasVegas/Google ScholarGoogle Scholar

Index Terms

  1. Las Vegas does n-queens

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader