1 Introduction

Let π = (π1, π2,…,πn) be a permutation of {1,2,…,n}, a permutation of order n. The permutation π can be given in the equivalent form as an n × n permutation matrix Pπ with 1’s in positions (i, πi) for i = 1,2,…,n and 0’s elsewhere. Let \(\mathcal {S}_{n}\) denote the set of all permutations of order n, and let \(\mathcal {P}_{n}\) denote the corresponding set of n × n permutation matrices. We define the discrete derivative of π and Pπ to be the vector

$$ D(\pi)=D(P_{\pi}) = (\pi_{2}-\pi_{1},\pi_{3}-\pi_{2},\ldots,\pi_{n}-\pi_{n-1})\in \mathbb{Z}^{n-1}. $$

The integers πiπi− 1 are the first-order differences of π. For k = 1,2,…,n − 1 we define the kth order differences of π to be integers πiπik for i = k + 1,…,n. Note that the k th order differences for k ≥ 2 are sums of first-order differences:

$$ \pi_{i}-\pi_{i-k}=(\pi_{i}-\pi_{i-1})+(\pi_{i-1}-\pi_{i-2})+\cdots+ (\pi_{i-k+1}-\pi_{i-k}). $$
(1)

If k = 0, then the zeroth order differences are defined to be the entries of π itself. We assemble all these differences in a triangle Θπ that we call the difference triangle of π. To illustrate, if n = 6 and π = (3,5,1,6,2,4), then

$$ {\Theta}_{\pi}=\quad \begin{array}{rrrrrrrrrrr} 3&&5&&1&&6&&2&&4\\ &2&&-4&&5&&-4&&2&\\ &&-2&&1&&1&&-2&&\\ &&&3&&-3&&3&&&\\ &&&&-1&&-1&&&&\\ &&&&&1&&&&& \end{array}. $$
(2)

We label the rows of the difference triangle of a permutation of order n as 0,1,2,…, n − 1 so that they correspond to the order of the differences in the rows.

The difference triangle Θπ as defined above is different from what is usually called the difference table of a finite sequence that is constructed by taking successive differences of entries in rows. Rows 0 and 1 are the same but then they would differ. Thus, with π = (3,5,1,6,2,4) as above, row 2 of the difference table is

$$ (-4)-2=-6\quad 5-(-4)=9\quad (-4)-5=-9 \quad 2-(-4)=6, $$

and differs from row 2 of the difference triangle as given in (2).

The notion of the derivative of a permutation captures the changes in consecutive entries of a permutation π, and therefore contains information about e.g. the descents of a permutation. We refer to the book [2] on permutations and their descents. Permutation matrices and more general classes of (0,1)-matrices are treated in [3].

The difference triangle is used and analyzed extensively in the literature on Costas arrays [1, 4, 5]. A Costas permutation (or Costas array or Costas permutation matrix) [8] is a permutation π of order n such that for each k = 0,1,2,…,n − 1, its k th order differences in row k of its difference triangle are distinct. Since π is a permutation, its zeroth order differences are distinct; since π has only one (n − 1)st difference, no restriction is placed on (n − 1)st order differences. If we think of a permutation matrix as a configuration of points in the Euclidean plane at the integral positions (i, πi) for i = 1,…,n, then for a Costas permutation, no two of the line segments determined by these points have both the same length and the same slope, and thus all the line segments they determine are distinct. In terms of its difference triangle, the integers in each row are distinct. We remark that a Golomb ruler of order n is defined to be a sequence of n distinct positive integers such that all of the entries in its difference triangle are distinct. Since we confine our attention to permutations of {1,2,…,n} a Golumb ruler is possible only in the trivial cases of n = 1 or 2. An example of a Costas permutation of order 4 is π = (4,3,1,2) with difference triangle

$$ \begin{array}{rrrrrrr} 4&&3&&1&&2\\ &-1&&-2&&1&\\ &&-3&&-1&&\\ &&&-2&&& \end{array}. $$

If a symmetry of the dihedral group D4 is applied to a Costas permutation, the result is also a Costas permutation. Certain structural properties of Costas permutations are given in [9]. In particular, the following holds:

Proposition 1 (Proposition 4.2 in 9)

If n ≥ 4, then in a Costas permutation matrix P = [pij] of order n, there exists prs = 1 and puv = 1 ((r, s)≠(u, v)) such that also pab = 1 and pcd = 1 where bd = sv and ac = −(ru), that is the line segment joining the points (a, b) and (c, d) has the same vertical displacement and opposite horizontal displacement as the line segment joining the points (r, s) and (u, v).

In [5] various properties of the difference triangle of a Costas array are derived; in particular, it is shown that the number kn, r of positive numbers in row r of the difference triangle satisfies

$$ \left\lceil n-r-\frac{2n-1}{3}\right\rceil \le k_{n,r}\le \left\lceil \frac{n-1}{3}\right\rceil, $$

and tighter inequalities are conjectured for r = 1.

Costas arrays are notoriously difficult to construct and are conjectured to exist for all n; one may consult [6] for up-to-date information on their existence. The smallest n for which the existence of a Costas array is unknown is n = 32. It thus seems natural to investigate permutations under less restrictive conditions. Accordingly, it is natural to define for 1 ≤ kn − 1, a permutation to be a k-Costas permutation provided that for each i = 0,1,…,k, its i th order differences are distinct. Thus an (n − 1)-Costas permutation is a Costas permutation. A 1-Costas permutation is a permutation whose discrete derivative consists of distinct integers. For more on Costas arrays, see [1, 4, 5, 9,10,11,12] and the many references therein. Our goal in this paper is more restrictive, namely, to investigate various properties of the discrete derivative of a permutation (so, in the above context, the case k = 1). Many of the properties we consider are motivated by the classical derivative of a function.

We now summarize the contents of this paper. In Section 2, we develop some basic properties of the discrete derivative of a permutation. In Section 3 we define the local and global variations of a permutation and determine their extreme values with characterizations of equality. Some other extremal questions, and the notion of convexity, are treated in Section 4. Finally, in Section 5 we discuss some possible generalizations and questions of the various properties discussed in this paper.

2 The Discrete Derivative

The following observation is the analogue of the fact that a function is determined up to a constant by its derivative. Here, since we are dealing with permutations in \(\mathcal {S}_{n}\), no constant is involved.

Proposition 2

A permutation \(\pi \in \mathcal {S}_{n}\) is uniquely determined by its discrete derivative, i.e., the function \(\pi : \mathcal {S}_{n} \rightarrow \mathbb {Z}^{n-1}\) given by \(\pi \rightarrow D(\pi )\) is injective.

Proof

First, it is clear that π is uniquely determined by the extension (π1, π2π1,…,πnπn− 1) of the discrete derivative, due to the expression

$$ \pi_{k}=\pi_{1}+(\pi_{2}-\pi_{1})+ {\cdots} + (\pi_{k}-\pi_{k-1}) \quad (k \le n). $$
(3)

Next, when \(\pi \in \mathcal {S}_{n}\) is given, then any other \(\pi ^{\prime } \in \mathcal {S}_{n}\) with \(D(\pi )=D(\pi ^{\prime })\), must be obtained by a shifting of π in the sense that \(\pi _{i}^{\prime }=a+\pi _{i} ~(i \le n)\) for some integer a. But this implies that a = 0; otherwise some \(\pi ^{\prime }_{i}\) would not lie in the set {1,2,…,n}. Thus \(\pi ^{\prime }=\pi \). □

Example 1

If \(\pi =(5,2,7,4,1,6,3) \in \mathcal {S}_{7}\), then its corresponding permutation matrix is

In terms of integral points in the plane as previously described, there are only two different line segments of the six determined by successive points. The discrete derivative of π is D(π) = (− 3,5,− 3,− 3,5,− 3).

By Proposition 2 a permutation \(\pi =(\pi _{1},\pi _{2},\ldots ,\pi _{n})\in \mathcal {S}_{n}\) is determined by the (n − 1) entries in row 1 of its difference triangle Θπ. The permutation π is, of course, also determined by any (n − 1) of the entries of π itself. There are other sets of (n − 1) entries of the difference triangle which determine its corresponding permutation. Consider the complete graph Kn with vertices labeled 1,2,…,n. To each edge {i, j} of Kn with i < j we give the weight (πjπi), thereby obtaining a weighted complete graph \(K_{n}^{\pi }\). A weighted spanning tree is then a spanning tree of Kn with the inherited weights.

Proposition 3

Let \(\pi \in \mathcal {S}_{n}\). Then any weighted spanning tree Tπ of \(K_{n}^{\pi }\) uniquely determines π.

Proof

The weighted spanning tree Tπ has (n − 1) edges. Let p, q, r be distinct vertices of Tπ with edges {p, q} and {q, r} where p < q and q < r. Then the weight of {p, q} is πqπp and the weight of {q, r} is πrπq. Since (πrπq) + (πqπp) = πrπp, the weight of the edge {p, r} of Kn is also determined. Since any two vertices of Kn are joined by a path all of whose edges belong to Tπ, it now follows that the weights of all the edges of \(K_{n}^{\pi }\) are determined, in particular the weights of the edges {1,2},{2,3},…,{n − 1,n}; thus the first-order differences of π, and thus π itself (see Proposition 2), are determined. □

Example 2

Consider again n = 6 and π = (3,6,1,5,2,4). The difference triangle is

Consider the spanning weighted tree of Tπ of \(K_{6}^{\pi }\) with (unweighted) edges F = {{1,2},{2,3},{4,6},{1,4},{2,5}} whose weights are highlighted. Then F is a path 3, 2, 1, 4, 6 with an additional edge {2,5}. A simple verification checks that the difference triangle is determined by the highlighted entries.

It is natural to ask which vectors in \(\mathbb {Z}^{n}\) are discrete derivatives of permutations in \(\mathcal {S}_{n}\).

Define, for an integral vector z = (z1, z2,…,zn− 1), the set

$$ S_{z}:=\{0\} \cup \left\{\sum\limits_{k=1}^{i} z_{k}:~1 \le i \le n-1\right\}. $$

Proposition 4

Let z = (z1, z2,…,zn− 1) be an integral vector. Then z is the discrete derivative of some permutation in \(\mathcal {S}_{n}\) if and only if Sz is a set of n consecutive integers containing 0.

Proof

Assume z = D(π) for some \(\pi \in \mathcal {S}_{n}\). Then, by (3),

$$ \sum\limits_{k=1}^{i} z_{k} =(\pi_{2}-\pi_{1}) + (\pi_{3}-\pi_{2}) + {\cdots} +(\pi_{i+1}-\pi_{i})=\pi_{i+1}-\pi_{1} $$

for in − 1. So the numbers \({\sum }_{k=1}^{i} z_{k}\) (in − 1) are

$$ \pi_{2}-\pi_{1}, \pi_{3}-\pi_{1}, \ldots, \pi_{n}-\pi_{1}. $$

Therefore Sz consists of the numbers π1, π2,…,πn with π1 subtracted from each, and this is a set of n consecutive integers containing 0.

Conversely, let S be a set of n consecutive integers containing 0, so

$$ S=\{-s, -s+1, \ldots, -1, 0, 1, \ldots, n-s-1\} $$

for some integer s with 0 ≤ sn − 1. Let π be the permutation

$$ \pi=(s+1, 1, 2, 3, \ldots, s, s+2, \ldots, n). $$

Then z := D(π) = (−s,1,1,…,1,2,1,1,…,1), where the entry 2 occurs in position s + 1. So the numbers \({\sum }_{k=1}^{i} z_{k}\) (1 ≤ in − 1) become

$$ -s, -s+1, -s+2, \ldots, -1, 1, 2, \ldots, n-s-2 $$

and therefore Sz = {−s,−s + 1,…,− 1,0,1,…,ns − 1} = S, as desired. □

For a permutation π in \(\mathcal {S}_{n}\), we call the set SD(π) the sum-characteristic of π. There are n sets of n consecutive integers containing 0, namely,

$$ \{-(n-1),\ldots,-1,0\},\{ -(n-2),\ldots,0,1\}, \ldots, \{0,1,\ldots,n-1\}, $$
(4)

and by Proposition 4 each of the sets in (4) is the sum-characteristic of a permutation in \({\mathcal S}_{n}\). The sum-characteristic of a permutation π = (π1, π2,…,πn) is uniquely determined by π1 and thus is the sum-characteristic of (n − 1)! permutations in \({\mathcal S}_{n}\). To see this, we observe that as in the proof of Proposition 4, the entries of the sum-characteristic are {π2π1, π3π1,…,πnπ1}. Thus if two permutations have the same π1, then the entries {π2, π3,…,πn} are {1,2,…,n}∖{π1} and hence their sum-characteristics are identical.

Let \(\pi \in {\mathcal S}_{n}\) with discrete derivative D(π) = (a1, a2,…,an− 1). It follows from (1) that π is a Costas permutation if and only if for each k ≥ 0, the integers in the sequences

$$ a_{i}+a_{i+1}+\cdots+a_{i+k}\quad (1\le i\text{ with }i+k\le n) $$

are distinct. Hence by Proposition 4, a Costas permutation of order n exists if and only if there is a sequence (b1, b2,…,bn− 1) of n − 1 integers which, with 0, can be reordered to form a consecutive set of integers such that the integers in each of the sequences

$$ b_{i}+b_{i+1}+\cdots+b_{i+k}\quad (1\le i\le i+k\le n-1; k\ge 0) $$

are distinct.Footnote 1

Example 3

Consider the permutation in Example 1, so \(\pi =(5,2,7,4,1,6,3) \in \mathcal {S}_{7}\) and D(π) = (− 3,5,− 3,− 3,5,− 3). Then, if z = D(π), we get

$$ S_{z}=\{0, -3,2,-1,-4,1,-2\}=\{-4,-3,-2,-1,0,1,2\}. $$

We now construct another permutation \(\pi ^{\prime }\) such that \(S_{z^{\prime }}=S_{z}\) where \(z^{\prime }=D(\pi ^{\prime })\). Let \(z^{\prime }=(-4,1,1,1,2,1)\). Then \(S_{z^{\prime }}=\{-4,-3,-2,-1,0,1,2\}=S_{z}\), and, for instance, the permutation \(\pi ^{\prime }=(5,1,2,3,4,6,7)\) is such that \(D(\pi ^{\prime })=(-4,1,1,1,2,1)\).

We now consider some questions related to the signs and values of the discrete derivative of a permutation. It is easy to see that there is only one permutation \(\pi \in \mathcal {S}_{n}\) having only positive discrete derivatives, namely the identity permutationπ = ιn corresponding to the n × n identity matrix In. Similarly, the anti-identity permutation ζn = (n,…,2,1) corresponding to the backward identity matrix Ln = [lij], where lij = 1 when j = ni + 1 and 0 otherwise (in), is the only permutation with only negative derivatives. A permutation in \(\mathcal {S}_{n}\) is a Grassmannian permutation provided it has only one descent. Grassmannian permutations are the only permutations π with only one negative entry in their discrete derivative. Henceforth we generally refer to a discrete derivative simply as a derivative.

We now consider permutations with only two distinct values in their discrete derivative. An example of a permutation all of whose whose derivative values are 5 or − 3 is given in Example 1. Another similar example is (6,3,5,2,4,1) where D(π) = (− 3,2,− 3,2,− 3).

Let p and q be distinct integers. If for some n ≥ 1 there exists a permutation \(\pi \in \mathcal {S}_{n}\), such that {D(π)i : in − 1} = {p, q}, then we say that (p, q) is a D-pair. Let (p, q) be a D-pair. Then (q, p) is also a D-pair, and therefore the relative order of |p| and |q| can be specified without loss of generality. In fact, we may also assume p > 0 because, the reverse of a permutation has the same derivative values as the original but with opposite signs.

Lemma 1

Assume that n ≥ 3 and that (p, q) is a D-pair. Then p and q have opposite signs, and p and q are relatively prime.

Proof

The only permutation with all derivatives positive (and thus all equal to 1), is the identity permutation, and the only permutation with all derivatives negative (and thus all equal to − 1), is the anti-identity permutation. So p and q have opposite signs. If \(\gcd (p,q):=d \ge 2\), then each of π2, π3,…,πn differ from π1 by a multiple of d, an impossibility as π is a permutation. □

We next show that the conditions on p and q discussed above provide a characterization of D-pairs.

Theorem 1

Let a and b be relatively prime integers with 1 ≤ a < bn − 1. Then there exists an integer n such that (a,−b) is a D-pair corresponding to a permutation in \({\mathcal S}_{n}\).

Proof

We first treat the case when a = 1. Let \(\pi =(2, 3, \ldots , b+1,1) \in \mathcal {S}_{b+1}\). Then D(π) = (1,1,…,1,−b), so (1,−b) is a D-pair corresponding to the permutation π.

Next, let a ≥ 2 and let n = a + b. Define pi = 1 + (i − 1)a for i = 1,2,…,n. Also let πi be (uniquely) defined by

$$ \pi_{i} \equiv p_{i} \mod(a+b)\quad \text{ and } \quad \pi_{i} \in \{1, 2, \ldots, n\}. $$

We show that π = (π1, π2,…,πn) is a permutation with the desired properties.

Assume that πi = πj for some i, j with 1 ≤ i < jn. This implies that

$$ 1+(i-1)a \equiv 1+(j-1)a \mod(a+b) $$

and therefore

$$ ia \equiv ja \mod(a+b). $$

Since \(\gcd (a,a+b)=\gcd (a,b)=1\), we see that ij mod (a + b) and hence i = j. This proves that π is a permutation.

Next we consider the derivatives of π. For each i we consider two possibilities:

Case 1: (s − 1)(a + b) < pi < pi+ 1s(a + b) for some s. Then D(π)i = πi+ 1πi = a.

Case 2: pis(a + b) and pi+ 1 > s(a + b) for some s. The facts that pi+ 1 = pi + a and π is obtained by reducing the pi’s modulo a + b implies that

$$ \pi_{i+1}-\pi_{i}=a-(a+b)=-b. $$

Note that Case 2 will occur for some i as pn > n. In fact,

$$ p_{n}=1+(a+b-1)a>a+b=n, $$

as (a + b − 1)a > a + b − 1 because a ≥ 2.

This shows that {D(π)i : in − 1} = {a,−b}, and we conclude that (a,−b) is a D-pair and π is a realization of (a,−b). □

In terms of permutation matrices, the proof just given constructs an n × n permutation matrix P with n = a + b that realizes a D-pair (a,−b). The construction is easy to describe: for a ≥ 2 put a 1 in position (1,1) and, row by row, move a columns to the right computing column indices modulo (a + b), that is, move cyclically from row to row. For a = 1 we do the same, but start in position (1,2). The following example illustrates this construction.

Example 4

Consider a = 5, b = 13. Here 5 and 13 are relatively prime, so (5,− 13) is a D-pair. Then n = a + b = 18. The construction just discussed then gives the permutation

$$ \pi=(1,6,11,16,3,8,13,18,5,10,15,2,7,12,17,4,9,14)\in \mathcal{S}_{18} $$

whose corresponding permutation matrix is

(5)

The double horizontal lines indicate where the derivative changes from positive to negative. So

$$ D(\pi)=(5,5,5,-13,5,5,5,-13,5,5,-13,5,5,5,-13,5,5). $$

Our construction is a simple generalization of the standard full-cycle permutation matrix (a equals 1) on which the definition of a circulant matrix rests.

The inverse of π is given by

$$ \pi^{-1}=(1,12,5,16,9,2,13,6,17,10,3,14,7,18,11,4,15,8), $$

and

$$ D(\pi^{-1})=(11,-7,11,-7,-7,11,-7,11,-7,-7,11,-7,11,-7,-7,11,-7). $$

Thus π− 1 realizes the D-pair (11,− 7). Since the permutation matrix corresponding to π− 1 is the transpose of the permutation matrix (5), these differences result by cyclically considering the columns of (5).

Example 5

Let a = 4, b = 5. Then n = a + b = 9 and the construction above gives the following D-realization of the D-pair (4,− 5):

The permutation is \(\pi =(1,5,9,4,8,3,7,2,6) \in \mathcal {S}_{9}\) and its discrete derivative is D(π) = (4,4,− 5,4,− 5,4,− 5). We have that π− 1 = (1,8,6,4,2,9,7,5,3) and D(π− 1) = (7,− 2,− 2,− 2,7,− 2,− 2,− 2).

Corollary 1

Let a and b be relatively prime integers with 0 < a < b, and let π be the permutation constructed in the proof of Theorem 1. Let \(a^{\prime }\) be the inverse of a modulo a + b, and let \(b^{\prime }=a+b-a^{\prime }\). Then \((a^{\prime },b^{\prime })\) is a D-pair corresponding to the permutation π− 1.

3 Local and Global Variation of a Permutation

In this section we define the local and global variation of permutations and investigate some of their properties.

Let π = (π1, π2,…,πn) be a permutation of {1,2,…,n}. Then

  1. (a)

    The local variation of π is given by

    $$ \delta(\pi)=\max\{|\pi_{i+1}-\pi_{i}|:1\le i\le n-1\}, $$

    the maximum absolute value of the derivative values of π.

  2. (b)

    The global variation of π is given by

    $$ {\Delta}(\pi)=\sum\limits_{i=1}^{n-1} |\pi_{i+1}-\pi_{i}|=\|D(\pi)\|_{1}, $$

    the 1-norm of the discrete derivative.

The following proposition is clear.

Proposition 5

For a permutation \(\pi \in \mathcal {S}_{n}\),

$$ 1\le \delta(\pi)\le n-1 $$

with equality on the lower end if and only if π = ιn or ζn and equality on the upper end if and only if 1 and n are adjacent in π.

Now consider a 1-Costas permutation \(\pi \in \mathcal {S}_{n}\) whose derivative values are thus distinct. Then the lower bound is not attainable if n ≥ 3. Since there are (n − 1) differences and they can be positive or negative, then

$$ \delta(\pi) \ge \lceil n/2\rceil. $$
(6)

In fact, if n is even, the smallest (n − 1) values that the derivative could have are \(\pm 1, \pm 2,\ldots ,\pm (\frac {n}{2}-1)\) and either \(\frac {n}{2}\) or \(-\frac {n}{2}\). Thus (6) holds when n is even. Next, assume that n is odd. If \(\delta (\pi )=\frac {n-1}{2}\), then the values of the derivative D(π) are \(\{\pm 1, \pm 2,\ldots ,\pm \frac {n-1}{2}\}\) and hence \({\sum }_{i=2}^{n} (\pi _{i}-\pi _{i-1})=0\). Thus \({\sum }_{i=2}^{n} \pi _{i}={\sum }_{i=2}^{n}\pi _{i-1}\) implying that π1 = πn, a contradiction. Thus if n is odd, \(\delta (\pi )\ge \frac {n+1}{2}=\lceil n/2 \rceil \), and (6) is verified. For example, with n = 5, π = (1,3,4,2,5) is a 1-Costas permutation with D(π) = (2,1,− 2,3) and hence δ(π) = 3.

We show how to construct 1-Costas permutations attaining the lower bound (6) on the local variation. Let k ≥ 1. If k is even, say k = 2p, we define \(\pi _{(k)} \in \mathcal {S}_{k}\) by

$$ \pi_{(k)}=(p, p+1, p-1,p+2, p-2, p+3, p-3, \ldots, 1,k). $$

If k is odd, say k = 2p + 1, we define \(\pi _{(k)} \in \mathcal {S}_{k}\) by

$$ \pi_{(k)}=(p+1, p+2, p,p+3, p-1, p+4, p-2, \ldots, k,1). $$

Thus, the derivative of π(k) is

$$ D(\pi_{(k)})=(1,-2,3,-4, 5, -6, \ldots, \pm (k-1)), $$

where the signs alternate. Let \({\Pi }_{k}=P_{\pi _{(k)}}\) be the permutation matrix corresponding to π(k). For instance, π(4) = (2,3,1,4) and π(5) = (3,4,2,5,1), and

Recall that Lk is the backward identity matrix defined in the introduction. Observe that, for each permutation matrix \(P \in \mathcal {S}_{k}\)

$$ D(L_{k}P)=-D(P). $$

An example of a 1-Costas permutation attaining the lower bound above is π = (3,2,4,1,5,10,6,9,7,8) with derivative D(π) = (− 1,2,− 3,4,5,− 4,3,− 2,1). More generally we have the following proposition. In connection with the proof, it can be useful to consider the examples below.

Theorem 2

Let n ≥ 2 be a positive integer. Then there exists a 1-Costas permutation \(\pi ^{\ast } \in \mathcal {S}_{n}\) with \(\delta (\pi ^{\ast })=\lceil \frac {n}{2} \rceil \), the smallest possible value. Such a minimizing permutation π depends on the parity of n and is given by:

  1. (i)

    n is even, say n = 2k: π corresponds to the permutation matrix

    $$ P_{\pi^{\ast}}={\Pi}_{k} \oplus L_{k} {\Pi}_{k}, $$
    (7)
  2. (ii)

    n is odd, and n = 2k + 1 with k even: π corresponds to the permutation matrix

    $$ P_{\pi^{\ast}}= \left[ \begin{array}{cc} O & L_{k+1}{\Pi}_{k+1} \\ {\Pi}_{k} & O \end{array} \right], $$
    (8)
  3. (iii)

    n is odd, and n = 2k + 1 with k odd: π corresponds to the permutation matrix

    $$ P_{\pi^{\ast}}= \left[ \begin{array}{cc} O & L_{k+1}{\Pi}_{k+1}L_{k+1} \\ {\Pi}_{k}L_{k} & O \end{array} \right]. $$
    (9)

Moreover, in each case, π attains the minimum value of Δ(π) for 1-Costas permutations, and this minimum value is \(\frac {n^{2}}{4}\) when n is even, and \(\frac {(n-1)^{2}}{4}+1\) when n is odd.

Proof

(i) Assume that n is even, say n = 2k for some positive integer k. Consider the matrix \(P_{\pi ^{\ast }}\) in (7). If k is even, the derivative of \(P_{\pi ^{\ast }}\) is

$$ D(\pi^{\ast})=(1, -2, 3, -4, \ldots, k-1, k, -(k-1), k-2, \ldots, 2,-1). $$

If k is odd, the derivative of \(P_{\pi ^{\ast }}\) is

$$ D(\pi^{\ast})=(1, -2, 3, -4, \ldots, -(k-1), k, k-1, -(k-2), \ldots, 2,-1). $$

Thus, in either case, π is 1-Costas, and δ(π) = k = ⌈n/2⌉.(ii) Next, assume n is odd and n = 2k + 1 for some even positive integer k. Consider the matrix \(P_{\pi ^{\ast }}\) in (8). Then

$$ D(\pi^{\ast})_{k+1}=\pi^{\ast}_{k+2}-\pi^{\ast}_{k+1} = k/2 - (k+ k/2+1)=-(k+1), $$

so the derivative of \(P_{\pi ^{\ast }}\) is

$$ D(\pi^{\ast})=(k, -(k-1),k-2, \ldots, 2, -1, -(k+1), 1,-2, 3, -4, \ldots, k-1). $$

Thus, π is 1-Costas and δ(π) = k + 1 = ⌈n/2⌉.(iii) Assume n = 2k + 1 for some odd k, and consider the matrix \(P_{\pi ^{\ast }}\) in (9). Then

$$ D(\pi^{\ast})_{k+1}=\pi^{\ast}_{k+2}-\pi^{\ast}_{k+1} = (k+1)/2 - (k+ (k+1)/2+1)=-(k+1), $$

so the derivative of \(P_{\pi ^{\ast }}\) is

$$ D(\pi^{\ast})=(k, -(k-1),k-2, \ldots, 2, -1, -(k+1), 1,-2, 3, -4, \ldots, k-1). $$

Thus, π is 1-Costas and δ(π) = k + 1 = ⌈n/2⌉.

Finally, we consider Δ(π). When n = 2k is even, the derivatives are

$$ \{\pm 1, \pm 2, \ldots, \pm k\} $$

so clearly the minimum value of Δ(π) is then attained among 1-Costas permutations. When n = 2k + 1 is odd, the derivatives are

$$ \{\pm 1, \pm 2, \ldots, \pm (k-1), k, -(k+1)\} $$

which is the minimum value of Δ(π) among 1-Costas permutations as some derivative is at least k + 1 in absolute value due to (6). □

We now give three examples illustrating the three cases in Theorem 2.

Example 6

Let n = 12, so ⌈n/2⌉ = 6. Then the matrix \(P_{\pi ^{\ast }}\) in (7) is

figure f

where the rows of A2 are in the reverse order of those of A1. The derivative is computed as D(π) = (1,− 2,3,− 4,5,6,− 5,4,− 3,2,− 1) and δ(π) = 6.

Example 7

Let n = 13, so ⌈n/2⌉ = 7. Then the matrix \(P_{\pi ^{\ast }}\) in (8) is

The derivative is computed as D(π) = (6,− 5,4,− 3,3,− 1,− 7,1,− 2,3,− 4,5) and δ(π) = 7.

Example 8

Let n = 11, so ⌈n/2⌉ = 6. Then the matrix \(P_{\pi ^{\ast }}\) in (9) is

figure h

The derivative is computed as D(π) = (5,− 4,3,− 2,1,− 6,− 1,2,− 3,4) and δ(π) = 6.

We now determine the extreme values of the global variation for general permutations. Clearly, \(\min \limits _{\pi \in \mathcal {S}_{n}} {\Delta }(\pi )=n-1\) and this minimum is attained only for the identity and the anti-identity permutations. The problem of maximizing Δ(π) is more complex. Define

$$ {\Delta}^{\ast}_{n}=\max\{\Delta(\pi): \pi \in \mathcal{S}_{n}\}. $$

It is convenient to treat the even and odd cases separately.

Let n be even, say n = 2k, and let π = (π1, π2,…,πn) be a permutation. We say that π is mid-alternating if for all i < n the consecutive entries of π satisfy either (i) πik, πi+ 1k + 1, or (ii) πik + 1, πi+ 1k.

Example 9

Let n = 8, so k = 4. The permutation π = (4,6,2,7,3,8,1,5) is mid-alternating, and the corresponding permutation matrix is

figure i

Of two 1’s in consecutive rows, one is to the left of the double-vertical line and one is to the right.

Theorem 3

Let n be even, and let \(\pi =(\pi _{1}, \pi _{2}, \ldots , \pi _{n})\in \mathcal {S}_{n}\). Then \({\Delta }(\pi )={\Delta }^{\ast }_{n}\) if and only if π is mid-alternating and \(\{\pi _{1}, \pi _{n}\}=\{\frac {n}{2},\frac {n}{2}+1\}\). Moreover, \({\Delta }_{n}^{\ast }=(n^{2}-2)/2\).

Proof

Let π = (π1, π2,…,πn) be a permutation. In the expression for Δ(π) we replace each |πi+ 1πi| by (πi+ 1πi) times the sign of this difference. This gives

$$ {\Delta}(\pi)=\sum\limits_{i=1}^{n-1} |\pi_{i+1}-\pi_{i}| = 2\sum\limits_{i \in V_{+}} \pi_{i} + 0\sum\limits_{i \in V_{0}} \pi_{i} - 2\sum\limits_{i \in V_{-}} \pi_{i} +s_{1}\pi_{1}+s_{n}\pi_{n}, $$
(10)

where V+ (resp. V; V0) are those i ∈{2,3,…,n − 1} such that πi is larger than both πi− 1 and πi+ 1 (resp., smaller; in between), and s1, sn = ± 1.

Note that |V+|≤ n/2 − 1 as i and i + 1 cannot both belong to V+. Similarly, |V|≤ n/2 − 1. It therefore follows from (10) that an upper bound on Δ(π) is the sum of twice the (n/2 − 1) largest integers in {1,2,…,n} with the next largest integer (n/2 + 1), and subtracting twice the sum of the (n/2 − 1) smallest integers in {1,2,…,n} with the next smallest integer (n/2). In fact, here we replace some of the zeros in (10) corresponding to V0 by the difference of k th largest and the k th smallest number in {1,2,…,n}, where k < n/2, so this difference is positive. Thus Δ(π) is bounded by α −β where

$$ \begin{array}{@{}rcl@{}} \alpha&=& 2\left( n+(n-1)+\cdots+\left( \frac{n}{2}+2\right)\right) +\left( \frac{n}{2}+1\right), \\ \upbeta&=&2\left( 1+2+\cdots+\left( \frac{n}{2}-1\right)\right)+\frac{n}{2}. \end{array} $$

Note, for clarity, that because of the factor of 2 in both α and β, each is the sum of (n − 1) integers taken from {1,2,…,n}. An elementary computation gives that

$$ \alpha-\upbeta=\frac{n^{2}-2}{2}, $$

and, as π was arbitrary, we have shown that \({\Delta }_{n}^{\ast } \le (n^{2}-2)/2\).

In order that Δ(π) = (n2 − 2)/2, for a specific permutation π, it follows from our bounding argument that V0 = , and therefore the signs of the derivatives must alternate (as consecutive entries cannot both be 2, or both be − 2). Moreover, each of πi (iV+) must be more than n/2 and each of πi (iV) must be less than or equal to n/2. In addition, since it is π1 and πn that enter only once in the computation of Δ(π), we must have {π1, πn} = {n/2,n/2 + 1} where, if π1 = n/2, then π2 > n/2, then π3 < n/2 and so forth, while if π1 = n/2 + 1, then π2 < n/2 + 1, then π3 > n/2 + 1, and so forth, that is, π must be mid-alternating. □

The permutation π in Example 9 satisfies the conditions of Theorem 3, so \({\Delta }(\pi )={\Delta }^{\ast }_{8}=31\).

We turn to the case when n is odd, say n = 2k + 1, and let π = (π1, π2,…,πn) be a permutation. We say that π is mid-alternating if for all i < n the consecutive entries of π satisfy either (i) πik + 1, πi+ 1k + 1, or (ii) πik + 1, πi+ 1k + 1.

The following result may be shown using the same type of arguments as in the proof of Theorem 3, so we therefore omit the proof.

Theorem 4

Let n be odd, and let \(\pi =(\pi _{1}, \pi _{2}, \ldots , \pi _{n})\in \mathcal {S}_{n}\). Then \({\Delta }(\pi )={\Delta }^{\ast }_{n}\) if and only if π is mid-alternating and {π1, πn} equals either \(\{\frac {n-1}{2},\frac {n+1}{2}\}\) or \(\{\frac {n+1}{2}, \frac {n+3}{2}\}\). Moreover, \({\Delta }_{n}^{\ast }=\frac {3n^{2}-6n-13}{4}\).

Example 10

The permutation π = (4,5,2,7,1,6,3) satisfies the conditions of Theorem 3, and \({\Delta }(\pi )={\Delta }^{\ast }_{7}=23\). The corresponding permutation matrix is

figure j

4 Other Properties of the Discrete Derivative

We observe that \(\min \limits _{\pi \in \mathcal {S}_{n}} \max \limits _{i} |D(\pi )_{i}| =1\), and this minimum is attained for the identity and anti-identity permutations. Now we determine \(\max \limits _{\pi \in \mathcal {S}_{n}} \min \limits _{i} |D(\pi )_{i}|\).

Theorem 5

$$ \max\limits_{\pi \in \mathcal{S}_{n}} \min\limits_{i} |D(\pi)_{i}| =\lfloor n/2 \rfloor. $$

Proof

Define \(\hat {D}^{(n)} := \max \limits _{\pi \in \mathcal {S}_{n}} \min \limits _{i} |D(\pi )_{i}|\). We initially prove that \(\hat {D}^{(n)} \le \lfloor n/2 \rfloor \).

Let \(\pi \in \mathcal {S}_{n}\), and define k = ⌊n/2⌋. Assume \(\min \limits _{i} |D(\pi )_{i}| \ge k+1\). Let P be the permutation matrix corresponding to π. Let i be the row of the unique 1 in column k + 1. Then i has at least one adjacent row, say it is row i − 1 (the argument is similar if it is row i + 1, or both). Row i − 1 has a unique 1, say in column p. But then

$$ |D(\pi)_{i-1}|=|\pi_{i}-\pi_{i-1}| =|k+1-p|\le k, $$

a contradiction.

Therefore \(\min \limits _{i} |D(\pi )_{i}| \le k=\lfloor n/2 \rfloor \) and

$$ \hat{D}^{(n)}=\max\limits_{\pi \in \mathcal{S}_{n}} \min\limits_{i} |D(\pi)_{i}| \le \lfloor n/2 \rfloor. $$

It remains to construct a permutation \(\pi \in \mathcal {S}_{n}\) with \(\min \limits _{i} |D(\pi )_{i}| = \lfloor n/2 \rfloor \).

If n is even, say n = 2k, let

$$ \pi^{(n)}=(k+1, 1, k+2, 2, k+3, 3, \ldots, n, k). $$

Then D(π(n)) = (k, k + 1,k, k + 1,…,k), so \(\min \limits _{i} |D(\pi )_{i}| = k\), as desired.

If n is odd, say n = 2k + 1, let

$$ \pi^{(n)}=(1, k+1, 2, k+2, 3, k+3, \ldots, k-1, n-1,k+1). $$

Then D(π(n)) = (k + 1,k, k + 1,k,…,k, k + 1), so \(\min \limits _{i} |D(\pi )_{i}| = k\), as desired. □

Let P(n) be the permutation matrix corresponding to the extreme permutation π(n) constructed in the proof of Theorem 5. Note that when n is even

$$ P^{(n+1)}=J_{1} \oplus P^{(n)}. $$

Example 11

The extreme permutation matrices P(6) and P(7) are given by

figure k

Here, \(\hat {D}^{(6)}=\hat {D}^{(7)}=3\). The permutation in Example 1 also attains \(\hat {D}^{(7)}\).

Next we discuss an analogue of convexity for the discrete derivative. We say that a permutation \(\pi =(\pi _{1},\pi _{2},\ldots ,\pi _{n}) \in \mathcal {S}_{n}\) and its corresponding permutation matrix P = P(π) are convex provided its derivatives are increasing, i.e.,

$$ \pi_{2}-\pi_{1} \le \pi_{3}-\pi_{2} \le {\cdots} \le \pi_{n}-\pi_{n-1}. $$

This is equivalent to

$$ \pi_{i} \le \frac{1}{2}(\pi_{i-1}+\pi_{i+1}) \quad (2 \le i \le n-1). $$

For instance, both the identity matrix and the backward identity matrix are convex. A class of convex permutation matrices is obtained by a modification of the matrix πk defined before Theorem 2. Let \({\Pi }^{\ast }_{k}\) be obtained from πk by a plane rotation of the matrix by a counter-clockwise rotation of 90 degrees. For example,

figure l

which corresponds to the permutation (6,4,2,1,3,5) with derivative (− 2,− 2,− 1,2,2). Then we see that \({\Pi }^{\ast }_{k}\) is a convex permutation matrix for every k.

Let P = [pij] be an n × n subpermutation matrix, i.e., a (0,1)-matrix with at most one 1 in every row and column. If P contains a total of k 1’s, then P corresponds to a subsequence (i1, i2,…,ik) of a permutation of {1,2,…,n}. Define Ik(P) = {i : pij = 1 for some jk}, the set of rows containing a 1 in the first k columns. An interval in a set {1,2,…,n} is a set of consecutive integers I = {k, k + 1,…,l} for some 1 ≤ kln, and its length is |I| = lk + 1.

Lemma 2

If P is a convex permutation matrix of order n, then Ik(P) is an interval of length k for each kn.

Proof

Let π be the permutation corresponding to P. For k = 1 the statement is clearly true. So, assume k ≥ 2 and that Ik(P) is not an interval. Then there are i1, i2, i3Ik(P) with i1 < i2 < i3 and the submatrix P1 consisting of the first k columns of P has a 1 in rows i1 and i3, but not in row i2. This clearly implies that there must exist an s such πs+ 1πs > 0 > πs+ 2πs+ 1. So, the derivative is not increasing, and P is not convex, a contradiction. Therefore, Ik(P) is an interval. □

Note that the converse of the implication in Lemma 2 is not true; for instance, consider the permutation matrix

figure m

Then Ik(P) is an interval of length k for each kn, but P is not convex.

Let P be an n × n subpermutation matrix. Let kn. We say that P = [pij] is k-convex if (i) each of the first k columns contains exactly one 1, (ii) Ik(P) is an interval, say equal to {r, r + 1,…,s}, and (iii) πi+ 1πiπi+ 2πi+ 1 for i = r, r + 1,…,s − 2 where πi is the unique column in P containing a 1 in row i. Now, let P be such a subpermutation matrix which is k-convex and where columns k + 1,…,n are all zero. Define the following (possibly empty) set \(I^{\ast }_{k}(P)\) of cardinality at most 2:

  1. (i)

    Let \(r-1 \in I^{\ast }_{k}(P)\) if r > 1, and the matrix obtained from P by putting a 1 in position (r − 1,k + 1) is (k + 1)-convex (this means that the derivative in row r − 1 is less that the derivative in row r);

  2. (ii)

    Let \(s+1 \in I^{\ast }_{k}(P)\) if s < n, and the matrix obtained from P by putting a 1 in position (s + 1,k + 1) is (k + 1)-convex (this means that the derivative in row s − 1 is less that the derivative in row s).

It follows from Lemma 2 that if P is a convex permutation matrix, then P is also k-convex for each kn. We use this property to construct convex permutation matrices of order n by the following algorithm.

figure n

Lemma 3

If Algorithm 1 does not terminate prematurely, i.e., Step 3a does not occur, then the resulting permutation matrix is convex. Any convex permutation matrix may be constructed by Algorithm 1.

Proof

We may assume n ≥ 2. Consider Algorithm 1, and let pi1 = 1. For k = 1, we get

$$ I^{\ast}_{1}(P)= \left\{ \begin{array}{ll} \{2\} &\quad \text{ if } i=1, \\ \{i-1,i+1\} &\quad \text{ if } 1<i<n, \\ \{n-1\} &\quad \text{ if } i=n. \end{array} \right. $$

Thus, after the step for k = 1, the resulting matrix P is 2-convex. It is not hard to see that the conditions on the set \(I^{\ast }_{k}(P)\) assure that, when this set is nonempty for each k, the final matrix P constructed will be a permutation matrix with increasing derivatives and therefore it is convex.

Next, let Q = [qij] be a convex permutation matrix. We need to show that Q may be constructed by Algorithm 1 by suitable choice of the element in Step 3b in each iteration. Assume that Algorithm 1, after k iterations, has constructed a matrix P whose first k columns coincide with those of Q (for k = 1 this is clear). Thus, Ik(P) and Ik(Q) are equal, say equal to {r, r + 1,r + k − 1}. Moreover, as Ik+ 1(Q) is also an interval, the unique 1 in column k + 1 of Q must be in row r − 1 or r + k, so assume first it is in row r − 1. Since Q is convex, π = π(Q) satisfies πrπr− 1πr+ 1πr which means that \(r-1 \in I^{\ast }_{k}(Q)=I^{\ast }_{k}(P)\), and therefore, in Algorithm 1, we can let column k + 1 of P have its 1 in row r − 1. A similar construction works when the 1 in column k + 1 of Q is in row r + k. Thus, in any case, the k + 1 first columns of P equal the corresponding columns of Q. So, by induction, we may obtain P = Q by suitable such choices in Algorithm 1. □

Theorem 6

The set of convex permutations of order n consists of

  1. (i)

    (1,2,…,n) (identity),

  2. (ii)

    (n,1,2,…,n − 1),

  3. (iii)

    (n − 1,1,2,…,n − 2,n),

  4. (iv)

    \({\Pi }^{\ast }_{n}\),

and the permutations obtained by reversing the order in each of these permutations.

Proof

We consider Algorithm 1, and construct a convex matrix P = [pij] and corresponding permutation π = π(P). By symmetry, we may assume

$$ p_{i1}=p_{i+1,2}={\cdots} = p_{i+k-1,k}=1 $$
(11)

for some i, and with k ≥ 2 maximal with this property. We discuss different cases.

Case 1::

k = n. Then i = 1 and P = In.

Case 2::

k = n − 1. Then i = 2 and π(P) = (n,1,2,…,n − 1).

Case 3::

k = n − 2. Then it is easy to see that, by convexity, that the only possibility is i = 2. This gives the permutation (n − 1,1,2,…,n − 2,n).

Case 4::

3 ≤ kn − 3. Then (11) holds and pi− 1,k+ 1 = 1. Then pi− 2,k+ 2 = 0, otherwise pi− 2,k+ 2 = 1 and then πi− 1πi− 2 = k + 1 − (k + 2) = − 1 and πiπi− 1 = 1 − (k + 1) = −k ≤− 2 which contradicts convexity. By the algorithm, pik, k+ 2 = 1. This, however, follows by checking the derivatives (at the boundary of the interval), that \(I^{\ast }_{k+2}= \emptyset \) as 3 ≤ kn − 3. Thus, there is no convex permutation matrix in this case.

Case 5::

k = 2. Then by checking the possible derivatives at the boundary of the interval Is(P) for each s, one derives that pi1 = pi+ 1,2 = pi− 1,3 = 1 and then pi+ 1,4 = 1, pi− 2,5 = 1 etc. The only possibility is then that i = ⌊n/2⌋ and we obtain the matrix \({\Pi }^{\ast }_{n}\).

Example 12

The convex permutation matrices of order n = 6 are the following 4 matricesand those additional 4 obtained by reordering rows in the opposite order.

figure o

5 Coda

In this concluding section, we discuss some additional properties of permutations involving their derivatives and mention some questions for possible further consideration.

For permutations one may consider properties similar to Lipschitz properties of functions defined on the real line. We say that a permutation π, and the corresponding permutation matrix Pπ, is L-Lipschitz if

$$ |\pi_{i} -\pi_{j}| \le L|i-j| \quad (i,j \le n). $$
(12)

Since we only consider permutations, the only values of interest here are L = 1,2,…,n − 1. It is easy to verify that (12) is equivalent to the simplified condition that |πi+ 1πi|≤ L (i < n), or, equivalently, \(\max \limits _{i} |D(\pi )_{i}| \le L\). The only permutations that are 1-Lipschitz are the identity and the anti-identity permutations.

Question 1

Is there a characterization of 2-Lipschitz permutations, more generally, of L-Lipschitz permutations?

Checking if a given permutation of order n has the 1-Costas property is easily done: compute all the (n − 1) derivatives, requiring (n − 1) arithmetic operations, and then sort these numbers (\(O(n \log n)\) operations suffice).

Every n × n permutation matrix P with the 1-Costas property may be constructed, starting with the zero matrix, by a simple algorithm which, however, may result in failure:

  1. 1.

    Place a 1 in some position in the first row.

  2. 2.

    For i = 2,3,…,n,

    1. (a)

      determine the permitted positions in row i, i.e., those positions (i, j) that are (i) not in a column already occupied by a 1, and (ii) not in any 3-line in rows ≤ i with two 1’s, and (iii) not in any parallelogram in rows ≤ i with three 1’s,

    2. (b)

      choose, if possible, a permitted position in row i and place a 1 there.

If the algorithm does not stop before n ones have been placed, the resulting matrix is a permutation matrix satisfying the 1-Costas property.

Since the derivative of an L-Lipschitz permutation of order n can have at most 2L values, an L-Lipschitz permutation cannot have the 1-Costas property if n is large enough.

Table 1 gives the values of the number \(C_{n}^{(1)}\) of 1-Costas permutations of order n for n ≤ 10. In the table, \(F_{n}^{(1)}=100 \cdot C_{n}^{(1)}/n!\) is the fraction of the permutation matrices that have the 1-Costas property. A table of the number of Costas permutations of order n for n ≤ 29 can be found in [12].

Table 1 Permutations and the 1-Costas property

Question 2

Is \(F_{n}^{(1)}\) a decreasing function of n? Does \(\lim _{n\rightarrow \infty } F_{n}^{(1)}=0\)?

A centrosymmetric permutation of order n is a permutation π = (i1, i2,…,in) such that ik + in+ 1−k = n + 1 for k = 1,2,…,n. The corresponding n × n centrosymmetric permutation matrix is characterized by the property that it is invariant under a 180 degree rotation. The permutation in Example 1 is centrosymmetric and has a palindromic discrete derivative.

Example 13

Let n = 8 and π = (2,3,5,8,1,4,6,7) with corresponding permutation matrix

figure p

Then π and Pπ are centrosymmetric. The difference triangle is

figure q

Thus except for those repeats (highlighted) which follow from the centrosymmetric property, the difference triangle has no other repeats in its rows. Denoting π as (i1, i2, i3, i4, i5, i6, i7, i8), the entries in the center of the difference triangle are 9 − 2i4,9 − 2i3,9 − 2i2,9 − 2i1.

We define a Costas-centrosymmetric permutation to be a centrosymmetric permutation (i1, i2,…,in) whose difference table has no repeats other than those required by the centrosymmetric property. Note that the required repeats are of the form ab = (n + 1 − b) − (n + 1 − a). Equivalently, we consider only the differences πjπi where 1 ≤ i < jn + 1 − i. Example 13 is a Costas-centrosymmetric permutation.

The Costas permutation (1,3,9,10,13,5,15,11,16,14,8,7,4,12,2,6) of order n = 16 appears in [7]. Reversing the second half of this permutation gives the Costas-centrosymmetric permutation (1,3,9,10,13,5,15,11,6,2,12,4,7,8,14,16). In [7] its “anti-reflective symmetry” is noted.

If we take the Costas-centrosymmetric permutation (2,4,3,1,8,6,5,7) of order 8 with difference triangle

$$ \begin{array}{rrrrrrrrrrrrrrr} 2&&4&&3&&1&&8&&6&&5&&7\\ &2&&-1&&-2&&7&&-2&&-1&&2&\\ &&1&&-3&&5&&5&&-3&&1&&\\ &&&-1&&4&&3&&4&&-1&&&\\ &&&&6&&2&&2&&6&&&&\\ &&&&&4&&1&&4&&&&&\\ &&&&&&3&&3&&&&&&\\ &&&&&&&5&&&&&&& \end{array} $$

and reverse the last half to get (2,4,3,1,7,5,6,8), we do not get a Costas permutation since row 1 of its difference triangle already gives a repeat:

$$ \begin{array}{rrrrrrrrrrrrrrr} 2&&4&&3&&1&&7&&5&&6&&8\\ &2&&1&&-2&&6&&-2&&1&&2&\\ &&1&&-3&&4&&4&&-1&&3&& \end{array}. $$

Let n = 2m where m is an even integer. Define a Costas half-permutation of order m to be a sequence (a1, a2,…,am) such that {a1, a2,…,am} consists of one integer from each of the pairs {i,2m + 1 − i} for i = 1,2,…,m/2 and each of the rows of its corresponding difference triangle does not have any repeats. (Note that to construct a Costas half-permutation of order m one has to choose an integer in each pair {i,2mi} and then order them in some way.)

Example 14

Let m= 6. Then choosing one integer from each of the pairs {1,12},{2,11}, {3,10},{4,9},{5,8},{6,7}, namely, 1, 2, 10, 9, 8, 7, we get a Costas half-permutation:

$$ \begin{array}{rrrrrrrrrrr} 1&&8&&10&&9&&2&&7\\ &7&&2&&-1&&-7&&5&\\ &&9&&1&&-8&&-2&&\\ &&&8&&-6&&-3&&&\\ &&&&1&&-1&&&&\\ &&&&&6&&&&& \end{array}. $$

An interesting question is:

Question 3

Let m and n be positive integers with mn. Define a Costas m-subpermutation of order n to be a sequence a1, a2,…,am of distinct integers taken from {1,2,…,n} whose difference table does not contain a repeat in any row. For each positive integer n, let γn be the largest integer m such that there is a Costas m-subpermutation of order n. Thus γnn with equality if and only if there exists a Costas permutation of order n. What is the best constant c such that γncn for all n? Clearly, if there exists a Costas permutation of order m, then for all nm, γnm.

Rather than applying the Costas property to a sequence of m integers taken from {1,2,…,n}, one can attach signs to a permutation. Let π be a signed permutation of order n, that is, π = (ii, i2,…,in) where |π| = (|i1|,|i2|,…,|in|) is a permutation of {1,2,…,n}. Then π is a Costas-signed permutation provided the difference triangle of (ii, i2,…,in) (note: not the difference triangle of |π|) does not have any repeats in its rows. Allowing negative signs makes it easier to satisfy the Costas property of no repeats in a row.

Example 15

Let n = 4 and π = (2,4,− 1,− 3). Then the difference triangle is

$$ \begin{array}{rrrrrrr} 2&&4&&-1&&-3\\ &2&&-5&&-2&\\ &&-3&&-7&&\\ &&&-5&&& \end{array}, $$

so that this is a Costas-signed permutation of order 4.

Question 4

Does there exists a Costas-signed permutation of order n for every positive integer n? For each integer n ≥ 1, find a construction for a Costas-signed permutation of order n.

Finally we note that higher dimensional Costas permutations have been investigated; see e.g. [11] and the references therein.