arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1912.05935cs.AI
收藏

求解n皇后完备化问题的线性算法

Linear algorithm for solution n-Queens Completion problem

E. Grigoryan

摘要:

一个线性算法来解决的n皇后完成问题的任意组成的k皇后,一致地分布在一个棋盘上的大小为n × n。算法中使用了两个重要的规则:a)整个系统作为一个整体的顺序风险消除规则; b)在给定的选择条件下形成最小损伤的规则。对于k个皇后(1<= k<n)的任何组合,提供一个解决方案,或者做出一个不能完成该组合的决定。在做出这样的决定时出错的概率不超过0.0001,并且其值随着n的增加而减小。它是建立的平均时间,所需的皇后被放置在一行,随着n值的增加而减少。介绍了两种随机选择模型及其比较分析结果。提出了一种基于解矩阵分解为两个基本层次的回溯过程组织模型。给出了基本能级与n值关系的回归公式。结果发现,对于n=(7-100000)的解决方案中,从未使用过的回溯程序的数量超过35%。此外,对于n=(320-22500),此类病例的数量超过50%。给出了一个快速算法,用于验证n皇后问题解或任意k皇后合成的正确性。

英文摘要:

A linear algorithm is described for solving the n-Queens Completion problem for an arbitrary composition of k queens, consistently distributed on a chessboard of size n x n. Two important rules are used in the algorithm: a) the rule of sequential risk elimination for the entire system as a whole; b) the rule of formation of minimal damage in the given selection conditions. For any composition of k queens (1<= k<n), a solution is provided, or a decision is made that this composition can't be completed. The probability of an error in making such a decision does not exceed 0.0001, and its value decreases, with increasing n. It is established that the average time, required for the queen to be placed on one row, decreases with increasing value of n. A description is given of two random selection models and the results of their comparative analysis. A model for organizing the Back Tracking procedure is proposed based on the separation of the solution matrix into two basic levels. Regression formulas are given for the dependence of basic levels on the value of n. It was found that for n=(7-100000) the number of solutions in which the Back Tracking procedure has never been used exceeds 35%. Moreover, for n=(320-22500), the number of such cases exceeds 50 %. A quick algorithm for verifying the correctness of n-Queens problem solution or arbitrary composition of k queens is given.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑