基于MATLAB的神秘数算法设计与实现  

Design and Implementation of a Mystery Number Algorithm Based on MATLAB

在线阅读下载全文

作  者:严深海[1] 桂绍辉[1] 

机构地区:[1]赣南师范学院数学与计算机系,江西赣州341000

出  处:《计算机仿真》2007年第6期337-340,共4页Computer Simulation

摘  要:在几种常用的算法设计策略中,递归策略是设计有效算法最常用的策略之一,递归技术的应用往往使得设计出来的算法简洁易懂且易于分析。通过仔细分析SS表达式的形式定义,提取出SS表达式的内在特征,运用递归的算法设计思想,巧妙地设计并实现了计算包含指定括符种类、括符对数及指定深度时SS表达式个数的算法,从而解决了相应的神秘数问题。最后在MATLAB上实现时,又借助存储表,避免了大量的重复计算,极大地提升了程序的运行速度。解决SS表达式问题的相关思想与技术,可以运用到程序的编译中去,也可以在相类似的问题求解中得到广泛运用。The recursion is one of the commonly used strategies in the algorithm design. It often makes the algorithms brief and easy to be understood and analysed. The article first analyses the SS expression's formal defination and abstracts its features , then designs and implements the algorithms with the recursive thought to compute the number of the SS expression string which contains different kinds of bracket, different quantity of bracket and specific depth. The article solves the mysterious number problem. Finally, by using a store table the large amount of repetitive computation is avoided and the programs written in MATLAB language are sped up greatly . The thought and techniques to solve the SS expression problem can be used for the program' s compiling and the similar problems.

关 键 词:算法 递归 仿真 编译技术 

分 类 号:TP311.1[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象