<<

Advances in of Communications Web site: http://www.aimSciences.org Volume 2, No. 1, 2008, 35–54

DUALITY THEORY FOR SPACE-TIME CODES OVER FINITE FIELDS

David Grant Department of Mathematics University of Colorado at Boulder Boulder, CO 80309-0395, USA Mahesh K. Varanasi Department of Electrical and Computer Engineering University of Colorado at Boulder Boulder, CO 80309-0425, USA (Communicated by Iwan Duursma)

Abstract. We further the study of the duality theory of linear space-time codes over finite fields by showing that the only finite linear “omnibus” codes (defined herein) with a duality theory are the column distance codes and the codes. We introduce weight enumerators for both these codes and show that they have MacWilliams-type functional equations relating them to the weight enumerators of their duals. We also show that the complete weight enu- merator for finite linear sum-of-ranks codes satisfies such a functional equation. We produce an analogue of Gleason’s Theorem for formally self-dual linear fi- nite rank codes. Finally, we relate the duality matrices of n × n linear finite rank codes and length n vector codes under the Hamming metric.

1. Introduction

A space-time code S is a finite subset of the M ×T complex matrices MatM×T (C) used to describe the amplitude-phase modulation of a radio frequency carrier signal in a frame of T symbols transmitted over each of M antennas. We call the elements of S codewords. The main design criterion in the construction of space-time codes is the error correcting capability of the code, so one seeks to minimize the pair-error probability of decoding one codeword C1 into another C2. This probability will depend on how the wireless channel is modeled, but one can typically bound this probability by an asymptotic in the inverse of the signal-to-noise ratio ν, whose lead term is a d multiple of (1/ν) for some integer d. We call d = d(C1, C2) the diversity of the pair (C1, C2). The minimum value dS for d(C1, C2) over all C1 6= C2, C1, C2 ∈ S is called the diversity order of S. Hence one seeks to maximize dS . Channels for which space-time codes have been considered and diversity order defined as above include:

2000 Mathematics Subject Classification: 94B05, 94B60, 11T71. Key words and phrases: Linear codes, space-time codes, finite fields. This work was partially supported by NSF grant CCF 0434410. The first named author was enjoying the hospitality of the Mathematical Sciences Research Institute as this paper was being completed. He would also like to thank Laurence Mailaender for continued encouragement.

35 c 2008 AIMS-SDU 36 D. Grant and M. K. Varanasi

Example 1. Fast-fading Rayleigh channels with additive white Gaussian noise (AWGN). Here the diversity order d(C1, C2) is the number of non-zero columns of C1 − C2.

Example 2. Quasi-static fading Rayleigh channels with AWGN. Here d(C1, C2)= rk(C1 − C2), the rank of C1 − C2. Example 3. Channels which are a combination of those in Example 1 and 2, a multiple block fading channel with AWGN, which is quasi-static for each of ℓ ℓ blocks. Here each codeword C consists of ℓ matrices {Ci}i=1, each of size M × ρ. ℓ The diversity order d(C1, C2) is i=1 rk((C1)i − (C2)i). P Example 4. Rayleigh fading channels with AWGN, where we allow for temporal correlation [24]. We need some notation. Let 1IJ denote the I × J whose entries are all 1. If D is an M ×T matrix and A is a matrix of size S ×T , we let D♯A be the MS × T matrix whose rows are indexed by the set {(i, j)|1 ≤ i ≤ M, 1 ≤ j ≤ S} ordered lexicographically, and whose columns are indexed by 1 ≤ k ≤ T , and whose (i, j)k-th entry is DikAjk. In other words, D♯A = (D⊗1S1)⊙(1M1⊗A), where ⊙ and ⊗ respectively denote the Hadamard and Kronecker products. (Recall that if E is an M × T matrix and F is an M ′ × T ′ matrix, and if the sets {(i,i′)|1 ≤ i ≤ M, 1 ≤ i′ ≤ M ′} and {(j, j′)|1 ≤ j ≤ T, 1 ≤ j′ ≤ T ′} are ordered lexicographically, ′ ′ then the (i,i )(j, j )-th entry of E ⊗ F is Eij Fi′ j′ .) Let U denote the number of receive antennas. Suppose there is a U × M matrix H(t) which describes the fading of the tth-column of a codeword, for 1 ≤ t ≤ T , and that the elements of H(t) are i.i.d. zero-mean complex Gaussian variables, but that the T -length vector of each of the entries of H(t) for 1 ≤ t ≤ T has a T ×T temporal correlation matrix Σ. Write Σ = B∗B, where B∗ is the conjugate transpose of B. Then in [11], using [24], it is shown that for codewords C1, C2,

d(C1, C2)=rk (C1 − C2)♯B .  Then the diversity orders in Example 1, 2 and 3 are all special cases of this omnibus formula for different choices of B (respectively, B is the T ×T identity IT ; B =1T T ; and B is the block with ℓ blocks each consisting of 1ρρ). Note that all the diversity orders in Example 1–4 make sense for matrices over any . In a recent paper [11], the authors showed that there are appropriate notions of approximation, equivalence, and lifting, such that each space-time code above is arbitrarily well approximated by one lifted from an equivalent code over a finite field. This adds impetus to the study of space-time codes over finite fields. Let q be a power of a prime and Fq denote the field with q elements. We call subsets of MatM×T (Fq), respectively endowed with the diversity orders from Example 1–4 above, finite column distance codes, finite rank codes, finite sum-of- ranks codes, and because the others are specializations of it, finite omnibus codes, and denote their diversity orders as dcd, drk, dsor, and dom. Not only can such finite codes be used in essence to build all space-time codes (see [10], [13], [17], [18], iteLK1, and [20] for some constructions), they are inter- esting mathematical objects in their own right, with a long pedigree. Gabidulin [9] employed finite column distance and finite rank codes for studying crisscross errors in data storage. Finite rank codes, also referred to as q-codes, appeared be- fore then. A crowning achievement in their study is due to Delsarte, who proved a

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 Duality theory for space-time codes 37

“MacWilliams Identity” for finite rank codes, both from the points of view of as- sociation schemes (see [2], [3]), and also from the point of view of character theory (see [4], [5]). Earlier, Camion had considered rank as a weight for square matrices [1]. The goal of this paper is to further the theory of duality for space-time codes over finite fields. We do this in two ways.

I) For any fixed B ∈ MatS×T (Fq), we get a diversity order dom, which we can use to define a weight

wtom(C)= dom(C, 0) = rk(C♯B) ⊥ on MatM×T (Fq). Recall that for a subspace C of MatM×T (Fq), its dual C is the orthogonal space to C with respect to the inner product A · B = Tr(ABt), where Tr denotes the trace and t denotes the transpose. For any subspace C ∈ MatM×T (F ), we can define its spectrum with respect to wtom as the row vector a = (ai) of length T +1 where ai = #{C ∈ C| wtom(C)= i}. The minimum requirement one needs for a “duality theory” is that a(C⊥) is a function of a(C) for every subspace C of MatM×T (Fq). Our first result is that, up to some notions of equivalence we will make precise, the only finite omnibus codes which have a duality theory are those in Example 1 and 2: the finite column distance codes, and the finite rank codes. (However, we will show that the linear finite sum-of-ranks codes of Example 3 satisfy a MacWilliams-type identity when the complete weight spectrum is considered.) As noted by Gabidulin, finite column ∗ distance codes can be interpreted as vector codes of length T over FqM under the Hamming metric [9]. This will enable us to interpret the duality theory of the former in terms of the duality theory of the latter. This lets us focus our main attention on finite rank codes. II) Although the “MacWilliams Identity” for linear finite rank codes was worked out by Delsarte 30 years ago, there is more to be done [2]. He gave an explicit matrix β such that 1 a(C⊥)= a(C)β, |C| and proved that its entries are values of q-Krawtchouk polynomials [3], [4], [5]. This is a direct analogue of the corresponding result for linear vector codes under the Hamming metric, where there is a matrix α such that 1 a(C⊥)= a(C)α, |C| where a(C) is the Hamming spectrum of C and the entries of α are values of Krawtchouk polynomials. But the MacWilliams identities for linear vector codes embody more than just the computation of the matrix α. They give a functional equation relating a generating function for the spectrum of a code (the Hamming weight enumerator) to that of its dual. This explicit functional equation is crucial in: i) Gleason’s Theorem for formally self-dual codes [21]. ii) The relationship between the MacWilliams identities and the functional equa- tion of the Riemann theta function [8]. iii) Duursma’s Conjectures [6], [7].

∗We employ the retronym “vector code” to describe a code with just one row, which before the advent of finite space-time codes, was just known as a “code”.

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 38 D. Grant and M. K. Varanasi

Our second main result is to introduce a rank enumerator (different from the one considered by Delsarte [4]), which is a generating function for the spectrum of a finite rank code, and which for linear finite codes has a functional equation relating it to the rank enumerator of the dual code. As a result, we can prove an analogue of Gleason’s Theorem for formally self-dual linear finite rank codes. It should be possible to greatly extend this result (see the recent [22] to see far reaching generalizations of Gleason’s Theorem for linear vector codes), but we will not attempt to do so here. Another laudable goal not considered here would be to relate the functional equation of the rank enumerator to the functional equation of the symplectic theta function.

The paper is organized as follows. In Section 2, we set notation and give defi- nitions, and state precisely what we mean by a “duality theory”. In Section 3 we give a summary of results and present some examples. In Section 4 we prove the claim above that in essence the only finite omnibus codes with a duality theory are the finite column distance codes and the finite rank codes. In Section 5 we give the proof of a MacWilliams identity and functional equation for linear finite rank codes. In Section 6 we use the MacWilliams identity for linear vector codes to derive a similar identity for linear finite column distance codes. In Section 7 we present a MacWilliams-type identity for the complete weight enumerator of linear finite sum-of-ranks codes. In Section 8 we prove an analogue of Gleason’s Theorem for formally self-dual linear finite rank codes. In the final Section 9 we explain how the matrices α and β are related, showing that the original MacWilliams identity can be considered a special case of the one for linear finite rank codes. Some of the results of the paper were announced in [12].

2. Preliminaries

Let M,T ≥ 1, and C ⊆ MatM×T (Fq). We call C a finite matrix code over Fq. The elements of C are called its codewords. If in addition C is an Fq-vector subspace, we call it a linear finite matrix code. We define a code structure d(C1, C2) on C to be any function on MatM×T (Fq)×MatM×T (Fq) to the non-negative integers such that d(C1 + C3, C2 + C3) = d(C1, C2) for all C1, C2, C3 ∈ MatM×T (Fq). From a code structure we define a weight wt(C1) = d(C1, 0), and note that the code structure can be recovered from the weight via d(C1, C2) = wt(C1 − C2). So we can also think of a weight, which for our purposes is any function from MatM×T (Fq) to the non-negative integers, as a code structure. We let wtcd, wtrk, wtsor, and wtom be the weights corresponding to the four coding structures dcd, drk, dsor, and dom defined in the introduction.

Remark 1. One can define the Hamming weight wtH of a matrix to be the number of its non-zero entries. Finite matrix codes also appear as the product of two vector codes, and in the definitions of the joint weight enumerator of vector codes and the multiple weight enumerator of a vector code.

Let wt be a code structure on MatM×T (Fq). If n is the maximal integer in the image of wt, for any finite matrix code C we define its spectrum to be the row vector a(C) = (ai(C)) of length n +1, where

ai(C) = #{C ∈ C| wt(C)= i},

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 Duality theory for space-time codes 39 for 0 ≤ i ≤ n. We define the minimal weight of C as d = min wt(A). A∈C, A6=0

We say two finite matrix codes C1 and C2 are formally equivalent if they have the same spectrum. We define C⊥, the dual of C, to be the code C⊥ = {D ∈ MatM×T (Fq)|C · D = 0, ∀C ∈ C}. If C is a linear finite matrix code of dimension k, we say that C has parameters [M,T,k,d]. If C is an [M,T,k,d]-code, then (C⊥)⊥ = C, and C⊥ is an [M,T,k′, d′]-code for some d′, where k + k′ = MT . We say a linear code is formally self-dual if it is formally equivalent to its dual. Fix M and T . We say a weight on MatM×T (Fq) has a duality theory if for every linear finite matrix code C, a(C⊥) depends only on a(C). If in addition, there is an γ such that for every linear finite code C, ⊥ 2 MT (1) |C|a(C )= a(C)γ, γ = q In+1, then we say that wt satisfies a MacWilliams identity, and that γ is the duality matrix of wt. (If wt defines a metric association scheme on MatM×T (Fq), γ is the eigenmatrix of the scheme.) We call a weight wt homogeneous if wt(C) = wt(eC) for any non-zero e ∈ Fq and all C ∈ MatM×T (Fq), and if its image consists of all integers between 0 and n. Akin to an argument in Section 5, one can show that for a homogeneous weight, the second condition in (1) follows from the first. If F = {f0, · · · ,fn} is a set of Q-linearly independent functions in Q(t), for t an indeterminate, we call n wt φF (C)= ai(C)fi, Xi=0 the F -weight enumerator of C. An involutary automorphism ∗ of Q(t) is one of ∗ ∗ ∗ order 2. We let F = {f0 , · · · ,fn}. Suppose that wt satisfies a MacWilliams identity. We will say that it has a MacWilliams functional equation if there is a set F as above, an involutary auto- morphism ∗, and a function ψ ∈ Q(t), such that for every linear finite matrix code C,

wt ⊥ 1 wt (2) φ (C )= ψφ ∗ (C). F |C| F Plugging C⊥ in for C in (2) shows that necessarily ψψ∗ = qMT . It is not hard to see that if wt has a MacWilliams functional equation with ψψ∗ = qMT , and wt is homogeneous, then it satisfies a MacWilliams identity. Remark 2. We are led to write the MacWilliams transform in the form (2) so that the resulting equation is analogous to functional equations that appear in other areas of mathematics where duality plays a role, like the theory of zeta functions and the theory of modular forms and theta series.

3. Summary of results and examples

We define two weights, wt1(C) and wt2(C), on MatM×T (Fq) to be equivalent if wt2(C) is the same as wt1(D), where D is obtained from C by a sequence of operations that either transposes two of its columns or multiplies a column by a non-zero constant. The weight that maps every element of MatM×T (Fq) to 0 is called the trivial weight.

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 40 D. Grant and M. K. Varanasi

Theorem 1. Assume that the weight wtom on MatM×T (Fq) is non-trivial and has a duality theory for some choice of B ∈ MatS×T (Fq). Then up to equivalence: i) wtom = wtrk, or ii) wtom = wtcd, or iii) M = 1, and T = ρℓ, for some ρ and ℓ, and wtom(C) of the vector C = ′ (c1, · · · ,cρℓ) is the number of non-zero rows in the ρ × ℓ matrix C whose j-th row ′ t is (cj ,cj+ρ, · · · ,cj+(ℓ−1)ρ)). Thus wtom(C) = wtcd((C ) ), and wtom is a disguised version of the column distance weight. This leads us to the next two theorems.

Theorem 2. Let C be a linear M × T finite rank code over Fq. For any 0 ≤ r ≤ min (M,T ), let ar be the number of codewords of C of rank r, and let fr = r−1 t−qj j=0 ( qmax (M,T )−qj ). Let F = {f0, · · · ,fmin(M,T )}, so the rank enumerator of C is Qrk min(M,T ) max (M,T ) φF (C)= r=0 arfr. Let t → q /t induce an involutary automorphism ∗ of Q(t).P Then rk ⊥ 1 min(M,T ) rk φ (C )= t φ ∗ (C). F |C| F

Theorem 3. Let C be a linear M × T finite column distance code over Fq. For any 0 ≤ r ≤ T , let ar be the number of codewords of C of column distance weight r. T cd Let F = {1, t, · · · ,t }, so the column distance weight enumerator of C is φF (C)= T r M r=0 art . Let t → (1 − t)/(1 + (q − 1)t) induce an involutary automorphism ∗ ofPQ(t). Then cd ⊥ 1 M T cd φ (C )= (1 + (q − 1)t) φ ∗ (C). F |C| F Although finite sum-of-ranks codes do not have a duality theory, there is a MacWilliams-type functional equation for their complete weight enumerators.

Theorem 4. Let C be a linear M × ρℓ finite sum-of-ranks code over Fq, each codeword consisting of ℓ blocks of M × ρ matrices. For any 0 ≤ ri ≤ min (M,ρ),

1 ≤ i ≤ ℓ, let a(r1,··· ,rℓ) be the number of codewords N1 · · · Nℓ of C with rk(Ni)= ℓ   ri for all 1 ≤ i ≤ ℓ, and let f(r1,··· ,rℓ) = i=1 fri (ti), where the fri are as in

Theorem 2, and the ti are independent indeterminates.Q Let F = {f(r1,··· ,rℓ)|0 ≤ ri ≤ min (M,ρ), 1 ≤ i ≤ ℓ}. Then the complete sum-of-ranks enumerator of C is

sor ΦF (C)= a(r1,··· ,rℓ)f(r1,··· ,rℓ),

(r1X,··· ,rℓ)

max (M,ρ) where the sum is over 0 ≤ ri ≤ min (M,ρ), and 1 ≤ i ≤ ℓ. Let ti → q /ti, 1 ≤ i ≤ ℓ, induce an involutary automorphism of Q(t1, · · · ,tℓ). Then

sor ⊥ 1 min(M,ρ) sor Φ (C )= (t · · · t ) Φ ∗ (C). F |C| 1 ℓ F Finally, we derive a close relationship between the duality matrices for linear vector codes of length n under the Hamming metric and linear finite rank codes of size n × n. Let Ut,m denote the number of upper-triangular matrices of rank t and n n! size m × m defined over Fq. Let k denote the binomial coefficient k!(n−k)! .  Theorem 5. Let [αkℓ] denote the duality matrix for linear vector codes of length n over Fq under the Hamming metric, and [βrs] the duality matrix for n × n linear

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 Duality theory for space-time codes 41

(n)−(n−k) finite rank codes over Fq. Then if Vkr = q 2 2 Ur−k,n−k−1 for 0 ≤ k ≤ r, and is otherwise 0, we have −(n) −1 [αkℓ]= q 2 [Vkr][βrs][Vℓs] . Example 5 (Representing extension fields). Typically the best space-time codes are those whose diversity order is maximal. The corresponding property for linear M × T finite rank codes is that their minimal weight be maximal, that is, equal to n = min (M,T ). For such codes, the Singleton bound constrains k to be at most n [9]. This leads one to consider [M,T,n,n]-codes where n = min (M,T ). Let us consider the case M = T = 2. The following are representations of Fq2 as 2 × 2 matrices over Fq, considered in [9], [19]. i) q is odd. Take e ∈ Fq to be a non-square element. Then a b C = a,b ∈ F be a q is a [2, 2, 2, 2]-code. Its dual is c de C⊥ = c, d ∈ F , −d −c q

which is also a [2, 2, 2, 2]-code. Let ar and br denote respectively the number of ⊥ 2 elements of C and C of rank r. Then a0 = b0 = 1, a1 = b1 = 0, and a2 = b2 = q −1, so C and C⊥ are formally self dual. We get t − 1 (t − 1)(t − q) φrk(C)= φrk(C⊥)=1+0 · + (q2 − 1) F F q2 − 1 (q2 − 1)(q2 − q) t2 − (q + 1)t + q2 = . q2 − q 2 rk 2 rk ⊥ 2 One easily checks that t φF ∗ (C)/q = φF (C ), where ∗ is induced by t → q /t. 2 ii) q is even. Take e ∈ Fq such that x + x + e is an irreducible polynomial. Then a b c c + de C = a,b ∈ F , C⊥ = c, d ∈ F , be a + b q d c  q

2 2 rk rk ⊥ t −(q+1)t+q are both [2, 2, 2, 2]-codes. Again φF (C)= φF (C )= q2−q . Example 6 (Some formally self-dual linear finite rank codes). Take T ≥ 2. Con- T sider the 2 × T code C1 where the top row of a codeword is any vector in (Fq) , but the bottom row consists of all zeros. It is formally self dual, and its rank enumera- T T tor, which we will call g1, is 1 + (q − 1)(t − 1)/(q − 1) = t. Now suppose T is odd, and let C2 consist of 2 × T matrices which are (T − 1)/2 concatenations of the 2 × 2 code in Example 5, and whose last column has a top entry which is arbitrary and a bottom entry which is zero. Then C2 is formally self-dual, a0(C2)=1,a1(C2)= q−1, T and a2(C2)= q − q, so its rank enumerator, which we will call g2, is 1 + (q − 1)(t − 1)/(qT − 1)+(qT − q)(t − 1)(t − q)/(qT − 1)(qT − q) = (t2 − 2t + qT )/(qT − 1).

If T is even, let C3 be the 1 × T code consisting of codewords whose first T/2 entries are arbitrary, and whose remaining entries are all 0. Then C3 is formally self- T/2 T dual, and its rank enumerator, which we will call g3, is 1+(q −1)(t−1)/(q −1), T/2 T/2 so g3 = (t + q )/(q + 1). We will return to g1,g2, and g3 in Section 8.

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 42 D. Grant and M. K. Varanasi

Example 7 (Relations to upper-triangular matrices). Theorem 2 gives a nice re- cursive for Ut,m. For example, let C be the vector space of all 3 × 3 lower- triangular matrices with entries in Fq, whose diagonal entries are all 0, which is a [3, 3, 3, 1]-code. Then C⊥ is the vector space of all 3 × 3 upper-triangular ma- trices with entries in Fq, which is a [3, 3, 6, 1]-code. Then the rank enumerator rk t−1 (t−1)(t−q) rk ⊥ t−1 φF (C) = U0,2 + U1,2 q3−1 + U2,2 (q3−1)(q3−q) , and φF (C ) = U0,3 + U1,3 q3−1 + 2 (t−1)(t−q) (t−1)(t−q)(t−q ) 3 rk 3 rk ⊥ U2,3 (q3−1)(q3−q) + U3,3 (q3−1)(q3−q)(q3−q2) . The fact that t φF ∗ (C)/q = φF (C ), where ∗ is induced by t → q3/t, implies, for instance, that

rk ⊥ 2 rk 2 U1,3 = (φF (C )|t=q − U0,3)(q + q +1)=(φF (C)|t=q2 − U0,2)(q + q + 1) q2 − 1 (q2 − 1)(q2 − q) = (q2 + q + 1)(U + U )= U (q +1)+ U , 1,2 q3 − 1 2,2 (q3 − 1)(q3 − q) 1,2 2,2

2 3 since U0,3 = U0,2 = 1. Noting that U2,2 = (q − 1) q gives U1,2 = q − U0,2 − U2,2 = 2 (q − 1)(2q + 1). Hence U1,3 = (q − 1)(3q +2q + 1). Example 8 (Column distance weight enumerators). Let us now consider the code C in Example 5 as a column distance code. Then as before C is self-dual, and once 2 again a0 = 1,a1 = 0,a2 = q − 1, so C is [2, 2, 2, 2]. However the column distance weight enumerator is

cd cd ⊥ 2 2 φF (C)= φF (C )=1+(q − 1)t , 2 2 cd 2 cd ⊥ and one easily checks that (1 + (q − 1)t) φF ∗ (C)/q = φF (C ), where ∗ is induced by t → (1 − t)/(1 + (q2 − 1)t). Example 9 (Complete rank weight enumerators). Let 1010 1000 C = , C = , 1  0000  2  0100  thought of as partitioned matrices with 2 blocks of 2 × 2 matrices over Fq. Let C1 and C2 be respectively the vector spaces spanned by C1 and C2. Then the sum-of- ranks spectra of C1 and C2 are identical (a0 =1,a1 =0,a2 = q − 1), but as we will see in the next section, the spectra of their duals are not. Theorem 4 implies that they must have different complete weight enumerators. Indeed, the complete weight enumerator of C1 is sor 2 2 ΦF (C1)=1+(q − 1)(t1 − 1)(t2 − 1)/(q − 1) , whereas the complete weight enumerator of C2 is sor 2 2 ΦF (C2)=1+(q − 1)(t1 − 1)(t1 − q)/(q − 1)(q − q).

Note that these differ even when we set t2 = t1.

4. Only two linear finite omnibus codes have duality theories

For a fixed matrix B of size S × T , we have defined a weight on MatM×T (Fq),

wtom(C) = rk(C♯B), where we recall that D♯B = (D ⊗ 1S1) ⊙ (1M1 ⊗ B). The following can be verified directly from the definition of ♯.

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 Duality theory for space-time codes 43

Lemma 1. Let A, B, and N be matrices of sizes M × T , S × T , and R × S, respectively. Then: a) A♯B = (A ⊗ IS)(IT ♯B). b) (IT ⊗ N)(IT ♯B)= IT ♯NB.

Theorem 1. Assume that the weight wtom on MatM×T (Fq) is non-trivial and has a duality theory for some choice of B ∈ MatS×T (Fq). Then up to equivalence: i) wtom = wtrk, or ii) wtom = wtcd, or iii) M = 1, and T = ρℓ, for some ρ and ℓ, and wtom(C) of the vector C = ′ (c1, · · · ,cρℓ) is the number of non-zero rows in the ρ × ℓ matrix C whose j-th row ′ t is (cj ,cj+ρ, · · · ,cj+(ℓ−1)ρ)). Thus wtom(C) = wtcd((C ) ), and wtom is a disguised version of the column distance weight.

Proof. Assume that wtom has a duality theory for some choice of B. ′ Step I. We can assume B is of the form Iρ B for some ρ ≤ T . h i Let A be a matrix of size M × T . For any invertible S × S matrix N, IM ⊗ N is invertible, and by Lemma 1,

(IM ⊗ N)(A♯B) = (IM ⊗ N)(A ⊗ IS)(IT ♯B) = (A ⊗ N)(IT ♯B)

= (A ⊗ IS)(IT ⊗ N)(IT ♯B) = (A ⊗ IS)(IT ♯NB) = A♯NB, so without loss of generality, we can assume that B is in row-reduced echelon form. Now let ρ ≥ 1 be the rank of B, and B˜ the top ρ rows of B. Then A♯B˜ is obtained from A♯B by removing rows of all zeros, so we might as well only consider B which are of size ρ × T for some ρ ≤ T, and are in row-reduced echelon form and have rank ρ. Also, transposing two columns of B and doing the same to A acts in the same manner on A♯B. It is therefore clear from the definition of wtom that we ′ can assume up to equivalence that B is of the form Iρ B . h i Step II. We can assume every column of B′ has one non-zero entry. First we can assume B contains no zero columns. If not, as above, up to equiv- alence we can assume the last column of B is 0. Then the code C1 consisting of all M × T matrices whose T -th column vanishes and the code C2 consisting of all ⊥ M × T matrices whose rows sum to zero, would have the same spectrum. Yet C1 ⊥ consists only of vectors of weight 0, whereas C2 contains at least one element of non-zero weight. The result is now trivial if ρ = 1 or ρ = T , so we take 1 <ρ

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 44 D. Grant and M. K. Varanasi

Hence if D1 is non-zero, it has at least two non-zero entries in some row, so the only way the weight of D1 E1 could be 1 is if D1 = 0. Let E1 denote the set of all weight 1 matrices of the form 0 E1 , where E1 is a matrix of size M × (T − ρ). Likewise, the dual of C2 is the set of matrices of the form D2 E2 , where the sum of the rows of D2 vanishes and E2 is any matrix of size M× (T − ρ− 1). Hence if D2 is non-zero, it has at least two non-zero entries in some row, and since by assumption b has more than one non-zero entry, again the only way the weight of D2 E2 could be 1 is if D2 = 0. Let E2 denote the set of all weight 1 matrices of form 0 E2 , where E2 is a matrix of size M × (T − ρ − 1). Note thatE2 is a subset of E1, so we get our desired contradiction if we can show that there is some matrix E1 of size M × (T − ρ), whose first column does not vanish, such that 0 E1 has weight 1. Taking the last T − ρ − 1 columns of E1 to be 0, and taking any entry of the first column of E1 to be non-zero, does the trick. Multiplying a column of B by a constant acts in the same manner on A♯B. Hence multiplying b by a non-zero constant, we can assume up to equivalence that it consists of one entry which is 1, and that all its other entries vanish. If the 1 is in the i-th row we will denote the column vector as ei.

Step III. We can assume B = Iρ · · · Iρ . h i If ρ = 1, this is clear. Assume now that ρ> 1. For 1 ≤ k ≤ T , suppose that B contains dk ≥ 1 columns of the form ek. Suppose for some i 6= j that di < dj . Let Ci be the code consisting of all M × T matrices which vanish except on the di columns corresponding to the columns of B which are ei, and let Cj denote the code consisting of all M × T matrices which vanish except on a chosen di columns corresponding to columns of B which are ej . Then Ci and Cj have the same spectrum. Now the ⊥ number of elements in Ci of weight 1 is ((qM − 1)/(q − 1)) (qdk − 1). Xk=6 i ⊥ However, the number of matrices in Cj of weight 1 is

((qM − 1)/(q − 1))((qdj −di − 1)+ (qdk − 1)). Xk=6 j

dj di dj −di Since q − 1 6= (q − 1)+(q − 1), these numbers differ. Hence we have di = ℓ for all i and some ℓ. Up to equivalence we can exchange columns of B, which gives us the claim. Note that T = ρℓ. Step IV. If ρ> 1 and ℓ> 1, then M = 1.

Note that after exchanging columns of B = Iρ · · · Iρ to put the columns h i which are e1 leftmost, and then e2 next leftmost, etc., we have wtom = wtsor for this choice of ρ and ℓ, so what we are showing in this step is that there is no duality theory for linear finite sum-of-ranks codes if M,ρ,ℓ are all at least 2. Assume that ρ ≥ 2, ℓ ≥ 2, and that M ≥ 2. For this step we will think of every codeword as ℓ blocks of size M × ρ, and the weight of a codeword as the sum of the ranks of these blocks. Let C1 be the linear M × ρℓ code consisting of the codewords whose last ℓ − 2 blocks are arbitrary, and whose first block vanishes in every entry except the one in the first row and first column, which is arbitrary, and whose second block consists of matrices whose last row and last column vanish, but whose entries are otherwise

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 Duality theory for space-time codes 45 arbitrary. Let C2 be the linear M × ρℓ code consisting of the codewords whose last ℓ − 2 blocks are arbitrary, whose second block vanishes, and whose first block consists of matrices whose first row and first column vanish, except that the entry in the first row and first column can be arbitrary, as can all the entries not in the first row or column. Then C1 and C2 have the same spectrum. Now let us count the ⊥ ⊥ ⊥ ⊥ number of codewords in C1 and C2 whose weight is 1, that is, a1(C1 ) and a1(C2 ). ⊥ ⊥ Note that the last ℓ−2 blocks of C1 and C2 vanish. Let em,n denote the number of ⊥ m × n matrices with entries in Fq which have rank 1. Then a1(C1 ) is the number of ⊥ codewords in C1 whose first block has rank 1 and whose second block vanishes, call it σ10, plus the number whose second block has rank 1 and whose first block vanishes, ⊥ call it σ01. For a matrix in C1 to have a first block of rank 1, the first row or first column of the block must vanish, so σ10 = eM−1,ρ + eM,ρ−1 − eM−1,ρ−1, to avoid double-counting those blocks whose first row and first column both vanish. Likewise, ⊥ for a matrix in C1 to have a second block of rank 1, the last row or last column of the block must vanish (except for their last elements). So σ01 = eM,1 + e1,ρ − e1,1. Hence ⊥ a1(C1 )= σ10 + σ01 = eM−1,ρ + eM,ρ−1 − eM−1,ρ−1 + eM,1 + e1,ρ − e1,1. A similar (but simpler) analysis shows that ⊥ a1(C2 )= eM−1,1 + e1,ρ−1 + eM,ρ. m n ⊥ ⊥ Now em,n = (q − 1)(q − 1)/(q − 1). So for a1(C1 ) to equal a2(C1 ), we must have (qM−1 − 1)(qρ − 1)+(qM − 1)(qρ−1 − 1) − (qM−1 − 1)(qρ−1 − 1) +(qM − 1)(q − 1)+(qρ − 1)(q − 1) − (q − 1)2 = (qM−1 − 1)(q − 1)+(qρ−1 − 1)(q − 1)+(qM − 1)(qρ − 1). This simplifies to (qM−1 − 1)(qρ−1 − 1)=0, giving us our contradiction. Step V. Conclusion.

We conclude that if wtom has a duality theory, then either 1) ρ =1, so wtom = wtrk, or 2) ℓ =1, so wtom = wtcd, or 3) M = 1, and T = ρℓ, for some ρ and ℓ, and wtom(C) of the vector C = ′ (c1, · · · ,cρℓ) is the number of non-zero rows in the ρ × ℓ matrix C whose j-th row is (cj ,cj+ρ, · · · ,cj+(ℓ−1)ρ)).

Remark 3. We show in Sections 5 and 6 that wtrk and wtcd do have duality theories, satisfy MacWilliams identities, and have weight enumerators that satisfy MacWilliams functional equations.

5. A MacWilliams functional equation for rank enumerators

Let n = min (M,T ), and let CM×T denote the set of linear M × T finite rank codes over Fq. For any C∈CM×T and 0 ≤ r ≤ n, let ar = ar(C) denote the number n+1 of codewords in C of rank r. Then we define a : CM×T → Q by a = (a0, · · · ,an). For 0 ≤ r ≤ n, let Wr denote the matrix of size M × T which is Ir for its first r rows and columns and whose other entries all vanish. For any A ∈ MatM×T (Fq), let {A} be the linear code generated by A. Considering {Wr} for 0 ≤ r ≤ n shows:

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 46 D. Grant and M. K. Varanasi

n+1 Lemma 2. a(CM×T ) is a spanning set of Q as a Q-vector space.

Let F = {fr|0 ≤ r ≤ n} be elements of Q(t) which are linearly independent over Q. Fix a C∈CM×T and let ar = ar(C). Then we define an F -rank enumerator rk n φF (C)= r=1 arfr. By usingP either character theory or association schemes, Delsarte [3], [4] showed that there is an integer (n + 1) × (n + 1) matrix β = [βrs] such that for every C∈CM×T , we have n (3) |C|bs = arβrs, Xr=0 ⊥ for all 0 ≤ s ≤ n, where bs = as(C ). Note that applying (3) to every C and its MT dual, Lemma 2 shows that [βrs] is an , whose square is q In+1. We now define a dualizing sequence Ck ∈CM×T , 0 ≤ k ≤ n, to be one such that ⊥ i) Ck is formally equivalent to Cn−k, ii) If pkr = ar(Ck), then [pkr] is invertible.

We will call [pkr] the associated matrix of the dualizing sequence. Suppose that the dimension of Ck is ek. We will call ek, 0 ≤ k ≤ n, the associated dimensions of the dualizing sequence. Now suppose we have a dualizing sequence. Applying (3) to every Ck we have n ek ⊥ q pn−k,s = |Ck|as(Cn−k)= |Ck|as(Ck )= |Ck|bs = pkrβrs. Xr=1 So as matrices e0 en antidiag(q , · · · , q )[pks] = [pkr][βrs], where antidiag(γ0, · · · ,γn) denotes the (n + 1) × (n + 1) matrix N whose rows and columns are indexed by {0, · · · ,n}, and such that Ni,n−i = γi for 0 ≤ i ≤ n, and Nij =0 for j 6= n − i. Hence,

−1 e0 en (4) [βrs] = [pkr] antidiag(q , · · · , q )[pks]. Take ∗ to be any involutary automorphism of Q(t) and ψ any function in Q(t) such that ψψ∗ = qMT . Then as in (2), we want a ∗ and ψ such that the MacWilliams functional equation, rk ⊥ rk (5) |C|φF (C )= ψφF ∗ (C), holds for every C∈CM×T . Again by Lemma 2, multiplying (3) by fs and summing on s shows that (5) holds if and only if, n ∗ ψfr = βrsfs, Xs=0 for all 0 ≤ r ≤ n, so by (4), if and only if

∗ ek (6) ψgk = q gn−k, n where gk = r=0 pkrfr, for all 0 ≤ k ≤ n. Hence if weP find some dualizing sequence, with associated matrix [pkr] and dimen- ∗ MT sions ek, and an involutary automorphism ∗ and a function ψ such that ψψ = q , −1 rk and gk satisfying (6), and then define [fr] = [pkr] [gk], then φF will satisfy (5). We will now find such a dualizing sequence, ∗, φ, and gk.

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 Duality theory for space-time codes 47

If M ≥ T , n = T , and we let Ck be the collection of partitioned matrices

N 0M,T −k , where N ∈ MatM×k(Fq). If M k, pkr = 0. Here r q is the classical generalized binomial coefficient or q-binomial coefficient. For any N ≥ 0 it satisfies the Newton identity [14], N−1 N i N i i (8) (1 + q x)= q(2)x .  i  Yi=0 Xi=0 q r−j r r−j r ( ) µm r ( ) Let srj = (−1) q 2 / (−1) q 2 for j ≤ r, and srj = 0 if j > r. Then j q µm−r n  by (7) and (8), r=0 pkrsrj = 0 if k < j, and if k ≥ j, n Pk k − − k r r j r−j k − j k r j r−j p s = q( 2 )(−1) = q( 2 )(−1) kr rj r j r − j k − j Xr=0 Xr=j q q Xr=j q q k k−j−1 − k k − j r j r−j k i = q( 2 )(−1) = (1 + q (−1)) j r − j j q Xr=j q q iY=0 k = δkj = δkj , jq where δkj is the Kronecker delta. So [pkr] is invertible, [srj ] is its inverse, and Ck is a dualizing sequence with m associated matrix [pkr] and associated exponents ek = km. Let ∗ : t → q /t be n k an involutary automorphism of Q(t), ψ = t , and gk = t for 0 ≤ k ≤ n. Then ∗ mn MT ∗ km ψψ = q = q , and ψgk = q gn−k. Hence if in the manner prescribed above −1 we set [fr] = [pkr] gk, then by (8), n r j µm−r r j 1−r j f = s t = q(2)(−q t) r rj µ j Xj=0 m Xj=0 q r−1 r−1 µ t − qj = m−r (1 − q−j t)= ( ), µ qm − qj m jY=0 jY=0 and we have shown with our choices of ∗, ψ, and F , (5) holds

Theorem 2. Let C be a linear M × T finite rank code over Fq. For any 0 ≤ r ≤ min (M,T ), let ar be the number of codewords of C of rank r, and let fr = r−1 t−qj j=0 ( qmax (M,T )−qj ). Let F = {f0, · · · ,fmin(M,T )}, so the rank enumerator of C is Qrk min(M,T ) max (M,T ) φF (C)= r=0 arfr. Let t → q /t induce an involutary automorphism ∗ of Q(t).P Then rk ⊥ 1 min(M,T ) rk φ (C )= t φ ∗ (C). F |C| F

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 48 D. Grant and M. K. Varanasi

The matrix β = [βrs] is the duality matrix for linear finite rank codes, and its entries are values of q-Krawtchouk polynomials, whose formulation is due to Delsarte [3]. Delsarte computed the βrs in two different ways [3], [4], and Stanton [23] gave a different method of computing them (which he traces back to work of Carlitz and Hodges [15].) We do not see how to immediately reduce our formula (4) for βrs to any previously known formulas for q-Krawtchouk polynomials. Remark 4. For use in Section 7, there is a consequence of Theorem 2 we would like to note. Let χ be any non-trivial additive character on Fq, and fr as in Theorem 2. Fix a non-zero matrix A ∈ MatM×T (Fq), and let

S = S(A)= χ(A · B)frk(B).

B∈MatXM×T (Fq ) Using a standard character theoretic argument, for any linear finite rank code C we get that rk ⊥ |C|φF (C )= χ(D · B)frk(B).

DX∈C B∈MatXM×T (Fq ) Applying this to C = {A} and C = {0} gives,

rk ⊥ rk ⊥ qφF ({A} ) = (q − 1)S + frk(B) = (q − 1)S + φF ({0} ).

B∈MatXM×T (Fq) Hence by Theorem 2, rk ⊥ rk ⊥ min(M,T ) rk min(M,T ) rk qφ ({A} ) − φ ({0} ) t φ ∗ ({A}) − t φ ∗ ({0}) S = F F = F F q − 1 q − 1 tmin(M,T ) = (1 + (q − 1)f ∗ − 1) = tmin (M,T )f ∗ . q − 1 rk(A) rk(A) Remark 5. The methods of this section also provide a derivation of the duality matrix α for linear vector codes over Fq, and hence also a proof of the classical MacWilliams functional equation for linear vector codes. One lets Cn be the col- lection of linear vector codes of length n over Fq, ar = ar(C) be the number of codewords of a C ∈Cn of Hamming weight r, and F = {fi|0 ≤ i ≤ n} be ele- ments of Q(t) which are linearly independent over Q. Then the Hamming weight H n enumerator of C is φF (C)= r=0 arfr. Using the analogous definition of dualizing sequence for Cn gives that CPk = {(x1, · · · , xk, 0, · · · , 0)|xi ∈ Fq}, for 0 ≤ k ≤ n, is a dualizing sequence, that the associated dimensions are ek = k, and that the k r associated matrix has entries pkr given by r (q − 1) for k ≥ r, and otherwise by 0. Take ∗ to be the involutary automorphism  induced by the map t → q/t, and n k n ∗ ek −1 H ψ = t . Then if gk = t , we have t gk = q gn−k, and if [fr] = [pkr] [gk], then φF satisfies the functional equation

H ⊥ 1 n H φ (C )= t φ ∗ (C), F |C| F r for every C ∈Cn. A calculation shows fr = ((1 − t)/(1 − q)) . Letting u = (1 − t)/(1 − q), so t = 1+(q − 1)u, the map ∗ : t → q/t corresponds to u → r n (1 − u)/(1 + (q − 1)u). So (2) holds with fr = u , 0 ≤ r ≤ n, ψ = (1 + (q − 1)u) , and ∗ induced by u → (1 − u)/(1 + (q − 1)u), which gives the typical statement of the MacWilliams functional equation for linear vector codes [21]. The method also −1 e0 en expressed the duality matrix α = [αrs] as [pkr] antidiag(q , · · · , q )[pks], whose

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 Duality theory for space-time codes 49 entries are easily seen to be values of Krawtchouk polynomials as given on line 53 of page 151 of [21].

6. A MacWilliams functional equation for the column distance enumerator Let us recall Gabidulin’s method for considering an M ×T finite column distance code over Fq as a vector code of length T over FqM under the Hamming metric [9]. Take N ∈ MatM×T (Fq), and let v1, · · · , vM be the rows of N. If we choose a M basis B = {b1, · · · ,bM } for FqM over Fq, then we can consider σB(N)= i=1 bivi as T a vector of length T over FqM . This gives a bijection σB : MatM×T (Fq)P→ (FqM ) , whose inverse we denote by τB. Furthermore, wtcd(N)=wtH(σB(N)). So σB induces a 1 − 1 correspondence from finite M × T column distance codes over Fq to vector codes of length T over FqM under the Hamming metric. Note, however, that if C is linear over Fq, then σB(C) is not necessarily linear over FqM . For example, if M > 1 and C is any Fq-linear vector code generated by a single non-, then σB(C) is a code with q elements so cannot be FqM -linear. Hence linear finite column distance codes need separate study. In particular, a MacWilliams identity and functional equation for linear finite column distance codes do not follow directly from those for linear vector codes. However, with a little work we can derive the former from the latter. Since the trace TrF F from F M to F is surjective, for every non-trivial ad- qM / q q q ∗ ′ ∗ ditive character χ : F → C , the character χ = χ ◦ TrF F : F M → C is q qM / q q non-trivial. ′ ′ ′ ′ Also note that if B = {b , · · · ,b } is the dual basis to B, i.e., TrF F (b b )= 1 M qM / q i j δij , then for A, D ∈ MatM×T (Fq), A · D coincides with the trace from FqM to Fq of the standard dot product · of the vectors σB(A) and σB′ (D). Now let C be a linear finite M × T column distance code over Fq. For 0 ≤ r ≤ T , let ar = ar(C) denote the number of codewords in C of column distance weight r. Following the standard character theoretic proof of the MacWilliams identities, consider the double sum T wtcd(D) wtcd(D) ⊥ r S = t χ(A · D)= |C|t = |C| ar(C )t . ⊥ D∈MatXM×T (Fq) AX∈C DX∈C Xr=0 On the other hand, exchanging the order of summation, S = χ(A · D)twtcd(D)

AX∈C D∈MatXM×T (Fq )

′ wtH(σB′ (D)) = χ (σB(A) · σB′ (D))t

AX∈C D∈MatXM×T (Fq )

′ wtH(E) = χ (σB(A) · E)t . ∈C F T AX E∈(XqM )

Let wr = (1, · · · , 1, 0, · · · , 0), the vector with r ones followed by n − r zeros. If wtH(σB(A)) = r, there is a T × T matrix U with entries in FqM , which is a product of a and an invertible diagonal matrix, such that σB(A)U = wr. −1 t −1 t T Since σB(A) · E = σB(A)U · E(U ) , E → E(U ) is a permutation of (FqM ) , −1 t and wtH (E(U ) ) = wtH (E), this last inner sum depends only on r. Hence it T s is of the form s=0 ǫrst for some algebraic integers ǫrs. Since all conjugates of P Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 50 D. Grant and M. K. Varanasi

′ ′ i ′ χ (σB(A) · E) are of the form χ (σB(A) · E) = χ (σB(A) · iE) for some integer i prime to q, the ǫrs are rational integers. Therefore T T ⊥ r s |C| ar(C )t = ar(C)ǫrst , Xr=0 r,sX=0 so T 1 a (C⊥)= a (C)ǫ . s |C| r rs Xr=0 Since the Hamming weight spectra of the FqM -linear vector codes of length T span T +1 ′ ′ T Q , applying the above to C = τB(C ) for every FqM -linear code C in (FqM ) shows that the linear finite column distance duality matrix [ǫrs] over Fq is the same as the one for linear vector codes of length T over FqM under the Hamming metric. M r Hence as in Remark 5 of the last section, letting fr = ((1−t)/(1−q )) ,0 ≤ r ≤ T , and F = {f0, · · · ,fT }, we get

cd ⊥ 1 T cd φ (C )= t φ ∗ (C), F |C| F cd T M r M where φF (C) = r=0 ar((1 − t)/(1 − q )) , and ∗ is induced by t → q /t. Now letting u = (1 −Pt)/(1 − qM ), so t =1+(qM − 1)u, the involution ∗ : t → qM /t corresponds to u → (1 − u)/(1 + (qM − 1)u). Hence changing notation we get

Theorem 3. Let C be a linear M × T finite column distance code over Fq. For any 0 ≤ r ≤ T , let ar be the number of codewords of C of column distance weight r. T cd Let F = {1, t, · · · ,t }, so the column distance weight enumerator of C is φF (C)= T r M r=0 art . Let t → (1 − t)/(1 + (q − 1)t) induce an involutary automorphism ∗ ofPQ(t). Then cd ⊥ 1 M T cd φ (C )= (1 + (q − 1)t) φ ∗ (C). F |C| F

7. A functional equation for complete weight enumerators of linear finite sum-of-ranks codes As we saw in fourth step of the proof of Theorem 1, unless M =1, or ρ = 1, or ℓ = 1, linear finite sum-of-ranks codes whose codewords consist of ℓ blocks of size M × ρ do not have a duality theory. As a consolation, we do get a nice functional equation for the complete sum-of-ranks enumerator of a linear T × ρℓ code over Fq, i.e., one employing the vector valued weight wt defined by wt( N1 · · · Nℓ )= (rk(N1), · · · , rk(Nℓ)), where each Ni is of size M × ρ.   Indeed, let C be a linear M × ρℓ finite sum-of-ranks code over Fq, each codeword consisting of ℓ blocks of M × ρ matrices. Let n = min (M,ρ). For any 0 ≤ ri ≤ n, 1 ≤ i ≤ ℓ, let a(r1,··· ,rℓ) be the number of codewords [N1|···|Nℓ] of C with wt( N1 · · · Nℓ ) = (r1, · · · , rℓ). Let t1, · · · ,tℓ be independent indeterminates,  r− 1 t−qj and fr(t) = j=0 ( qm−qj ), m = max (M,ρ), as for finite linear rank codes, and Q ℓ ℓ define f ··· = fri (ti), so f = f (ti). (r1, ,rℓ) i=1 wt( N1 ··· Nℓ ) i=1 rk(Ni) Q h i Q Let F = {f(r1,··· ,rℓ)|0 ≤ ri ≤ n, 1 ≤ i ≤ ℓ}. Define the complete sum-of-ranks enumerator of C to be sor ΦF (C)= a(r1,··· ,rℓ)f(r1,··· ,rℓ),

(r1X,··· ,rℓ)

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 Duality theory for space-time codes 51 where the sum is over 0 ≤ ri ≤ n, and 1 ≤ i ≤ ℓ. Then as in the last section, for any non-trivial additive character χ on Fq we get

sor ⊥ |C|ΦF (C )= χ(A · B)fwt(B) X X F A= A1 ··· Aℓ ∈C B= B1 ··· Bℓ ∈MatM×ρℓ( q)  h i h i ℓ

= χ(Ai · Bi)frk(Bi), X Yi=1 ∈ X× F A= A1 ··· Aℓ ∈C Bi MatM ρ( q) h i ℓ by the homomorphic property of χ, since A · B = i=1 Ai · Bi. We can now use Remark 4 of Section 5 to rewrite this as P ℓ sor ⊥ n m |C|ΦF (C )= ti frk(Ai)(q /ti) X iY=1 A= A1 ··· Aℓ ∈C h i n ∗ n sor = (t1 · · · tℓ) fwt(A) = (t1 · · · tℓ) ΦF ∗ (C) AX∈C where ∗ is the involutary automorphism of Q(t1, · · · ,tℓ) which sends each ti to m q /ti. Hence we get

Theorem 4. Let C be a linear M × ρℓ finite sum-of-ranks code over Fq, each codeword consisting of ℓ blocks of M × ρ matrices. For any 0 ≤ ri ≤ min (M,ρ),

1 ≤ i ≤ ℓ, let a(r1,··· ,rℓ) be the number of codewords N1 · · · Nℓ of C with rk(Ni)= ℓ   ri for all 1 ≤ i ≤ ℓ, and let f(r1,··· ,rℓ) = i=1 fri (ti), where the fri are as in

Theorem 2, and the ti are independent indeterminates.Q Let F = {f(r1,··· ,rℓ)|0 ≤ ri ≤ min (M,ρ), 1 ≤ i ≤ ℓ}. Then the complete sum-of-ranks enumerator of C is sor ΦF (C)= a(r1,··· ,rℓ)f(r1,··· ,rℓ),

(r1X,··· ,rℓ) max (M,ρ) where the sum is over 0 ≤ ri ≤ min (M,ρ), and 1 ≤ i ≤ ℓ. Let ti → q /ti, 1 ≤ i ≤ ℓ, induce an involutary automorphism of Q(t1, · · · ,tℓ). Then

sor ⊥ 1 min(M,ρ) sor Φ (C )= (t · · · t ) Φ ∗ (C). F |C| 1 ℓ F

8. An analogue of Gleason’s Theorem for formally self-dual linear finite rank codes Because of the functional equation of the rank enumerator (Theorem 2), there is an analogue of Gleason’s Theorem for linear finite rank codes [21]. First let us introduce the homogeneous version of the rank enumerator for M × T codes. Without loss of generality, we take M ≤ T . It is rk M rk fC (X, Y )= Y φF (C)|t=X/Y , where we always take the choice of F as in Theorem 2. Using this, we can now rewrite the MacWilliams functional equation for rank enumerators as

rk 1 rk T f ⊥ (X, Y )= f (q Y,X). C |C| C

For example, if we call G1, G2, and G3 respectively the homogeneous versions of g1,g2, and g3 from Example 6 of Section 3, for the codes C1, C2, and C3, then they

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 52 D. Grant and M. K. Varanasi are

rk G1 = fC1 (X, Y )= XY, rk 2 T 2 T G2 = fC2 (X, Y ) = (X − 2XY + q Y )/(q − 1), rk T/2 T/2 G3 = fC3 (X, Y ) = (X + q Y )/(q + 1).

Note that C2 was defined only for odd T and C3 was defined only for even T . Suppose now that C is formally self-dual. Then |C| = qMT/2, and MT is neces- sarily even. We get rk rk T/2 −T/2 fC (X, Y )= fC (q Y, q X), rk T/2 −T/2 so fC (X, Y ) is invariant under the involution ιT : (X, Y ) → (q Y, q X). It follows from a calculation in Chapter 19, Section 2 of [21], that the ring of homogeneous complex polynomials invariant under ιT has a pair of generators, one of degree 1 and one of degree 2. Suppose T is even. Then G3 is of degree 1 and invariant under ιT , and G1 is of degree 2 and is invariant under ιT . Since they are algebraically independent, it is not hard to see that they generate the full ring of homogeneous complex polynomials invariant under this involution. If T is rk odd, then M is necessarily even, so fC (X, Y ) is also invariant under the involution ι− : (X, Y ) → (−X, −Y ). Another calculation in Chapter 19, Section 2 of [21], shows that now the ring of homogeneous complex polynomials invariant under both ιT and ι− is generated by two polynomials of degree 2. Note that G1 and G2 are invariant under both these involutions, and are algebraically independent, so are easily seen to generate the full ring of invariants. So in both the cases that T is even or odd, we have come up with M × T codes whose homogeneous rank enumerators generate the full ring of invariant homoge- neous complex polynomials, but that does not imply that every monic monomial in the generators occurs as a rank enumerator of a linear finite code. Unlike the case of linear vector codes under the Hamming metric, one cannot relate the rank enumerator of a direct sum of two finite linear rank codes to the product of their rank enumerators. Also, since ιT — and hence its invariants — depends on T, our results only apply to formally self-dual linear finite M × T rank codes for fixed T and with M ≤ T .

9. Relationship between the duality matrices for linear vector codes and linear finite rank codes. We will now compare the duality matrices for linear vector codes of length n under the Hamming metric and for linear finite M × T rank codes. We will show that taking M = T = n, one duality matrix is similar to a constant multiple of the other. As in Section 5, let Cn denote the collection of all linear vector codes of length n over Fq, and Cn×n the collection of all linear n × n finite rank codes over Fq. We define a map λ : Cn →Cn×n by defining λ(C) for C∈Cn to be the set of all upper-triangular matrices whose vector of diagonal entries consists of codewords in C. We will let C˜ denote λ(C). It is not hard to see that if the dimension of C is k, then the dimension ˜ n ⊥ ˜ ⊥ t of C is k + 2 . It is also clear that C ⊆ ((C) ) . Since they both have dimension n  2 n ⊥ ˜ ⊥ t n − k + 2 = n − (k + 2 ), we havef that C = ((C) ) . Now for any C∈Cn, and   ⊥ ˜ ˜ ˜ ⊥ ⊥ 0 ≤ r ≤ n, let ar = ar(C), br = ar(C ),a ˜r =˜far(C), br =˜ar((C) )=˜ar(C ), where for D∈C , a (D) denotes the number of codewords of D of Hamming weight r, n r f Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 Duality theory for space-time codes 53 and for D∈Cn×n,a ˜r(D) denotes the number of codewords of D of rank r. Then from (4) and Remark 5 of Section 5, we have

(9) |C|[b0, · · · ,bn] = [a0, · · · ,an][αrs], |C|˜ [˜b0, · · · , ˜bn]=[˜a0, · · · , a˜n][βrs], where [αrs] and [βrs] are respectively the duality matrices for Cn under the Hamming weight and for Cn×n under the rank weight. Let Ut,m denote the number of upper- triangular matrices of rank t and size m×m defined over Fq (which can be calculated recursively via Theorem 2, as in Example 7 of Section 3). Let M be an n×n upper- which has u non-zero diagonal entries dj1,j1 , · · · , dju,ju . If u = n, then rk(M) = n. Likewise if u = n − 1, then rk(M) = n − 1. Suppose now that n ≥ u +2. Let M ′ denote the (n − u) × (n − u) upper- st th triangular matrix gotten by removing the j1 , · · · , ju rows and columns of M. Note that all the diagonal entries of M ′ are 0, so its rank is the same as that of the (n − u − 1) × (n − u − 1) upper-triangular matrix M ′′ gotten by removing the diagonal and principal subdiagonal of M ′. Then the rank of M is u plus the rank ′′ n n−u of M . Note that the rank of M is independent of its 2 − 2 superdiagonal st th entries that lie in its j1 , · · · , ju rows and columns. Hence   r − (n)−(n k) a˜r = akq 2 2 Ur−k,n−k−1, kX=0 if by convention we set Ui,i−1 = δi0 and U0,0 = 1. (n)−(n−k) Now let Vkr = q 2 2 Ur−k,n−k−1, if 0 ≤ k ≤ r, and otherwise let Vkr = 0. Then we have that

(10) [˜a0, · · · , a˜n] = [a0, · · · ,an][Vkr], and [˜b0, · · · , ˜bn] = [b0, · · · ,bn][Vkr]. Putting (9) and (10) together we have

[a0, · · · ,an][Vkr][βrs]=[˜a0, · · · , a˜n][βrs]= |C|˜ [˜b0, · · · , ˜bn] (n) (n) (11) = |C|q 2 [b0, · · · ,bn][Vℓs]= q 2 [a0, · · · ,an][αkℓ][Vℓs].

Let wr = (1, · · · , 1, 0, · · · , 0), the vector with r ones followed by n−r zeros. Consid- ering λ({wr}) for each 0 ≤ r ≤ n, shows that [˜a0(C˜), · · · , a˜n(C˜)] forms a spanning n+1 set of Q as C varies in Cn. Hence from (11) we have that (n) [Vkr][βrs]= q 2 [αkℓ][Vℓs], and from (10) that [Vkr] is invertible. Therefore we have shown

Theorem 5. Let [αkℓ] denote the duality matrix for linear vector codes of length n over Fq under the Hamming metric, and [βrs] the duality matrix for n × n linear − (n)−(n k) finite rank codes over Fq. Then if Vkr = q 2 2 Ur−k,n−k−1 for 0 ≤ k ≤ r, and is otherwise 0, we have −(n) −1 [αkℓ]= q 2 [Vkr][βrs][Vℓs] . Remark 6. This implies that the classical MacWilliams functional equation for linear vector codes can be derived from the MacWilliams functional equation for linear finite rank codes, so the latter can be considered a generalization of the former. n ( ) −1 Remark 7. Rewriting Theorem 5 as [βrs] = q 2 [Vkr] [αkℓ][Vℓs], gives another formula for values of q-Krawtchouk polynomials attached to square matrices.

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54 54 D. Grant and M. K. Varanasi

References [1] P. Camion, Linear codes with given automorphism groups, Discrete Math., 3 (1972), 33–45. [2] P. Delsarte, An algebraic approach to the association schemes of coding theory, Philips Res. Rep. Suppl., 10 (1973). [3] P. Delsarte, Association schemes and t-designs in regular semilattices, J. Combin. Theory Ser. A, 20 (1976), 230–243. [4] P. Delsarte, Bilinear forms over a finite field, with applications to coding theory, J. Com- bin. Theory Ser. A, 25 (1978), 226–241. [5] P. Delsarte, Properties and applications of the recurrence F (i + 1,k + 1,n +1) = qk+1F (i, k + 1,n) − qkF (i,k,n), SIAM J. Appl. Math., 31 (1976), 262–270. [6] I. Duursma, A Riemann hypothesis analogue for self-dual codes, Codes and association schemes (Piscataway, NJ, 1999), 115–124, DIMACS Ser. Discrete Math. Theoret. Comput. Sci., 56, Amer. Math. Soc., Providence, RI, 2001. [7] I. Duursma, From weight enumerators to zeta functions, Discrete Appl. Math., 111 (2001), 55–73. [8] W. Ebeling, “Lattices and Codes,” 2nd edition, Friedr. Vieweg & Sohn, Braunschweig, 2002. [9] E. M. Gabidulin, Theory of codes with maximal rank distance, Probl. Inf. Transm., 21 (1985), 1–12. [10] D. Grant and M. Varanasi, Non-associative division algebras and the construction of space-time codes, in preparation. [11] D. Grant and M. Varanasi, The equivalence of space-time codes and codes defined over finite fields and Galois rings, submitted. [12] D. Grant and M. Varanasi, Weight enumerators and a MacWilliams-type identity for space-time rank codes over finite fields, Proceedings of the 43rd Annual Allerton Confer- ence on Communication, Control, and Computing, Urbana, IL, 2005. [13] A. R. Hammons and H. E. Gamal, On the theory of space-time codes for PSK modulation, IEEE Trans. Inform. Theory, 46 (2000), 524–542. [14] G. H. Hardy and E. M. Wright, “An Introduction to the Theory of Numbers,” 5th edition, Oxford University Press, Oxford, 1980. [15] J. Hodges, Exponential sums for symmetric matrices in a finite field, Math. Nachr., 14 (1955), 331–339. [16] G. Landsberg, Ueber eine Anzahlbestimmung und eine damit zusammenh¨angende Reihe, J. Reine Angew. Math., 111 (1893), 87–88. [17] Y. Liu, M. P. Fitz and O. Y. Takeshita, A rank criterion for QAM space-time codes, IEEE Trans. Inform. Theory, 48 (2002), 3062–3079. [18] H.-F. Lu and P. V. Kumar, A unified construction of space-time codes with optimal rate- diversity tradeoff, IEEE Trans. Inform. Theory, 51 (2005), 1709–1730. [19] H.-F. Lu and P. V. Kumar, Rate-Diversity tradeoff of space-time codes with fixed alphabet and optimal constructions for PSK modulation, IEEE Trans. Inform. Theory, 49 (2003), 2747–2751. [20] P. Lusina, E. Gabidulin and M. Bossert, Maximal rank distance codes as space-time codes, IEEE Trans. Inform. Theory, 49 (2003), 2757–2760. [21] F. J. MacWilliams and N. J. A. Sloane, “The Theory of Error-Correcting Codes,” North- Holland, Amsterdam, 1977. [22] G. Nebe, E. M. Rains and N. J. A. Sloane, “Self-Dual Codes and Invariant Theory,” Springer, Berlin, 2006. [23] D. Stanton, A partially ordered set and q-Krawtchouk polynomials, J. Combin. Theory Ser. A, 30 (1981), 276–284. [24] M. K. Varanasi and P. Dayal, Unified multi-antenna code design for fading channels with spatio-temporal/spectral correlations, IEEE Trans. Wireless Comm., 5 (2006), 2266–2276. Received July 2007; revised January 2008. E-mail address: [email protected] E-mail address: [email protected]

Advances in Mathematics of Communications Volume 2, No. 1 (2008), 35–54