最大尼姆与约瑟夫问题算法
Maximum Nim and Josephus Problem algorithm
AI总结:
本文通过最大尼姆博弈的规则函数建立迭代关系,提出一种新的约瑟夫问题算法,用于确定每隔k个数字移除一个时最后剩下的数字。
摘要:
在本研究中,我们研究一种约瑟夫问题算法。设 $n,k$ 为正整数,且 $g_k(n) = \left\lfloor \frac{n}{k-1} \right\rfloor +1$,其中 $\left\lfloor \\ \\ \right\rfloor$ 为向下取整函数。假设存在 $p$ 使得 $g_{k}^{p-1}(0) < n(k-1) \leq g_{k}^{p}(0)$,其中 $g_{k}^p$ 是 $g_k$ 的第 $p$ 次函数迭代。那么,在 $n$ 个数字、每隔 $k$ 个数字移除一个的约瑟夫问题中,最后剩下的数字为 $nk-h2_{k}^{p}(0)$。该算法基于规则函数为 $f_k(n)=\left\lfloor \frac{n}{k} \right\rfloor$ 的最大尼姆。利用本文的结果,我们可以构建一种新的约瑟夫问题算法。
英文摘要:
In this study, we study a Josephus problem algorithm. Let $n,k$ be positive integers and $g_k(n) = \left\lfloor \frac{n}{k-1} \right\rfloor +1$, where $ \left\lfloor \ \ \right\rfloor$ is a floor function. Suppose that there exists $p$ such that $g_{k}^{p-1}(0) < n(k-1) \leq g_{k}^{p}(0)$, where $g_{k}^p$ is the $p$-th functional power of $g_k$. Then, the last number that remains is $nk-h2_{k}^{p}(0)$ in the Josephus problem of $n$ numbers, where every $k$-th numbers are removed. This algorithm is based on Maximum Nim with the rule function $f_k(n)=\left\lfloor \frac{n}{k} \right\rfloor$. Using the present article's result, we can build a new algorithm for Josephus problem.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。