Problem 483
Repeated permutation
We define a permutation as an operation that rearranges the order of the elements
= keep the initial order = exchange the 1st and 2nd elements = exchange the 1st and 3rd elements = exchange the 2nd and 3rd elements = rotate the elements to the right = rotate the elements to the left
If we select one of these permutations, and we re-apply the same permutation repeatedly, we eventually restore the initial order.
For a permutation
For
Let
Find
重复进行的重排
将改变序列
= 保持顺序不变 = 交换第一个和第二个元素 = 交换第一个和第三个元素 = 交换第二个和第三个元素 = 循环右移一位 = 循环左移一位
如果从这些重排中选择一种,并且对重排后的序列重复进行相同的重排,最终元素会回到初始顺序。
对于任意重排
对于
对于所有长度为
求
Gitalking ...