# Costas array

In mathematics, a Costas array can be regarded geometrically as a set of n points centered on the squares of an n×n square tiling, such that each row or column contains only one point, and that all of the n(n − 1)/2 displacement vectors between each pair of dots are distinct. This results in an ideal "thumbtack" auto-ambiguity function, making the arrays useful in applications such as sonar and radar. Costas arrays can be regarded as two-dimensional cousins of the one-dimensional Golomb ruler construction, and, as well as being of mathematical interest, have similar applications in experimental design and phased array radar engineering.

Costas arrays are named after John P. Costas, who first wrote about them in a 1965 technical report. Independently, Edgar Gilbert also wrote about them in the same year, publishing what is now known as the logarithmic Welch method of constructing Costas arrays.

## Numerical representation

A Costas array may be represented numerically as an n×n array of numbers, where each entry is either 1, for a point, or 0, for the absence of a point. When interpreted as binary matrices, these arrays of numbers have the property that, since each row and column has the constraint that it only has one point on it, they are therefore also permutation matrices. Thus, the Costas arrays for any given n are a subset of the permutation matrices of order n.

Arrays are usually described as a series of indices specifying the column for any row. Since it is given that any column has only one point, it is possible to represent an array one-dimensionally. For instance, the following is a valid Costas array of order N = 4:

 0 0 0 1 0 0 1 0 1 0 0 0 0 1 0 0

There are dots at coordinates: (1,2), (2,1), (3,3), (4,4)

Since the x-coordinate increases linearly, we can write this in shorthand as the set of all y-coordinates. The position in the set would then be the x-coordinate. Observe: {2,1,3,4} would describe the aforementioned array. This makes it easy to communicate the arrays for a given order of N.

## Known arrays

All Costas array orders are known for orders 1 through 29 Enumeration is as in the following table.

Order Number
1 1
2 2
3 4
4 12
5 40
6 116
7 200
8 444
9 760
10 2160
11 4368
12 7852
13 12828
14 17252
15 19612
16 21104
17 18276
18 15096
19 10240
20 6464
21 3536
22 2052
23 872
24 200
25 88
26 56
27 204
28 712
29 164

Enumeration of known Costas arrays to order 200, order 500 and to order 1030  are available. Although these lists and databases of these Costas arrays are likely near complete, other Costas arrays with orders above 29 that are not in these lists may exist.

## Constructions

### Welch

A Welch–Costas array, or just Welch array, is a Costas array generated using the following method, first discovered by Edgar Gilbert in 1965 and rediscovered in 1982 by Lloyd R. Welch. The Welch–Costas array is constructed by taking a primitive root g of a prime number p and defining the array A by $A_{i,j}=1$ if $j\equiv g^{i}{\bmod {p}}$ , otherwise 0. The result is a Costas array of size p − 1.

Example:

3 is a primitive element modulo 5.

31 = 3 ≡ 3 (mod 5)
32 = 9 ≡ 4 (mod 5)
33 = 27 ≡ 2 (mod 5)
34 = 81 ≡ 1 (mod 5)

Therefore, [3 4 2 1] is a Costas permutation. More specifically, this is an exponential Welch array. The transposition of the array is a logarithmic Welch array.

The number of Welch–Costas arrays which exist for a given size depends on the totient function.

### Lempel–Golomb

The Lempel–Golomb construction takes α and β to be primitive elements of the finite field GF(q) and similarly defines $A_{i,j}=1$ if $\alpha ^{i}+\beta ^{j}=1$ , otherwise 0. The result is a Costas array of size q − 2. If α + β = 1 then the first row and column may be deleted to form another Costas array of size q − 3: such a pair of primitive elements exists for every prime power q>2.

### Extensions by Taylor, Lempel, and Golomb

Generation of new Costas arrays by adding or subtracting a row/column or two with a 1 or a pair of 1's in a corner were published in a paper focused on generation methods and in Golomb and Taylor's landmark 1984 paper.

More sophisticated methods of generating new Costas arrays by deleting rows and columns of existing Costas arrays that were generated by the Welch, Lempel or Golomb generators were published in 1992. There is no upper limit on the order for which these generators will produce Costas arrays.

### Other methods

Two methods that found Costas arrays up to order 52 using more complicated methods of adding or deleting rows and columns were published in 2004 and 2007.