节点文献
递归函数的应用
The Application of Recursive Function
【摘要】 递归函数独特的运算方式,使其在人工智能和各种事务处理过程中有着广泛的应用,因而成为一个重要的研究课题。文中以迷宫、汉诺塔等为例,根据计算机堆栈原理,具体讨论了用递归函数解题的方法和技巧。给出了递归函数调用时利用变量传递解决复杂问题的实例,展示了递归算法在解决非数值运算问题中的独特解题方式和效果。讨论表明,在求解人工智能和各种事务处理问题中,递归函数中合理地利用变量传递可有效地完成求解任务和提高程序的品质。
【Abstract】 Recursion is a powerful artificial intelligence and nonnumerical problem solving technique in programming and therefore an important topic of investigation. This paper discuss the technique in writing recursive programs based on the principle of recursive function and stack for problems such as maze, Hanoi. Examples are given for solving complex problem by transferring variables in recursive function program, and the recursive function programs show excellent capability for solving non-numeral problem. The discussion shows that the program can solve problem effectively and be written in top-quality when transfer variables reasonable in recursive function.
- 【文献出处】 微机发展 ,Microcomputer Development , 编辑部邮箱 ,2004年03期
- 【分类号】TP301
- 【被引频次】3
- 【下载频次】187