基于Matlab的3n+1问题设计研究
基于Matlab的3n+1问题设计研究(论文9200字)
摘要:3n+1问题是一道悬而未决的难题,它的具体操作是:输入任意一个正整数,若为偶数,则将其除以2;若为奇数,则增大至本身的三倍后再加1。而它的猜想就是:重复上述操作,最终总会趋向于1。
本文将着重研究3n+1的算法,试图寻求出更便捷的算法操作,并且运用Matlab系统和GUI编写出算法和算法界面,来进行测试。最终,本文将会概括出一个改良后的3n+1问题的算法,并将其编写出来。
关键字:3n+1问题;循环;Matlab;GUI
The Study of 3n+1 Problem based on Matlab
Abstract: The 3n+1 problem is an unresolved problem. Its specific operation is to enter any positive integer, if it is even, divide it by 2;if it is odd , it will increase to three times and then add 1. And its conjecture is that repeated operations will eventually tend to 1.
This paper will focus on the research of 3n+1 algorithm,try to find more convenient algorithm operation, and use Matlab system and GUI to write out the algorithm and the interface of
algorithm. Finally, this paper will generalize an improved 3n+1 algorithm and write it out. [来源:http://Doc163.com]
Key words: The 3n+1 problem; Cycle; Matlab;GUI
目 录
1 绪论..................................................... 3
课题背景及研究意义....................................................... 3
1.1.1 研究背景............................................................. 3
1.1.2 研究意义............................................................. 3
1.2 国内外发展趋势及研究现状................................................. 3
1.2.1 国外3n+1问题研究现状................................................ 3
1.2.2 国内3n+1问题研究现状................................................ 4
1.2.3 发展趋势............................................................. 4
1.3 课题主要研究内容......................................................... 5
2 3n+1问题................................................ 5
[来源:http://www.doc163.com]
2.1 3n+1问题的T运算........................................................ 5
2.2 3n+1问题的等价算法及其停时.............................................. 6
2.3 本章小结................................................................. 8
3 Matlab软件基础.......................................... 8
3.1 Matlab基本介绍.......................................................... 8
3.2 Matlab发展历程.......................................................... 9
3.3 Matlab组成部分.......................................................... 9
3.4 Matlab基本语句......................................................... 10
3.5 GUI介绍................................................................ 10
3.6 本章小结................................................................ 12
4 基于Matlab建立3n+1问题的两种算法...................... 12
4.1 T运算.................................................................. 12
4.2 二进制序列运算.......................................................... 12
4.3 GUI界面设计............................................................ 15
4.3 本章小结................................................................ 19
参考文献.................................................. 19
致谢...................................................... 21