首页> 外文期刊>SIGCSE bulletin >Queens on a Chessboard
【24h】

Queens on a Chessboard

机译:皇后棋盘上

获取原文
获取原文并翻译 | 示例
           

摘要

Can you place N queens on an NxN chessboard such that none of them will threaten the others? It is easy find such a placement for an 8x8 board. It is also simple to develop a recursive, backtracking program to produce such a placement for any N (N>3). However, the recursive execution may be very costly. Can you offer an efficient, systematic way for generating such a placement for any N? The new challenge in this issue is to develop an O(N) algorithm for this task. This is a rather well known task, together with its extension of counting the number of different legal placements for a given N. Yet, the reader is encouraged to try it by herself, as the solution process combines the recognition of rather simple, but not immediate, mathematical patterns with the utilization of appropriate design heuristics.
机译:您可以将N个皇后放在NxN的棋盘上,使它们中的任何一个都不会威胁其他女王吗?很容易找到8x8电路板的这种放置方式。开发递归的回溯程序以针对任何N(N> 3)产生这样的位置也很简单。但是,递归执行可能会非常昂贵。您能否提供一种有效,系统的方式来为任何N生成此类展示位置?此问题中的新挑战是为此任务开发O(N)算法。这是一个众所周知的任务,它的扩展功能是为给定的N计算不同法律位置的数量。但是,我们鼓励读者自己尝试一下,因为解决过程结合了对简单但不简单的认识即时的数学模式,并利用适当的设计试探法。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号