# Permutation code

Permutation codes are a family of error correction codes that were introduced first by Slepian in 1965. and have been widely studied both in Combinatorics and Information theory due to their applications related to Flash memory and Power-line communication.

## Definition and properties

A permutation code $C$ is defined as a subset of the Symmetric Group in $S_{n}$ endowed with the usual Hamming distance between strings of length $n$. More precisely, if $\sigma ,\tau$ are permutations in $S_{n}$, then $d(\tau ,\sigma )=|\left\{i\in \{1,2,...,n\}:\sigma (i)\neq \tau (i)\right\}|$
The minimum distance of a permutation code $C$ is defined to be the minimum positive integer $d_{min}$ such that there exist $\sigma ,\tau$ $\in$ $C$, distinct, such that $d(\sigma ,\tau )=d_{min}$.
One of the reasons why permutation codes are suitable for certain channels is that the alphabet symbols only appear once in each codeword, which for example makes the errors occurring in the context of powerline communication less impactful on codewords

## Gilbert-Varshamov bound

A main problem in permutation codes is to determine the value of $M(n,d)$, where $M(n,d)$ is defined to be the maximum number of codewords in a permutation code of length $n$ and minimum distance $d$. There has been little progress made for $4\leq d\leq n-1$, except for small lengths. We can define $D(n,k)$ with $k\in \{0,1,...,n\}$ to denote the set of all permutations in $S_{n}$ which have distance exactly $k$ from the identity.
Let $D(n,k)=\{\sigma \in S_{n}:d_{H}(\sigma ,id)=k\}$ with $|D(n,k)|={\tbinom {n}{k}}D_{k}$, where $D_{k}$ is the number of derangements of order $k$.
The Gilbert-Varshamov bound is a very well known upper bound, and so far outperforms other bounds for small values of $d$.
Theorem 1: ${\frac {n!}{\sum _{k=0}^{d-1}|D(n,k)|}}\leq M(n,d)\leq {\frac {n!}{\sum _{k=0}^{[{\frac {d-1}{2}}]}|D(n,k)|}}$
There has been improvements on it for the case where $d=4$ as the next theorem shows.
Theorem 2: If $k^{2}\leq n\leq k^{2}+k-2$ for some integer $k\geq 2$, then
${\frac {n!}{M(n,4)}}\geq 1+{\frac {(n+1)n(n-1)}{n(n-1)-(n-k^{2})((k+1)^{2}-n)((k+2)(k-1)-n)}}$.
For small values of $n$ and $d$, researchers have developed various computer searching strategies to directly look for permutation codes with some prescribed automorphisms

## Other Bounds

There are numerous bounds on permutation codes, we list two here

### Gilbert-Varshamov Bound Improvement

An Improvement is done to the Gilbert-Varshamov bound already discussed above. Using the connection between permutation codes and independent sets in certain graphs one can improve the Gilbert–Varshamov bound asymptotically by a factor $\log(n)$, when the code length goes to infinity.
Let $G(n,d)$ denote the subgraph induced by the neighbourhood of identity in $\Gamma (n,d)$, the Cayley graph $\Gamma (n,d):=\Gamma (S_{n},S(n,d-1))$ and $S(n,k):=\bigcup _{i=1}^{k}D(n,i)$.
Let $m(n,d)$ denotes the maximum degree in $G(n,d)$
Theorem 3: Let $m'(n,d)=m(n,d)+1$ and
$M_{IS}(n,d):=n!.\int _{0}^{1}{\frac {(1-t)^{\frac {1}{m'(n,d)}}}{m'(n,d)+[\Delta (n,d)-m'(n,d)]t}}dt$
Then, $M(n,d)\geq M_{IS}(n,d)$
where $\Delta (n,d)=\sum _{k=0}^{d-1}{\binom {n}{k}}D_{k}$.
The Gilbert-Varshamov bound is, $M(n,d)\geq M_{GV}(n,d):={\frac {n!}{1+\Delta (n,d)}}$
Theorem 4: when $d$ is fixed and $n$ does to infinity, we have
${\frac {M_{IS}(n,d)}{M_{GV}(n,d)}}=\Omega (\log(n))$

### Lower bounds using linear codes

Using a $[n,k,d]_{q}$ linear block code, one can prove that there exists a permutation code in the symmetric group of degree $n$, having minimum distance at least $d$ and large cardinality. A lower bound for permutation codes that provides asymptotic improvements in certain regimes of length and distance of the permutation code is discussed below. For a given subset $\mathrm {K}$ of the symmetric group $S_{n}$, we denote by $M(\mathrm {K} ,d)$ the maximum cardinality of a permutation code of minimum distance at least $d$ entirely contained in $\mathrm {K}$, i.e.
$M(\mathrm {K} ,d)=max\{|\Gamma |:\Gamma \subset \mathrm {K} ,d(\Gamma )\geq d\}$.
Theorem 5: Let $d,k,n$ be integers such that $0<k<n$ and $1<d\leq n$. Moreover let $q$ be a prime power and $s,r$ be positive integers such that $n=qs+r$ and $0\leq r<q$. If there exists an $[n,k,d]_{q}$ code $C$ such that $C^{\perp }$ has a codeword of Hamming weight $n$, then
$M(n,d)\geq {\frac {n!M(\mathrm {K} ,d)}{(s+1)!^{r}s!^{q-r}q^{n-k-1}}},$
where $\mathrm {K} =(S_{s+1})^{r}\times (S_{s})^{q-r}$
Corollary 1: for every prime power $q\geq n$, for every $2<d\leq n$,
$M(n,d)\geq {\frac {n!}{q^{d-2}}}$.
Corollary 2: for every prime power $q$, for every $3<d<q$,
$M(q+1,d)\geq {\frac {(q+1)!}{2q^{d-2}}}$.