1 Introduction

A permutation code is a subset of the symmetric group \(S_n\), equipped with a distance metric. Permutation codes are of potential use in various applications such as power-line communications and coding for flash memories used with rank modulation [6, 7]. Permutation codes were extensively studied over the last decade. Hamming metric is naturally the first to be considered. Later, Ulam metric [4] and Kendall \(\tau \)-metric [2] were introduced and are now the two most investigated metrics. However in [9], a new metric named the Chebyshev metric was proposed by Kløve et al., when they were studying the multi-level flash memory model. A combinatorial survey on metrics related to permutations was given in [3].

The two main questions in coding theory are fundamental limits on the parameters of the code (information rate versus minimum distance) and constructions of codes that attain these limits. It turns out that both topics are difficult for permutation codes. Few explicit constructions were obtained for various metrics and no general bounds better than the GV-bound and Sphere packing bounds were found in [1, 2, 4, 6, 9] except for the Hamming metric [5]. Both the GV-bound and the Sphere packing bound depends on the volume (V(dn)) of a typical “ball” which consists of permutations in \(S_n\) at distance at most d from the identity permutation. The calculation of the volume of that ball becomes a crucial problem.

The Chebychev distance d(pq) between two permutations \(p=(p_1, p_2, \ldots , p_n)\) and \(q=(q_1, q_2, \ldots , q_n)\) is defined by

$$\begin{aligned} d(p, q)=\max _j|p_j-q_j|. \end{aligned}$$

Let

$$\begin{aligned} T_{d, n}=\left\{ p\in S_n||p_i-i|\leqslant d \ \quad \text{ for }\ 1\leqslant i\leqslant n \right\} . \end{aligned}$$

It is clear that \(V(d, n)=|T_{d, n}|.\) The permanent of an \(n\times n\) matrix A is defined by

$$\begin{aligned} \mathrm{per}A=\sum _{p\in S_n}a_{1, p_1}\ldots a_{n, p_n}. \end{aligned}$$

Let \(A^{(d, n)}\) be the \(n\times n\) matrix with \(a_{i,j}^{d, n}=1\) if \(|i-j|\leqslant d\) and \(a_{i, j}^{d, n}=0\) otherwise. Clearly, \(V(d, n)=\mathrm{per}A^{(d, n)}.\) Although the permanent looks similar to the determinant of a matrix, it is a difficult problem to compute the permanent for general matrices. The celebrated van der Waerden theorem gives a lower bound for the permanent of the so called doubly stochastic \(n\times n\) matrix. Here doubly stochastic means that all the elements are non-negative and that the sum of the elements in any row or column is 1. Thus, if A is an \(n\times n\) matrix where the sum of the elements in any row or column is a constant k, then van der Waerden theorem gives a lower bound on the permanent of A.

By noticing that most rows and columns of \(A^{(d, n)}\) have the sum \(2d+1\), Kløve defined a closely related matrix \(B^{(d, n)}\) with row sum and column sum \(2d+1\) so that van der Waerden’s theorem can be applied. The matrix \(B^{(d, n)}\) is defined as follows:

$$\begin{aligned} b_{i,j}=\left\{ \begin{array}{ll} 0\ \ &{} \ \text{ if } \ i> j+d\ \text{ or }\ j> i+d,\\ 2\ \ &{} \ \text{ if } \ i+j\leqslant d+1\ \text{ or }\ i+j\geqslant 2n+1-d ,\\ 1\ \ &{} \ \text{ otherwise }. \end{array} \right. \end{aligned}$$

With this new defined matrix \(B^{(d, n)}\), Kløve [10] gave a lower bound on V(dn) as follows:

$$\begin{aligned} V(d, n)>\frac{\sqrt{2\pi n}}{2^{2d}}\left( \frac{2d+1}{e}\right) ^n. \end{aligned}$$
(1.1)

Let \(A_{d, 2}=(a_{i,j})\) be the upper left corner of \(B^{(d, n)}\) which is a \(d\times 2d\) matrix defined by

$$\begin{aligned} a_{i,j}={\left\{ \begin{array}{ll} 2, &{}\text {\quad if } 1\leqslant j\leqslant d+1-i,\\ 1, &{}\text {\quad if } d+2-i\leqslant j\leqslant d+i,\\ 0, &{}\text {\quad if } d+i+1\leqslant j\leqslant 2d. \end{array}\right. } \end{aligned}$$

For example,

$$\begin{aligned} A_{1,2}=\left( \begin{matrix}2&1\end{matrix}\right) ,\quad A_{2,2}=\left( \begin{matrix}2&{}2&{}1&{}0\\ 2&{}1&{}1&{}1\end{matrix}\right) ,\quad A_{3,2}=\left( \begin{matrix}2&{}2&{}2&{}1&{}0&{}0\\ 2&{}2&{}1&{}1&{}1&{}0\\ 2&{}1&{}1&{}1&{}1&{}1 \end{matrix}\right) . \end{aligned}$$

Let \(R_d\) be a set of sequences of integers as follows:

$$\begin{aligned} R_d=\left\{ (\rho _1, \rho _2,\ldots , \rho _d)|1\leqslant \rho _i\leqslant d+i, 1\leqslant i \leqslant d,\ \text{ and }\ \rho _r\ne \rho _s\right\} . \end{aligned}$$

Define

$$\begin{aligned} \Omega _d=\sum _{\rho \in R_d}a_{1,\rho _1}a_{2,\rho _2}\ldots a_{d,\rho _d}. \end{aligned}$$

Let

$$\begin{aligned} \omega _d=\frac{\Omega _de^d}{(2d+1)^d}. \end{aligned}$$

Kløve [9] also gave the following lower bound on V(dn):

$$\begin{aligned} V(d, n)>\frac{\sqrt{2\pi (n+2d)}}{\omega ^2_d}\left( \frac{2d+1}{e}\right) ^n. \end{aligned}$$
(1.2)

Thus whether (1.2) is an improvement compared with (1.1) depends on the value \(\Omega _d.\) Kløve [10] gave the first 9 values of \(\Omega _d\) as follows:

$$\begin{aligned} 3,\ 18,\ 170,\ 2200,\ 36232,\ 725200,\ 17095248,\ 463936896,\ 14246942336, \end{aligned}$$

which coincide the sequence A074932 in [12], and made the following conjecture.

Conjecture 1

[10, Conjecture 1] For any positive integer d,

$$\begin{aligned} \Omega _d=\sum _{m=0}^d{d\atopwithdelims ()m}(m+1)^d. \end{aligned}$$

Kløve showed that the equation (1.2) improves on (1.1) if Conjecture 1 is true. Furthermore, let \(A_{d,x}=(a_{i,j})\) be the \(d\times 2d\) matrix defined by

$$\begin{aligned} a_{i,j}={\left\{ \begin{array}{ll} x, &{}\text {if \quad } 1\leqslant j\leqslant d+1-i,\\ 1, &{}\text {if \quad } d+2-i\leqslant j\leqslant d+i,\\ 0, &{}\text {if \quad } d+i+1\leqslant j\leqslant 2d. \end{array}\right. } \end{aligned}$$

and let

$$\begin{aligned} \Omega _d(x)=\sum _{\rho \in R_d}a_{1, \rho _1}a_{2, \rho _2}\ldots a_{d,\rho _d}. \end{aligned}$$

In particular, \(\Omega _d(2)=\Omega _d.\) Kløve gave the following generalized conjecture and verified it for \(d\leqslant 9.\)

Conjecture 2

[10, Conjecture 1] For any positive integer d,

$$\begin{aligned} \Omega _d(x)=\sum _{m=0}^d{d\atopwithdelims ()m}(m+1)^d(x-1)^{d-m}. \end{aligned}$$
(1.3)

In this paper, we shall prove that Conjecture 2 is true.

2 Proof of Kløve’s Conjecture

Theorem 3

For any positive integer d, the identity (1.3) holds.

Actually, for any \(m\times n\) matrix \(A=(a_{i,j})\) with \(m\leqslant n\), the permanent function of A is already defined as follows (see, for example, [11]):

$$\begin{aligned} \mathrm{per}(A)=\sum _{\sigma \in P(n,m)}a_{1,\sigma _1}a_{2,\sigma _2}\cdots a_{m,\sigma _m}, \end{aligned}$$

where P(nm) denotes the set of all m-permutations of the n-set \(\{1,2,\ldots ,n\}\).

In fact, by the definition of \(R_d\), we know that \(R_d\) is exactly the subset of all d-permutations of the 2d-set \(\{1,2,\ldots ,2d\}\) such that \(\sigma \in R_d\) if and only if \(a_{1,\sigma _1}a_{2,\sigma _2}\cdots a_{d,\sigma _d}\ne 0.\) Hence we have \(\Omega _d(x)=\mathrm{per}(A_{d,x})\).

In order to prove Theorem 3, we first give a related combinatorial identity.

Lemma 4

Let m and n be positive integers. Then

$$\begin{aligned} \sum _{1\leqslant k_1\leqslant k_2\leqslant \cdots \leqslant k_m\leqslant n} \prod _{i=0}^{m} k_{i}(n+m-i)^{k_{i+1}-k_{i}}={n+m-1\atopwithdelims ()m}n^{n+m-1}, \end{aligned}$$
(2.1)

where \(k_0=1\) and \(k_{m+1}=n\).

For example, we have

$$\begin{aligned} \sum _{1\leqslant k_1\leqslant k_2\leqslant k_3\leqslant n}k_1 k_2 k_3(n+3)^{k_1-1}(n+2)^{k_2-k_1}(n+1)^{k_3-k_2}n^{n-k_3} ={n+2\atopwithdelims ()3}n^{n+2}. \end{aligned}$$

Proof of Lemma 4

We compute the multiple sum in the order from \(k_m\) to \(k_1\). It can be proved by induction on \(k_{m-1},k_{m-2}, \ldots ,k_{m-i-1}\) respectively that

$$\begin{aligned}&\sum _{k_m=k_{m-1}}^n k_m (n+1)^{k_{m}-k_{m-1}}n^{n-k_{m}}=(n-k_{m-1}+1)n^{n-k_{m-1}+1}, \nonumber \\&\sum _{k_{m-1}=k_{m-2}}^n k_{m-1}(n-k_{m-1}+1) (n+2)^{k_{m-1}-k_{m-2}}n^{n-k_{m-1}+1}={n-k_{m-2}+2\atopwithdelims ()2}n^{n-k_{m-2}+2}, \nonumber \\&\cdots , \nonumber \\&\sum _{k_{m-i}=k_{m-i-1}}^n k_{m-i}{n-k_{m-i}+i\atopwithdelims ()i}(n+i+1)^{k_{m-i}-k_{m-i-1}}n^{n-k_{m-i}+i} \nonumber \\&\quad ={n-k_{m-i-1}+i+1\atopwithdelims ()i+1}n^{n-k_{m-i-1}+i+1}. \end{aligned}$$
(2.2)

By choosing \(i=m-1\) in (2.2), we complete the proof of (2.1). \(\square \)

Proof of Theorem 3

It is clear that (1.3) is equivalent to

$$\begin{aligned} \Omega _d(x+1)=\sum _{m=0}^d{d\atopwithdelims ()m}(d-m+1)^d x^m . \end{aligned}$$
(2.3)

Therefore, it suffices to show that the coefficient \(b_m\) of \(x^m\) in \(\Omega _d(x+1)\) is equal to \({d\atopwithdelims ()m}(d-m+1)^d\). By the definition of \(\Omega _d(x+1)\), we know that each x comes from the first term in \(x+1\).

To compute \(b_m\), we first choose m x’s from m \((x+1)\)’s which are not in the same row nor in the same column of the matrix \(A_{d,x+1}\), and then choose \((d-m)\) 1’s in the other \(d-m\) rows so that no 1’s are in the same column. Suppose that the m x’s are chosen from the rows indexed by \(d+1-i_1,d+1-i_2,\ldots ,d+1-i_m\) with \(i_1<i_2<\cdots <i_m\), respectively. By noticing that the \((d+1-i)\)-th row has i \((x+1)\)’s and all the x’s we choose must be in different columns, we have \(i_1(i_2-1)(i_3-2)\cdots (i_m-m+1)\) ways to do this. As for the number of ways to choose 1’s in the remaining rows, we notice that the i-th row has \(d+i\) 1’s including those 1’s in \((x+1)\)’s and all these 1’s form several right trapezoids in the matrix \(A_{d,x+1}\). Therefore, there are \((d+1)^{i_1-1}d^{i_2-i_1-1}(d-1)^{i_3-i_2-1}\cdots (d-m+1)^{d-i_m}\) ways to choose the remaining 1’s. It follows that

$$\begin{aligned} b_m&=\sum _{1\leqslant i_1<i_2<\cdots <i_m\leqslant d}i_1(i_2-1)(i_3-2)\cdots (i_m-m+1)\\&\qquad \qquad \times (d+1)^{i_1-1}d^{i_2-i_1-1}(d-1)^{i_3-i_2-1}\cdots (d-m+1)^{d-i_m} \\&=\sum _{1\leqslant k_1\leqslant k_2\leqslant \cdots \leqslant k_m\leqslant d-m+1} \prod _{i=0}^{m} k_{i}(d+1-i)^{k_{i+1}-k_{i}}, \end{aligned}$$

where \(k_s=i_s-s+1\) (\(s=1,\ldots ,m\)), \(k_0=1\), and \(k_{m+1}=d-m+1\). By replacing n by \(d-m+1\) in (2.1), we obtain \(b_m={d\atopwithdelims ()m}(d-m+1)^d\). This completes the proof. \(\square \)