通过扭转双面带生成有符号排列
Generating Signed Permutations by Twisting Two-Sided Ribbons
AI总结:
本文用双面带扭转操作推广 Steinhaus-Johnson-Trotter 算法,通过贪心优先最大符号的 2-扭转生成全部有符号排列,并给出基于混合基数 Gray 码的无循环算法。
摘要:
我们为生成 $[n] = \{1,2,\ldots,n\}$ 的全部 $2^n \cdot n!$ 个有符号排列问题提供了一个简单自然的解决方案。该方案对最著名的排列排序方式——plain changes(Steinhaus-Johnson-Trotter 算法)给出了一个优美的推广。在 plain changes 中,$[n]$ 的 $n!$ 个排列按相邻符号交换排序,其顺序常被可视化为涉及 $n$ 条绳子的编织图案。这里我们使用 $n$ 条具有两个不同面的带子来建模有符号排列,每个相继构型通过扭转(即交换并翻转)两条相邻带子或单条带子来生成。通过贪心地优先对最大符号进行 2-扭转,再对最大符号进行 1-扭转,我们构造出 plain changes 令人难忘的锯齿形图案的有符号版本。我们通过扩展著名的混合基数 Gray 码算法,给出了一个无循环算法(即每个对象最坏情况 $\mathcal{O}(1)$ 时间)。
英文摘要:
We provide a simple and natural solution to the problem of generating all $2^n \cdot n!$ signed permutations of $[n] = \{1,2,\ldots,n\}$. Our solution provides a pleasing generalization of the most famous ordering of permutations: plain changes (Steinhaus-Johnson-Trotter algorithm). In plain changes, the $n!$ permutations of $[n]$ are ordered so that successive permutations differ by swapping a pair of adjacent symbols, and the order is often visualized as a weaving pattern involving $n$ ropes. Here we model a signed permutation using $n$ ribbons with two distinct sides, and each successive configuration is created by twisting (i.e., swapping and turning over) two neighboring ribbons or a single ribbon. By greedily prioritizing $2$-twists of the largest symbol before $1$-twists of the largest symbol, we create a signed version of plain change's memorable zig-zag pattern. We provide a loopless algorithm (i.e., worst-case $\mathcal{O}(1)$-time per object) by extending the well-known mixed-radix Gray code algorithm.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。