Number of Cycles from a Permutation

74 Views Asked by At

Let $P(n)$ be the number of cycles in a $2^n$-length permutation where the odd numbers come first and then the even numbers.

For example, the permutation from $P(3)$ would be $\{1, 3, 5, 7, 2, 4, 6, 8\}$ and as you can see there are 4 cycles, $(1) (3 5 2) (7 6 4) (8)$

I checked up to $P(16)$ with C++ and SymPy (computational limit because you need around $2^{100}$ bytes of memory if we wish to calculate $P(100)$ manually) and something interesting pops up.

It is exactly the numbers appear on A000031 where the formula is $$ \frac{1}{n} \sum_{d \mid n} \phi(n) 2^{\frac{n}{d}}$$

Number of n-bead necklaces with 2 colors when turning over is not allowed; also number of output sequences from a simple n-stage cycling shift register;

I believe this is approachable using Burnside lemma because the cycles here are in fact orbits in terms of group theory. But, I don't know any reason why the $\text{fix}(g)$ is in this group is ${2^{(n, k)}}$ since the next element from a cycle seems "random".

Is there a explanation or proof for this relation?

1

There are 1 best solutions below

0
On

Instead of permuting $\{1,\dots,2^n\}$, I will use the numbers $\{0,\dots,2^n-1\}$. Let $\pi$ be the permutation of interest. With this re-indexing, in one line notation, $\pi$ has all of the even numbers first, then all of the odd numbers. It turns out that $\pi$ can be written as a function from $\{0,\dots,2^n-1\}$ to itself, as follows: $$ \pi(k)= \begin{cases} 2k\pmod {2^n-1} & 0\le k \le 2^n-2 \\ 2^n-1 & k=2^n-1 \end{cases} $$ Let $G$ be the subgroup of $S_{2^n}$ which is generated by $\pi$. This determines a group action on $\{0,\dots,2^{n}-1\}$. The number of orbits of this group action is exactly the number of cycles of $\pi$.

Note that $|G|=n$. Indeed, the fact that $\pi^i(k)=2^ik\pmod{2^n-1}$ implies that $\pi^i(k)\neq k$ when $1\le i\le n-1$ and $1\le k \le 2^n-2$, yet $\pi^n(k)=k$ for all $k$. Therefore, we get $$ \text{# cycles of $\pi$}=\text{# orbits of $G$}=\frac1n\sum_{i=0}^{n-1}\#\text{Fix}(\pi^i) $$ All that remains is to compute $\text{# Fix}(\pi^i)$. That is, we must count the number of solutions to $$ 2^ik\equiv k\pmod {2^n-1}, $$ and then add one to account for the fact that $\pi(2^n-1)=\pi(2^n-1)$. This becomes $(2^i-1)k\equiv 0\pmod{2^n-1}$. Using Noether's first isomorphism theorem, the size of the kernel of the map $x\mapsto (2^i-1)x$ is $2^n-1$ divided by the size of the image of this map. It is clear that the image of this map is the set of multiples of $\gcd(2^n-1,2^i-1)$ in $\{0,1,\dots,2^n-1\}$. It is well known, and provable by induction, that $$ \gcd(2^n-1,2^i-1)=2^{\gcd(n,i)}-1 $$ Furthermore, the number of multiples of $2^{\gcd(n,i)}-1$ is simply $\frac{2^n-1}{2^{\gcd(n,i)}-1}$. Putting this altogether, we get $$ \#\text{Fix}(\pi^i)=\frac{2^n-1}{(2^n-1)/(2^{\gcd(n,i)}-1)}+1=2^{\gcd(n,i)} $$ Finally, by grouping all $i$ together for which $\gcd(n,i)=d$, we arrive at the formula you desire.