期刊文献+

N皇后问题随机算法性能分析 被引量:2

Performance Analysis of the Random Algorithm for N-Queen Problem
下载PDF
导出
摘要 N皇后问题是NP问题,以随机算法结合回溯求解该问题,能获得很好性能。算法性能与随机皇后数量的关系曲线呈U型。随机皇后数量须在宽度不大于20的特定范围内才能获得较好性能。100以内随n变大,最佳随机皇后数量从n-10到n-17缓慢变化。最佳随机皇后数量使算法能在常规时间内求解n>100的情况,远大于单纯回溯法求解规模30。由于回溯开销,提高随机算法性能的做法不能有效降低总用时。算法用时随n值递增的速度不断趋缓。 N-Queen problem is a NP problem. By the way of Random algorithm with BackTrack, the problem is solved with a good performance. The performance graph is the shap of U. While the number of random queens is in a special range that is nar row than 20, the algorithm's performance is good. With the increasing of the number of queens below 100, the best number of random queens changes slowly from n-10 to n-17. Algorithm can solve 100-Queen in common time, far larger than pure Back Track way. Because of the BackTack expenses, it is hard to reduce the total time by Optimizing the Random algorithm. As n in creases, the algorithm time increases more and more slowly.
作者 秦丹
出处 《电脑知识与技术(过刊)》 2013年第9X期5954-5957,共4页 Computer Knowledge and Technology
关键词 N皇后 随机算法 拉斯维加斯算法 时间复杂度 回溯 随机窗口 N queen random algorithm Lasvegas algorithm Time complexity BackTrack random window
  • 相关文献

参考文献6

二级参考文献20

共引文献25

同被引文献12

引证文献2

二级引证文献1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部