We develop lower bounds with often-matching exponential algorithms for several variants of the n-queens problem. In particular, we prove that placing n queens onto an \(n \times n\) board with holes requires \(2^{\varTheta (n)}\) time for both decision and counting, assuming the Exponential Time Hypothesis (ETH) and #ETH respectively. The same result extends to more general manifolds. If the \(n \times n\) board has no holes, but some of the queens are already placed, then completing the placement of n queens is known to be NP-complete and #P-complete; we show that both versions require between \(2^{\varOmega (\sqrt{n})}\) and \(2^{O(n)}\) time, again assuming (#)ETH.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

ETH Lower Bounds for n-Queens: Time Waits for Nobody

  • Josh Brunner,
  • Erik D. Demaine,
  • Timothy Gomez,
  • Markus Hecher,
  • Meryl Zhang

摘要

We develop lower bounds with often-matching exponential algorithms for several variants of the n-queens problem. In particular, we prove that placing n queens onto an \(n \times n\) board with holes requires \(2^{\varTheta (n)}\) time for both decision and counting, assuming the Exponential Time Hypothesis (ETH) and #ETH respectively. The same result extends to more general manifolds. If the \(n \times n\) board has no holes, but some of the queens are already placed, then completing the placement of n queens is known to be NP-complete and #P-complete; we show that both versions require between \(2^{\varOmega (\sqrt{n})}\) and \(2^{O(n)}\) time, again assuming (#)ETH.