数学 > 组合数学
[提交于 2024年11月24日 (v1),最后修订于 2024年11月24日 (此版本, v2)]
标题:Maximum Nim and Josephus Problem algorithm
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:Ryohei Miyadera Dr[v2] 2024年11月24日 星期日 12:41:02 UTC