{"title":"数出 N$ 皇后","authors":"Nick Polson, Vadim Sokolov","doi":"arxiv-2407.08830","DOIUrl":null,"url":null,"abstract":"Gauss proposed the problem of how to enumerate the number of solutions for\nplacing $N$ queens on an $N\\times N$ chess board, so no two queens attack each\nother. The N-queen problem is a classic problem in combinatorics. We describe a\nvariety of Monte Carlo (MC) methods for counting the number of solutions. In\nparticular, we propose a quantile re-ordering based on the Lorenz curve of a\nsum that is related to counting the number of solutions. We show his approach\nleads to an efficient polynomial-time solution. Other MC methods include\nvertical likelihood Monte Carlo, importance sampling, slice sampling, simulated\nannealing, energy-level sampling, and nested-sampling. Sampling binary matrices\nthat identify the locations of the queens on the board can be done with a\nSwendsen-Wang style algorithm. Our Monte Carlo approach counts the number of\nsolutions in polynomial time.","PeriodicalId":501215,"journal":{"name":"arXiv - STAT - Computation","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-07-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Counting $N$ Queens\",\"authors\":\"Nick Polson, Vadim Sokolov\",\"doi\":\"arxiv-2407.08830\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Gauss proposed the problem of how to enumerate the number of solutions for\\nplacing $N$ queens on an $N\\\\times N$ chess board, so no two queens attack each\\nother. The N-queen problem is a classic problem in combinatorics. We describe a\\nvariety of Monte Carlo (MC) methods for counting the number of solutions. In\\nparticular, we propose a quantile re-ordering based on the Lorenz curve of a\\nsum that is related to counting the number of solutions. We show his approach\\nleads to an efficient polynomial-time solution. Other MC methods include\\nvertical likelihood Monte Carlo, importance sampling, slice sampling, simulated\\nannealing, energy-level sampling, and nested-sampling. Sampling binary matrices\\nthat identify the locations of the queens on the board can be done with a\\nSwendsen-Wang style algorithm. Our Monte Carlo approach counts the number of\\nsolutions in polynomial time.\",\"PeriodicalId\":501215,\"journal\":{\"name\":\"arXiv - STAT - Computation\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-07-11\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - STAT - Computation\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2407.08830\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - STAT - Computation","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2407.08830","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
摘要
高斯提出了这样一个问题:如何枚举出在一个 N 次 N 元的棋盘上摆放 N 个皇后的解的个数,从而避免两个皇后互相攻击。N 皇后问题是组合数学中的一个经典问题。我们介绍了各种计算解数的蒙特卡罗(MC)方法。特别是,我们提出了一种基于洛伦兹曲线的量子重排序方法,它与计算解的数量有关。我们证明了他的方法能带来高效的多项式时间解决方案。其他 MC 方法包括理论似然蒙特卡罗、重要性采样、切片采样、模拟嵌套、能量级采样和嵌套采样。对确定棋盘上皇后位置的二进制矩阵进行采样,可采用斯文森-旺(Swendsen-Wang)式算法。我们的蒙特卡罗方法可以在多项式时间内计算出解决方案的数量。
Gauss proposed the problem of how to enumerate the number of solutions for
placing $N$ queens on an $N\times N$ chess board, so no two queens attack each
other. The N-queen problem is a classic problem in combinatorics. We describe a
variety of Monte Carlo (MC) methods for counting the number of solutions. In
particular, we propose a quantile re-ordering based on the Lorenz curve of a
sum that is related to counting the number of solutions. We show his approach
leads to an efficient polynomial-time solution. Other MC methods include
vertical likelihood Monte Carlo, importance sampling, slice sampling, simulated
annealing, energy-level sampling, and nested-sampling. Sampling binary matrices
that identify the locations of the queens on the board can be done with a
Swendsen-Wang style algorithm. Our Monte Carlo approach counts the number of
solutions in polynomial time.