# Finding First and Most-Beautiful Queens by Integer Programming

**Authors:** Matteo Fischetti, Domenico Salvagnin

arXiv: 1907.08246 · 2019-07-22

## TL;DR

This paper explores using Integer Linear Programming to efficiently find lexicographically first and most beautiful solutions to the n-queens puzzle, achieving new results for larger board sizes than previously known.

## Contribution

It introduces novel ILP-based algorithms, including a cutting plane method, to compute lexicographically optimal and aesthetically pleasing solutions for large n-queens instances.

## Key findings

- Successfully computed new solutions for n=56 to 115.
- Developed a cutting plane ILP approach based on Gomory cuts.
- Solved the lexicographic bottleneck problem for n up to 176.

## Abstract

The n-queens puzzle is a well-known combinatorial problem that requires to place n queens on an n x n chessboard so that no two queens can attack each other. Since the 19th century, this problem was studied by many mathematicians and computer scientists. While finding any solution to the n-queens puzzle is rather straightforward, it is very challenging to find the lexicographically first (or smallest) feasible solution. Solutions for this type are known in the literature for n <= 55, while for some larger chessboards only partial solutions are known. The present paper was motivated by the question of whether Integer Linear Programming (ILP) can be used to compute solutions for some open instances. We describe alternative ILP-based solution approaches, and show that they are indeed able to compute (sometimes in unexpectedly-short computing times) many new lexicographically optimal solutions for n ranging from 56 to 115. One of the proposed algorithms is a pure cutting plane method based on a combinatorial variant of classical Gomory cuts. We also address an intriguing "lexicographic bottleneck" (or min-max) variant of the problem that requires finding a most beautiful (in a well defined sense) placement, and report its solution for n up to 176.

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/1907.08246/full.md

## Figures

23 figures with captions in the complete paper: https://tomesphere.com/paper/1907.08246/full.md

## References

25 references — full list in the complete paper: https://tomesphere.com/paper/1907.08246/full.md

---
Source: https://tomesphere.com/paper/1907.08246