n-2型Josephus问题的求解方法  

Methods of solvingn-2 type Josephus problem

在线阅读下载全文

作  者:黄绍龙[1] HUANG Shaolong(College of Mathematics and Science,Luoyang Normal University,Luoyang,Henan 471934,China)

机构地区:[1]洛阳师范学院数学科学学院,河南洛阳471934

出  处:《计算机应用文摘》2023年第24期87-89,共3页Chinese Journal of Computer Application

摘  要:文章主要利用Python语言讨论解决n-2型Josephus问题。首先,通过计算机模拟求解,其次分析问题的实质,得到递推关系并通过递归函数求解,再次,以n的取值为2的次幂为分界点进行分组,观察解的模式来猜测解的解析式。通过数学归纳法证明了猜测的正确性,最终得出解可以通过循环左移1位获取。通过深入浅出地对n-2型Josephus问题进行分析和求解,有助于提高在数学问题思考方面的能力和水平。The article mainly uses Python language to discuss and solve the n-2 type Josephus problem.Firstly,the solution is solved through computer simulation.Secondly,the essence of the problem is analyzed to obtain a recursive relationship and solved through a recursive function.Thirdly,the solution is grouped using the power of n to the power of 2 as the boundary point,and the pattern of the solution is observed to guess the analytical formula of the solution.The correctness of the conjecture was proven through mathematical induction,and the final solution can be obtained by cyclically shifting one position to the left.Analyzing and solving the n-2 type Josephus problem in a simple and easy manner can help improve one's ability and level of thinking in mathematical problems.

关 键 词:计算机模拟 递归函数 数学归纳法 循环左移位 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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