文件名称:huisufa
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:558byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
回溯法是一个既带有系统性又带有跳跃性的搜索算法,它在问题的解空间树中按深度优先策略,从根节点出发搜索解空间树。回溯法求问题的所有解时,要回溯到根,且根节点的所有子树都已被搜索遍才结束。回溯法求问题的一个解时,只要搜索到问题的一个解就可以结束。使用回溯法解决n皇后问题时,用完全二叉树表示解空间,用n元组x[1:n]表示,其中x[i]表示皇后i放在棋盘的第i行的第x[i]列,根据规则任何2个皇后不放在同一行或同一列或同一斜线上,则可以得到等式关系,由此可以进行解决问题。-Backtracking is a systematic and both with a jump with a search algorithm that tree in the solution space in depth-first strategy to search the solution space starting from the root tree. Backtracking find all solutions of the problem, we should go back to the root, and root of all sub-trees have been searching all over until the end. Backtracking when seeking a solution to the problem, as long as the search for a solution to the problem would end. Using a retrospective method to solve the n queens problem, the solution space with a complete binary tree that, with the n-tuple x [1: n] said, where x [i] queen i said i-line on the board first x [i ] column, according to the rules of any two queen is not on the same row or column or the same diagonal, then the relationship can get the equation, which can solve the problem.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
huisufa.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.