文件名称:huisufa
介绍说明--下载内容均来自于网络,请自行研究使用
回溯法是一个既带有系统性又带有跳跃性的搜索算法,它在问题的解空间树中按深度优先策略,从根节点出发搜索解空间树。回溯法求问题的所有解时,要回溯到根,且根节点的所有子树都已被搜索遍才结束。回溯法求问题的一个解时,只要搜索到问题的一个解就可以结束。使用回溯法解决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