Analytical Study and Efficient Evaluation of the Josephus Function
Analytical Study and Efficient Evaluation of the Josephus Function
复制标题
DOI:
10.48550/arxiv.2303.15457
复制
发表时间:
2023-03
期刊:
影响因子:
--
通讯作者:
Yunier Bello-Cruz;Roy Quintero-Contreras
中科院分区:
文献类型:
--
作者:
Yunier Bello-Cruz;Roy Quintero-Contreras
A new approach to analyzing intrinsic properties of the Josephus function, $J_{_k}$, is presented in this paper. The linear structure between extreme points of $J_{_k}$ is fully revealed, leading to the design of an efficient algorithm for evaluating $J_{_k}(n)$. Algebraic expressions that describe how recursively compute extreme points, including fixed points, are derived. The existence of consecutive extreme and also fixed points for all $k\geq 2$ is proven as a consequence, which generalizes Knuth result for $k=2$. Moreover, an extensive comparative numerical experiment is conducted to illustrate the performance of the proposed algorithm for evaluating the Josephus function compared to established algorithms. The results show that the proposed scheme is highly effective in computing $J_{_k}(n)$ for large inputs.