0% found this document useful (0 votes)
46 views36 pages

An Ecient Algorithm For Constructing Minimal Trellises For Codes Over Finite Abelian Groups

The document presents an efficient algorithm for computing the minimal trellis representation of a group code over a finite Abelian group. The algorithm extends previous work on constructing minimal trellises for linear codes over fields by handling codes over rings, in particular codes over cyclic groups Cp where p is a prime number. A key step is introducing the notions of p-linear combinations and p-generator sequences, which allow applying techniques like Gaussian elimination to codes over rings despite the presence of zero-divisors. The algorithm runs in O(k2n + s) time where n is the code length, k is the number of rows in the generator matrix, and s is the number of trellis states.

Uploaded by

Arun Av
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views36 pages

An Ecient Algorithm For Constructing Minimal Trellises For Codes Over Finite Abelian Groups

The document presents an efficient algorithm for computing the minimal trellis representation of a group code over a finite Abelian group. The algorithm extends previous work on constructing minimal trellises for linear codes over fields by handling codes over rings, in particular codes over cyclic groups Cp where p is a prime number. A key step is introducing the notions of p-linear combinations and p-generator sequences, which allow applying techniques like Gaussian elimination to codes over rings despite the presence of zero-divisors. The algorithm runs in O(k2n + s) time where n is the code length, k is the number of rows in the generator matrix, and s is the number of trellis states.

Uploaded by

Arun Av
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

An E cient Algorithm for Constructing Minimal Trellises for Codes over Finite Abelian Groups

Vijay V. Vazirani Huzur Saran

B. Sundar Rajan

Abstract
We present an e cient algorithm for computing the minimal trellis for a group code over a nite Abelian group, given a generator matrix for the code. We also show how to compute a succinct representation of the minimal trellis for such a code, and present algorithms that use this information to e ciently compute local descriptions of the minimal trellis. This extends the work of Kschischang and Sorokine, who handled the case of linear codes over elds. An important application of our algorithms is to the construction of minimal trellises for lattices. A key step in our work is handling codes over cyclic groups Cp , where p is a prime. Such a code can be viewed as a submodule over the ring Zp . Because of the presence of zerodivisors in the ring, submodules do not share the useful properties of vector spaces. We get around this di culty by restricting the notion of linear combination to p-linear combination, and introducing the notion of a p-generator sequence, which enjoys properties similar to that of a generator matrix for a vector space.

Index Terms{ Trellis, group codes, codes over rings, lattices, algorithms, Gaussian elimination.
y Department of Computer Science and Engg., Indian Institute of Technology, Delhi, [email protected] z Electrical Engineering Department, Indian Institute of Technology, Delhi, [email protected]

College of Computing, Georgia Institute of Technology, [email protected]

List of gure captions: 1. 2. 3. 4. 5. 6. 7. 8. The trellis for a single vector (example 1) The trellis from an arbitrary generator matrix (example 2) The trellis for the code generated by a single vector over a ring. The trellis for Example 8 The trellis for Example 9 The trellis for Example 10 The trellis for Example 11 The trellis for Example 12

1 Introduction
Ever since the success of trellis coded modulation 22] (which revolutionized transmission rates of modems in bandwidth limited channels), researchers have been studying block coded modulation 7, 12, 14]. Block group codes constitute a basic ingredient for a large class of block coded modulation schemes 7]. The coding gain achieved by these schemes is possible only with soft-decision decoding 22, 21]. Trellises provide a general framework for e cient soft-decision decoding of codes 25], for instance using the Viterbi algorithm 4]. Since the decoding e ort is directly related to the size of the trellis, much work has been done on characterizing and constructing minimal trellises for group codes 20, 6, 9, 15, 16]. In this paper, we present an O(k2n + s) time algorithm for constructing the minimal trellis for a block code over a nite Abelian group, given a generator matrix for the code, where n is the length of the code, k is the number of rows in the generator matrix, and s is the number of states in the minimal trellis; throughout the paper, we will assume that it takes one unit of time to perform an operation over the underlying eld, ring or group. For decoding purposes, it is perhaps more important to be able to e ciently compute required local descriptions of the minimal trellis. For this purpose, we show how a succinct description of the minimal trellis for such codes can be computed in O(k2 n) time and occupying O(kn) space; notice that this is polynomial in n amount of space, even though the minimal trellis may be exponentially large. We give algorithms that use this information to compute, for example, all transitions in to or out of a state in O(k) time. Perhaps the most important application of our work is to the construction of minimal trellises for lattices, since this problem essentially reduces to that of constructing minimal trellises for block codes over Abelian groups. This is elaborated in Section 11. Another application arises as a consequence of the following result: Certain famous non-linear binary codes (including Kerdock, Preparata and Goethals codes) contain more codewords than any known linear code of the same length. In a recent breakthrough result, Hammons, Kumar, Calderbank, Sloane and Sole have shown that under the Gray map from (Z2)2 to the ring Z4 , these codes turn out to be linear over Z4 11]. Note that linear codes over Z4 are the same as group codes over C4. We have built directly on the work of Forney and Trott 9] and Kschischang and Sorokine 15]. Forney and Trott, building on the work of Willems on dynamical systems 23, 24], show that group codes admit unique minimal trellises. Furthermore, they present important structural properties of such trellises, especially in their State Space Theorem (see Section 3). Kschischang and Sorokine have given an O(k2n + s) time algorithm for constructing the minimal trellis for a linear code over a eld, given a generator matrix for the code (see Section 4). They also present an e cient algorithm for computing local descriptions of the minimal trellis. The essential step in the algorithm of Kschischang and Sorokine is obtaining a special generator matrix for the code: a two-way proper generator matrix. A simpler proof is o ered to show that such a generator matrix yields a minimal trellis (Section 4). A key step towards extending this to codes over nite Abelian groups is handling codes over cyclic groups Cp , where p is a prime. Such codes can be viewed as linear codes over the ring Zp and are therefore submodules over Zp . The extension is not straightforward; the main di culty is the presence of zero-divisors in the ring. In Section 5 we state the di culties encountered because of zero-divisors. Some of these are quite general, e.g., the inability to give satisfactory de nitions for basis and dimension of submodules over Zp ; and others are speci c to minimal trellises. We then introduce the notions of p-linear 1

combinations and p-generator sequences that enable us to get around these di culties (Section 6). We show how Gaussian elimination can be adapted to this setting, and can be used for obtaining a p-generator sequence for any submodule over Zp , given a usual generator matrix for it. These notions should nd other applications as well, since they enable one to perform certain operations on submodules over Zp similar to the manner in which these operations are performed on subspaces of a vector space. In Section 7 we give a natural generalization of a two-way proper matrix: a two-way proper pgenerator sequence, and we show how Gaussian elimination can be used for obtaining it. Once this is done, a minimal trellis for a linear code over Zp can be constructed essentially in the same manner as the eld case. Finally, in Section 8 we consider codes over nite Abelian groups. First, we show that group codes over elementary Abelian groups can be seen as linear codes over an appropriate nite eld. We obtain a minimal trellis for this linear code, and from this trellis, using sectionalization, we obtain a minimal trellis for the given group code. For dealing with arbitrary nite Abelian groups, we show that it is su cient to consider Abelian p-groups. A code over such a group is in turn same as a linear code over a ring Zp , and can be handled analogously. The problem of computing local descriptions of minimal trellises is addressed in Section 9. Two types of problems are solved: Given two states in successive time indices, determine if there is a transition between them, and if so, determine the set of labels on the transition. Also, given a state at time index i, compute all transitions in to it and out of it. In Section 10, we build on the State Space Theorem to give algebraic structural properties of the set of transitions between two time indices in the minimal trellis for a group code; we call this the Transition Space Theorem. This theorem also de nes a succinct representation for the minimal trellis for a group code, from which local descriptions can be computed. This applies to group codes over non-Abelian groups as well; however, in general, the representation may be super-polynomial sized.

2 Preliminaries
In this paper, we will only deal with block codes, i.e., codes for which each codeword is of the same length, denoted by n. Let G be a nite group (in this paper, all codes are over nite Abelian groups), and let W = Gn be the n-fold direct product of G. A subgroup C of W under the componentwise addition operation of G is said to be a group code over G. Let I denote the set of positive integers from 1 to n; I will be called the time axis. An element a 2 W will be called a sequence; a = (ai ; i 2 I ). Let R be a ring; as a special case, R may also be a eld. As before, let W = Rn . Let C be a subgroup of W under the componentwise addition operation of R, and assume furthermore that C is closed under multiplication with elements of R, again carried out componentwise. Then, C is said to be a linear code over R. Clearly, the class of linear codes over elds is contained in the class of linear codes over rings, which is in turn contained in the class of group codes. A trellis, T, for a group code C is an edge-labelled directed layered graph. The vertices of T are partitioned into disjoint subsets V0; V1; Vn . The set Vi is referred to as the set of states at time 2

index i. V0 contains a unique start state v0 , and Vn contains a unique terminating state vn . Edges of T are allowed to run only between states in successive time indices. A transition (u ! v ), u 2 Vi; v 2 Vi+1 is labelled with a non-empty subset of elements from the group G. This transition is said to be out of state u and in to state v . A state having more than one out-transition (intransition) will be called forking state (collapsing state). A state u in trellis T will be said to be forward proper (backward proper) if the sets of labels on the out-transitions (in-transitions) of u are pairwise disjoint. Finally, trellis T will be said to be two-way proper if each of its states is forward proper and backward proper. A path from v0 to vn consists of n transitions, v0 ! v1 ! v2 ! vn , where vi 2 Vi. Such a path de nes all the n length words ( 1; 2; n ), where i is drawn from the set labelling the transition (vi?1 ! vi ). We require that each state must be useful, i.e., it must be on some path from v0 to vn . Finally, we require that the set of all words de ned by all paths in T from v0 to vn be exactly the set of codewords in C . We will say that state s is responsible for all the codewords whose paths use state s. Clearly, there exists a trellis for each group code C : create a unique path from v0 to vn for each codeword, with unique intermediate states. Such a trellis will have as many states at each time index as the number of codewords in C . For several reasons, including e cient decoding, it is important to obtain a trellis for C having as few states as possible. Let us say that T is a minimal trellis for C if at each time index, T has the smallest possible number of states. Let C1 and C2 be two group codes over the same underlying group G, and let T1 and T2 be trellises for these codes. Let C = C1 C2 be the product of these two group codes. Notice that in general, C may not be a group code; however, if G is commutative, C will be a group code. We can de ne the operation of taking the product of trellises T1 and T2 to obtain a trellis T for the code C as follows: Let Ui ; 0 i n and Vi ; 0 i n be the set of states of T1 and T2. Trellis T will have states Wi ; 0 i n, where jWi j = jUijjVij, and corresponding to each pair of states u 2 Ui and v 2 Vi, there is a state (u; v ) 2 Wi . There is a transition from (u; v ) 2 Wi to (u0; v 0) 2 Wi+1 i (u ! u0) and (v ! v 0 ) are transitions in T1 and T2 respectively. Let and be the labels on the transitions (u ! u0) and (v ! v 0 ). Then, the set of labels on transition ((u; v ) ! (u0; v 0)) is fabja 2 ; b 2 g.

3 Structural properties of minimal trellises for group codes


As established by Forney and Trott, structural properties of group codes lead to structural properties of minimal trellises for such codes. In this section, we will review properties essential for our work, especially those following from the State Space Theorem. Let J I be a subset of the time axis. The projection map PJ : W ! W sends sequence a 2 W to the following sequence b: ( a if i 2 J bi = 0i if i 2 I ? J: Thus, the projection map PJ simply `zeros out' the I ? J components of a sequence. De ne projection PJ (C ) = fPJ (c)jc 2 Cg, i.e., the image of C under the projection map PJ . The projection map is a homomorphism, since PJ (ab) = PJ (a)PJ (b). Further, since C is a group, the image of C under PJ , PJ (C ) is a subgroup of W . If J consists of the rst k time indices, we will denote PJ (C ) 3

by Pk? (C ), and PI ?J (C ) by Pk+ (C ); for a 2 W; Pk? (a) and Pk+ (a) are similarly de ned. Pk? (C ) will be called the set of codeword pasts and Pk+ (C ) the the set of codeword futures. The cross section of C in J , denoted by CJ , is a subcode of C consisting of all codewords whose components in I ? J are zero, i.e.,

CJ = fc 2 C j ck = 0; k 2 I ? J g: Notice that CJ is the kernel of the projection map PI ?J restricted to C . Again, if J consists of the rst k time indices, we will denote CJ by Ck? and CI ?J by Ck+ ; these are called the past subcode and future subcode, respectively, in 9]. Since Ck? and Ck+ are both normal subgroups of C , Ck? Ck+ is also a normal subgroup of C . Furthermore, since Ck? \ Ck+ = f0g, Ck? Ck+ is a direct product.
The State Space Theorem of Forney and Trott 9] states that

Pk? (C )=Ck? ' Pk+ (C )=Ck+ ' C =(Ck? Ck+ ):


It will be instructive to consider the following bipartite graph, Hk the past-future graph at time index k: Its vertex sets are Pk? (C ) and Pk+ (C ), and two vertices u 2 Pk? (C ) and v 2 Pk+ (C ) are joined by an edge i uv 2 C . We will say that (A; B ); A Pk? (C ); B Pk+ (C ) is a bipartite clique if for each u A and v B , (u; v ) is an edge in Hk . The State Space Theorem shows that Hk consists of disjoint bipartite cliques. Notice that Ck? Pk? (C ) and Ck+ Pk+ (C ). Since Ck? Ck+ is a direct product, there is a bipartite clique between the corresponding sets of vertices in Hk . This clique will be called the zero clique since it corresponds to the subgroup Ck? Ck+ of codewords of C ; one of its edges corresponds to the all zeros codeword. For any c 2 C , consider the coset cCk? Ck+ . The codewords in this set consist of pasts corresponding to the elements of the coset Pk? (C )Pk? (c) and futures corresponding to the elements of the coset Pk+ (C )Pk+ (c). In Hk , there is a bipartite clique between these sets of vertices; the edges of this clique correspond to cCk? Ck+ . The construction of the unique minimal trellis, T , for C follows from the past-future graphs Hk ; 1 k < n. T has jC =(Ck? Ck+ )j states at time index k; each state is responsible for codewords in one of the cosets. The state that is responsible for codewords in the subgroup Ck? Ck+ will be called the zero state, and will sometimes be denoted by 0. If u and v are states at time indices k and k + 1 respectively, then there is a transition from u to v i the sets of codewords they are responsible for have a non-empty intersection, say A. If so, the set of labels on this transition is the set of symbols in P(k+1) (A), i.e., the projection of A onto the (k + 1)th coordinate. De ne the output group at time index k + 1 to be Gk+1 = P(k+1) (C ); notice that Gk+1 is a subgroup of G.

4 Minimal trellises for codes over elds


In this section we will introduce the algorithm of Kschischang and Sorokine 15] for linear codes over elds, since we build directly on it. We will also give a simpler proof for their algorithm. The running time of their algorithm is O(k2n + s), where the generator matrix has size k n, and s is the number of states in the minimal trellis. 4

Our simpli ed proof of minimality relies on the following characterization established by Willems 23, 24] in the context of dynamical systems. We will use this characterization for proving minimality of trellises constructed for the cyclic group and Abelian group cases as well.

Theorem 4.1 (Willems 23, 24]) A two-way proper trellis for a block code, C , is the unique minimal trellis for C .
For a simpli ed proof of Theorem 4.1, proven in the context of minimal trellises for group codes, see 17, 18]. For further extensions of Willems' results to codes over nite Abelian groups, see 3]. In general, a code may not admit a two-way proper trellis. However, if such a trellis does exist for the code, it is guaranteed to be minimal; see 13] for a proof of this fact. A linear code, C , over a eld, GF (q ), is a vector subspace, and can be described by its generator matrix, A. The minimal trellis for the code generated by a single row vector of A can be obtained in a straightforward manner as explained below. Since C is the sum of the codes generated by the rows of A, the product of the trellises for these codes will be a trellis for C ; the operation of computing the product of trellises was introduced by Kschischang and Sorokine 15] for precisely this reason. In general, this trellis may not be minimal. Forney has called a generator matrix that gives rise to a minimal trellis a trellis-oriented generator matrix 6]. The key step in the algorithm of Kschischang and Sorokine is e ciently obtaining a trellis-oriented generator matrix, given an arbitrary generator matrix A. Let (a1 a2 an ) be a row of A. Let ai be the rst non-zero entry and aj be the last non-zero entry in this row, i.e., ak = 0 for k < i and for k > j . Then, we will say that this row starts at i and ends at j . Furthermore, ai will be called the starting element of this row and aj will be called its ending element. The minimal trellis for the code generated by this vector has a simple structure: It has a single forking state with q out-transitions at time index i ? 1, and a single collapsing state with q in-transitions at time index j ; all other states have one in and one out transition; see Example 1.

Example 1 For the code generated by a single vector over GF (q), the minimal trellis consists of a
forking state at the time index at which this vector starts and a collapsing state at the time index at which this vector ends. For example, the minimal trellis for the code over GF (5) generated by (030210) is given in Figure 1. We will rst prove that for establishing minimality of the product of two minimal trellises, it is su cient to establish two-way properness of the zero-states at each time index. We will prove this in the full generality of group codes. The lemmas below consider only forward properness { analogous statements hold for backward properness. By the set of labels emanating from a state we mean the union of the sets of labels on all transitions out of this state.

Lemma 4.2 Let T be a minimal trellis for a group code, C , over group G and let s and s be the
0

zero state and an arbitrary state at time index i. Let 0 and be the sets of labels emanating from s0 and s respectively, and let Gi+1 be the output group at time index i + 1. Then, 0 is a normal subgroup of Gi+1 , and is an element of the quotient group Gi+1 = 0 .

Proof : State s0 is responsible for the set of codewords in Ci? Ci+ . Since Ci? Ci+ / C (note that as usual, \/" denotes normal subgroup), 0 = P(i+1) (Ci? Ci+ ) / P(i+1) (C ) = Gi+1 :

Since the set of codewords that s is responsible for form a coset of Ci? Ci+ in C , using a similar argument, we get that is an element of the quotient group Gi+1 = 0.

Lemma 4.3 Let C and C be length n group codes over the same underlying group G and let C = C C (in general, C may not be a group code). Let T and T be minimal trellises for C and C respectively, and let T be the product of these trellises, which will be a trellis for code C . Let
1 2 1 2 1 2 1

and 0 be the set of labels emanating from the zero states, z1 and z2 , at time index i in T1 and T2 respectively. Then, T is forward proper at time index i i 0 and 0 intersect trivially, i.e., 0 \ 0 = f0g, where 0 is the identity element of G.

Proof : Since

and

are subgroups of G, by a well-known theorem in group theory,

0 0

jj j = jj \ jj :
0 0 0 0

So, the labels emanating from the zero state at time index i in T , (z1; z2), are all distinct i j 0 0j = j 0jj 0j, which happens i 0 \ 0 = f0g. Consider two arbitrary states s1 and s2 in T1 and T2 respectively at time index i. Let us view the set of labels emanating from s1 as a left coset of 0 , say a 0, and those emanating from s2 as a right coset of 0 , say 0b (notice that in general 0 and 0 may be normal subgroups of di erent groups in G). Then, the of labels emanating from state (s1 ; s2) in T are given by a 0 0 b. As before, these will be all distinct i j 0 0 j = j 0jj 0j. The lemma follows. We will say that a generator matrix is two-way proper if every row starts at a distinct point, and every row ends at a distinct point. Following is a restatement of Theorem 2 of Kschischang and Sorokine 15]; we give a simpler proof for it using Theorem 4.1 and Lemma 4.3.

Theorem 4.4 (Kschischang and Sorokine 15]) A generator matrix for a linear code over a
eld is trellis-oriented i it is two-way proper.

Proof : Since for a eld, multiplication by a non-zero element is a one-to-one onto map, in this case, the set of symbols emanating from a zero state is either f0g or the entire eld. Compute the product of the trellises for the rows of the generator matrix. At any time index i, the zerostate of the product trellis is forward proper i the sets of labels emanating from zero-states in the component trellises at time index i intersect trivially. This happens i at most one row of the generator matrix starts at i. Similarly for backward properness. Using two stages of Gaussian elimination, any generator matrix for C can be converted into a twoway proper generator matrix. The rst stage gets the matrix in the usual row echelon form, i.e., row i + 1 starts at a later point than row i, for 1 i n ? 1. Then, by a process of \cancelling upwards", we can ensure that no two rows end at the same point; this process does not a ect the starting points.

Example 2 Consider the following generator matrix over GF (2): !


1100 1010 6

The trellises for the individual rows as well as the product trellis are shown in Figure 2(a). In this case, the trellis obtained is not two-way proper. However, we may convert the above generator matrix to a two-way proper matrix to obtain ! 1100 0110 The trellis obtained from this matrix is shown in Figure 2(b).

5 Extending to rings Zp : the di culties encountered


n A length n linear code, C , over a ring Zp is a submodule of the module Zp . Such a submodule can be speci ed via a generator matrix; linear combinations of the rows of the matrix give vectors of the submodule. So, the question arises whether the notion of a two-way proper generator matrix again helps in obtaining minimal trellises. The answer is, \No". Consider the code generated by the following matrix over Z4: ! 11 02 . The two rows start at di erent indices, but end at the same index. However, it is not possible to remedy this by upward Gaussian elimination. The reason is that whereas 1 is a unit, 2 is a zero-divisor in Z4 . In fact, as shown in Example 3, no generator matrix for this code is two-way proper.

generator matrix yields a trellis that is not two-way proper, and hence non-minimal. C = f00; 11; 22; 33; 02; 13; 20; 31g Since this code has eight codewords, we need at least two rows in the generator matrix. Since the multiple of a zero-divisor cannot give a unit, one of the rows in the generating matrix must contain a unit and so must be drawn from f11; 33; 13; 31g. But then the other row will either have the same starting point or the same ending point as this row.

Example 3 The following code over Z has no two-way proper generator matrix. Moreover, each
2 4

Unlike the eld case, the trellis for the code generated by a single vector can have several forking states and several collapsing states. For example, the minimal trellis for the length 6 code generated by (241014) over Z8 is shown in Figure 3. We will need the following de nitions: For a 2 Zp if the additive subgroup generated by a has pk elements, then say that the order of a is k. For example, the order of 0 is zero, and the order of 1 is . For a; b 2 Zp , a and b will be said to be associates if there is a unit u 2 Zp such that a = ub. Notice that a and b are associates i they have the same order. In the example, notice that as the orders of elements in the given vector rst increase, we get forking states. Finally, as the orders decrease, we get collapsing states. Let us point out some more general di culties in working over modules, arising because of zerodivisors (and more generally, the fact that elements of the ring have di erent orders). There are two natural ways of de ning linear dependence of a set of vectors V : 7

a non-trivial linear combination of the vectors in V gives the zero vector one of the vectors in V can be expressed as a linear combination of the rest. In the case of a vector space, these two de nitions are equivalent. However, in the case of a module dependence in the rst sense need not imply dependence in the second sense. For example, over Z4 , the vectors (12) and (10) are dependent by the rst de nition, but not the second. Another di culty is that we cannot give a suitable de nition of dimension of a submodule. For example, over Z4, (20) and (02) form a basis for the submodule they generate. On the other hand (10) and (01) form a basis for a submodule that strictly contains the rst submodule. Consequently, de ning the dimension of a submodule as the cardinality of its basis is not very meaningful. Also notice that the vectors of the rst submodule are not uniquely generated by linear combinations of the basis vectors.

6 p-linear combinations and p-generator sequences


In this section, we will introduce the notions of p-linear combinations and p-generator sequences which enable us to get around the di culties mentioned in the previous section in working over submodules of Zp . We will show that p-linear combinations of p-generator sequences enjoy properties similar to those of a basis for a vector subspace: they uniquely generate the elements of the submodule, a suitable de nition of dimension of a submodule can be given, and the two notions of linear dependence turn out to be equivalent. P Let V = fv1 ; ; vk g be a set of vectors over Zp . We will say that k=1 ai vi is a p-linear combina~ ~ ~ i tion of these vectors if all coe cients ai 2 f0; 1; (p ? 1)g. Notice that the elements 1; ; (p ? 1) are all units in Zp . We will denote by p-span(V ) the set of all vectors generated as p-linear combinations of vectors in V , and by span(V ) the set of vectors generated as (ordinary) linear combinations of vectors in V . We will say that a given linear combination (p-linear combination) uses vector vi if its coe cient is non-zero in the linear combination (p-linear combination). ~ An ordered sequence of vectors V = (v1 ; ; vk ) over Zp is said to be a p-generator sequence if ~ ~ for 1 i k; p~i is a p-linear combination of the vectors ~i+1 ; ; vk (in particular, pvk is the v v ~ ~ zero vector). For each vector vi one such p-linear combination is designated the canonical p-linear ~ combination for vi . If i < j , for convenience, we will say that vi is earlier than vj and that vj is ~ ~ ~ ~ later than vi . ~ For an arbitrary set of vectors V , p-span(V ) may not be a submodule, for example, if p~i is not a v p-linear combination of the vectors in V , for some vi 2 V . However, ensuring this condition is not ~ su cient as shown in Example 4. On the other hand, this condition together with the order among the vectors, as stated in the de nition of a p-generator sequence, turns out to be su cient; this is established in Theorem 6.2.

Example 4 Consider the following set of vectors over Z .


9

~1 = (3106); ~2 = (2270); ~3 = (8510); ~4 = (3533) v v v v


3~1 = ~2 + 2~3; v v v 8 3~2 = ~1 + ~4 v v v

Here,

3~3 = ~1 + ~4; 3~4 = ~1 + 2~2 + ~3 + ~4 v v v v v v v v The p-span of these vectors is not a submodule, since it does not contain the vector 5~4 = (6766). v The reason is that we cannot order the vectors so they satisfy the de nition of a p-generator sequence.

Example 5 The following set of vectors over Z form a p-generator sequence:


9

~1 = (0101);~2 = (2500);~3 = (5203);~4 = (3300) v v v v 3~1 = 2~2 + ~3 ; 3~2 = 2~4 ; 3~3 = 2~4; 3~4 = 0 v v v v v v v v Let us see how to obtain a p-linear combination equivalent to ~ = 7~1 + 4~2 + ~3 + 2~4 = (1801): u v v v v ~ = 7~1 + 4~2 + ~3 + 2~4 u v v v v = ~1 + 2(3~1) + 4~2 + ~3 + 2~4 v v v v v = ~1 + 2(2~2 + ~3 ) + 4~2 + ~3 + 2~4 v v v v v v = ~1 + 8~2 + 3~3 + 2~4 v v v v = ~1 + 2~2 + 2(2~4) + 3~3 + 2~4 v v v v v = ~1 + 2~2 + 2~4 + 6~4 v v v v = ~1 + 2~2 + 2~4 v v v

Remark: Let us give an intuitive justi cation for the de nition of p-generator sequences. The

de nition is motivated by computational considerations. If the vectors can be ordered as required in the de nition, computations with them proceed in an orderly fashion along the ordering; this is proven rigorously in Theorem 6.2. Otherwise, computations get \entangled" in loops. In fact, we conjecture that if the vectors in V cannot be ordered, then either p-linear combinations of V do not generate a submodule, or the two notions of dependence do not turn out to be equivalent (see Theorem 6.3); we expect the proof of this to be quite involved. Examples 4 and 5 illustrate this.

combination of vectors in V , and let vl be the earliest vector used in this linear combination. Then, ~ ~ can be expressed as a p-linear combination of vl and later vectors of V . v ~

~ Lemma 6.1 Let V be a p-generator sequence, with jV j = k. Let ~ = Pk aivi be any linear v i
=1

Proof : The coe cients occurring in any linear or p-linear combination can be written as a k dimensional vector. Let (b1; ; bk ) and (c1; ; ck ) be two such vectors, and let bi and cj be their rst non-zero coe cient. We will say that (b1; ; bk ) is lexicographically larger than (c1; ; ck ) if either i < j , or i = j and bi > ci . Now consider the coe cient vector (a1 ; ; ak ). If all coe cients are in the range f0; 1; ; p ? 1g, then we are done. Otherwise, let aj be the rst coe cient that is p. Let aj = ap + b. Write ap~j using the canonical p-linear combination for vj . This uses vectors occurring later than vj . v ~ ~ Substituting, we will get a vector equivalent to (a1; ; ak ), which is the same in the rst j ? 1 places, and has b in the j th place. So, this vector is lexicographically smaller than (a1; ; ak ). Now, this process can be continued until we get an equivalent p-linear combination. Clearly, the process terminates, and the nal vector will have zero coe cients in the rst l ? 1 places.

Theorem 6.2 If V is a p-generator sequence then p-span(V ) = span(V ).


Proof : Clearly, p-span(V ) span(V ). Since by Lemma 6.1 every vector in span(V ) can also be expressed as a p-linear combination of vectors in V , the other direction also follows.
notions of linear dependence are equivalent, i.e., there is a non-trivial p-linear combination of vectors from V that is 0 i there is a vector in V that can be expressed as a p-linear combination of the remaining vectors in V .

Theorem 6.3 Let V be a p-generator sequence. W.r.t. p-linear combinations over V , the two

P ~ ~ Proof : First suppose that there is a non-trivial p-linear combination k=1 ai vi = 0. Let vl be the i earliest vector used by this p-linear combination. Now we have
al vl = ?( ~
Since al is a unit in Zp , we get
k X i=l+1

ai vi ) = ~
k X i=l+1

k X i=l+1

(p ? 1)ai vi : ~

vl = (al )?1 ~

(p ? 1)aivi : ~

Now, by Lemma 6.1, the linear combination on the r.h.s. can be expressed as a p-linear combination which does not use vl . So, vl has been expressed as a p-linear combination of the remaining vectors. ~ ~ To prove the other direction, suppose vl = i6=l ai vi . Let vj be the earliest vector used in the r.h.s. ~ P ~ ~ There are two cases: Case 1: l < j . By Lemma 6.1, ?( i6=l ai vi ) can be expressed as a p-linear combination using ~ vectors later than vl only. Hence, ~ X vl ? ( ai vi) ~ ~ can be written as a non-trivial p-linear combination that is 0. Case 2: l > j . By Lemma 6.1, ?vl can be expressed as a p-linear combination that does not use ~ vj . Hence, ~ X can be written as a non-trivial p-linear combination that is 0. We will say that a p-generator sequence V is p-linearly independent if there is no non-trivial p-linear combination of its vectors that is 0. A p-linearly independent p-generator sequence will be called a p-basis. Clearly, the p-linear combinations of the elements of a p-basis V uniquely generate the elements of the submodule p-span(V ). So, if jV j = k, the submodule has pk elements. We will de ne the p-dimension of this submodule to be k. 10
i6=l i6=l

ai vi ? vl ~ ~

Remark: Note that the notions of p-dimension and p-generator sequence of a submodule over Zp correspond exactly to the notions of composition length and generating system along a composition chain of a module in commutative ring theory (see 19]). The reason for our choice of terminology is that it is more suggestive of properties of vector subspaces that we are attempting to endow submodules over Zp with. Lemma 6.4 Every submodule over Zp has a p-generator sequence.
Proof : Let U = fv1; ; vk g be a usual generating set for the submodule. Let V be the ordered ~ ~ sequence consisting of multiples of these vectors by pi ; 0 i ? 1, i.e.,

combination of its vectors. Let vl be the earliest vector in this ordering that is used by the p-linear ~ combination, and U be obtained by replacing vl by ~ in the ordered set V . Then, U is also a ~ v p-generator sequence with the same span as V .

~ Lemma 6.5 Let V = (v ; ; vk) be a p-generator sequence, and let ~ = Pk aivi be a p-linear ~ ~ v i
1 =1

adapting Gaussian elimination to this setting. Let us rst recall the process of Gaussian elimination when performed on vectors from a vector space. Let V = fv1; ; vk g be the generator set for a ~ ~ subspace of F n , the n-dimensional vector space over eld F . The process of Gaussian elimination is based on the following fact: Let ~ = k=1 ai vi be a linear combination of the vectors in V . Then, v Pi ~ for any vector vi that is used by this linear combination, V + ~ ? vi generates the same subspace as ~ v ~ V . Using this principle, Gaussian elimination starts with an arbitrary generator set for a subspace, and brings it into \row echelon" form, i.e., all non-zero vectors have distinct starting points, and are sorted by starting point, with the 0 vectors being listed last. Now, the non-zero vectors are linearly independent, and form a basis for the subspace. Carrying out this process is somewhat more involved for p-generator sequences.

; vk ; pvk ; ; p ?1vk ): ~ ~ ~ Then, clearly V is a p-generator sequence with p-span(V ) = span(U ). Notice that if any of the vectors in V is 0, it can be dropped. Our next goal is to show that every submodule over Zp has a p-basis; we will accomplish this by V = (v1; p~1; ~ v

; p ?1v1; ~

Proof : Since al is a unit, we can write

vl = (al)?1 (~ ? ~ v

X
i6=l

ai vi) ~

Therefore, corresponding to any linear combination of the vectors of V there is an equivalent linear combination of the vectors of U and vice versa. Hence, U has the same span as V . Next we show that U is a p-generator sequence, i.e., for each vector vj 2 U , p~j can be expressed ~ v as a p-linear combination of vectors later than vj in U . This is clearly true for j > l. For vector ~ , ~ v

p~ = p~l + v v

X
i6=l

pai vi: ~

Using Lemma 6.1, and the fact that there is a p-linear combination for p~l using vectors later than v l, the r.h.s. can be expressed as a p-linear combination of vectors later than l. Finally, consider 11

j < l. If the canonical p-linear combination for p~j in V does not use vl, we will simply use this v ~ same p-linear combination. Otherwise, we will substitute for vl using the rst equation given above, ~ and use Lemma 6.1 to obtain a p-linear combination that uses vectors of U later than vj . ~

Corollary 6.6 Let V = (v ; ; vk ) be a p-generator sequence. Let ~ = vi + a~j , where i < j and ~ ~ v ~ v ~ v a 2 Zp . Then, replacing vi by ~ in V gives an equivalent p-generator sequence.
1

Proof : The proof follows by observing that a~j can be written as a p-linear combination of vj and v ~ later vectors of V . Say that a p-generator sequence, V , is proper if for each pair of non-zero vectors, ~ ;~ 2 V , if ~ and uv u ~ have the same starting point, then their starting elements are not associates. v
n Lemma 6.7 Every submodule of Zp has a proper p-generator sequence.

Proof : Let V be a p-generator sequence that is not proper. Say that vectors ~ and ~ are in u v con ict if they have the same starting point, and their starting elements are associates. Among all con icting pairs having the earliest starting point, pick a pair whose starting elements have the highest order. Let vi and vj be this pair, with i > j . Now, we can nd a 2 Zp such that adding ~ ~ a~j to vi zeros out the starting element of vi, i.e., ~ = vi + a~j has a later starting point than vi . v ~ ~ v ~ v ~ By Corollary 6.6, replacing vi by ~ in V gives an equivalent p-generator sequence. Clearly, this ~ v process must terminate, and yield a proper p-generator sequence. We will say that a proper p-generator sequence V = (v1; ; vk ) is in row echelon form if for ~ ~ 1 i < j k either:

1. 2.

vi has an earlier starting point than vj , or ~ ~ vi and vj have the same starting point, and the starting element of vi has higher order than ~ ~ ~ the starting element of vj . ~

Lemma 6.8 Let V = fv1; ; vk g be a p-generator sequence in row echelon form. If vi is non-zero, ~ ~ ~ then a p-linear combination for p~i cannot use any vector vj with j < i. v ~
Proof : Suppose not, and let vl be the earliest vector used. V has at most one vector with a given ~ starting point and order of starting element. Therefore, the remaining vectors used in the p-linear combination cannot zero out the starting element of vl . So, this p-linear combination will either ~ start before vi , or will start at the same point as vi but with an element of higher order than the ~ ~ starting element of vi . In either case we get a contradiction. ~

Corollary 6.9 Let V be a proper p-generator sequence. Then, permuting its vectors so they are in
row echelon form gives an equivalent p-generator sequence. independent.

Lemma 6.10 The non-zero vectors of a p-generator sequence in row echelon form are p-linearly
12

Proof : The proof is along the same lines as Lemma 6.8. Consider any non-trivial p-linear combination of the vectors. Then, the starting element of the earliest vector used cannot by cancelled out by the remaining vectors. Hence, no non-trivial p-linear combination of the vectors can be 0.
n Theorem 6.11 Every submodule of Zp has a p-basis.

Finally, we give below the Gaussian elimination procedure that starts with an arbitrary p-generator n sequence for a submodule of Zp , and nds a p-generator sequence in row echelon form. This procedure is designed along the lines of the usual Gaussian elimination procedure for obtaining a basis in row echelon form for the eld case; it simultaneously carries out the process in Lemma 6.7, together with the permutation of vectors given in Corollary 6.9.
Algorithm Gaussian elimination

1). 2). 3). 4). 5). 6). 7).

While there is a non-zero vector in S do: Find S 0 S , vectors of S having the earliest starting point. Find S 00 S 0, vectors of S 0 having the highest order starting element. Pick the last vector ~ 2 S 00, list it, and set S ? S ? f~ g. v v For each remaining ~ 2 S 00, replace ~ in S by (~ + a~ ), u u u v u v u where a 2 Zp such that (~ + a~ ) starts later than ~ . end.

S ? V.

Theorem 6.12 The process of Gaussian elimination starts with an arbitrary p-generator sequence
for a submodule, and nds a proper p-generator sequence in row echelon form. Its running time is bounded by O(k2n) operations over Zp , where k is the number of vectors in the p-generator sequence.

0044 A p-generator sequence for it is is given below. Since there are two rows starting with a 2 in column one, we add 3 times row 3 to row 2. Next, we add row 6 to row 5. Finally, discarding duplicate rows we get a p-basis.

Example 6 Consider the code over Z generated by: 1 0 1212 B 2042 C A @


8

0 1212 1 0 1212 1 0 1212 1 0 1 B 2042 C B 0426 C B 0426 C B 1212 C B C C B C B B 2424 C B 2424 C B 2424 C B 0426 C B C C B C B C B B 0044 C ?! B 0044 C ?! B 0044 C ?! B 2424 C B C @ C B C B B 4004 C B 4004 C B 0044 C B 0044 C A A A @ A @ @ 4040
4040 4040 4040 13

7 Minimal trellises for codes over rings Zp


In this section we will present a polynomial time algorithm for constructing a minimal trellis for a linear code over a ring Zp , given a generator matrix for it. Let us rst give a natural generalization of the notion of a two-way proper matrix as de ned for the eld case. A p-generator sequence, V will be said to be two-way proper if: 1. for each pair of vectors ~ ;~ 2 V , if ~ and ~ start at the same point, then their starting uv u v elements are not associates, and 2. for each pair of vectors ~ ;~ 2 V , if ~ and ~ end at the same point, then their ending elements uv u v are not associates. Below we give an algorithm that starts with a proper p-generator sequence in row echelon form, V , and nds a two-way proper p-generator sequence having the same span.
Algorithm two-way proper p-generating set

1). 2). 3). 4). 5). 6).

S ? V. While S is not two-way proper do: Find S 0 S , with jS 0j > 1, vectors having the latest ending point,
and moreover their ending elements being associates. Let ~ be the last vector in S 0. v For each remaining ~ 2 S 0, replace ~ in S by (~ + a~ ), u u u v where a 2 Zp such that (~ + a~ ) ends earlier than ~ . u v u

end.

sequence in row echelon form, and nds a two-way proper p-generator sequence with the same span. Its running time is bounded by O(k2n) operations over Zp , where k is the number of vectors in the p-generator sequence.

Lemma 7.1 Algorithm two-way proper p-generating set starts with a proper p-generator

Example 7 The p-basis obtained in Example 6 is not two-way proper. We add row 2 to row 1
and row 4 to row 3 to obtain the nal two-way proper p-basis:

0 1630 1 B 0426 C B C B 2460 C B C B 0044 C A @


4040

Using two-way proper p-generator sequences, our trellis construction algorithm has the same overall structure as the eld case. The trellis for a single vector ~ of the two-way proper p-generator v 14

sequence, V , is required to generate all codewords that can be generated as p-linear combinations of this vector, i.e., f0;~; 2~ ; ; (p ? 1)~ g. This trellis is similar to the trellis for a single vector v v v in the eld case: it has a p-way fork at the time index at which ~ starts, and a p-way collapse at v the time index at which ~ ends. The p out-transitions will be labelled with 0 and associates of the v starting element of ~ , and the p in-transitions will be labelled with 0 and associates of the ending v element of ~ . We will next show that the product of the trellises for the vectors of V is two-way v proper and hence minimal. Let a1 ; ak 2 Zp . For notational convenience, it will be useful to regard these elements as one 1 dimensional vectors belonging to the module Zp . We can then talk about all p-linear combinations of these elements.

Lemma 7.2 Let a ; ak 2 Zp , so that they are pairwise non-associates. Then, their p-linear
combinations give distinct elements of Zp .
1

Proof : Notice that if we start with any elements of Zp that are pairwise non-associates, they will 1 form a p-basis for the one dimensional module Zp . Hence, in particular the p-linear combinations 1 of a1 ; ak will generate distinct elements in Zp . It is easy to see that the converse of the statement in Lemma 7.2 is not true, i.e., one can get an example in which even though a1 ; ak are not pairwise non-associates, their p-linear combinations may still generate distinct elements of Zp . Yet the following holds:
n Theorem 7.3 Let V be a p-basis for a submodule of Zp . Then, the product of trellises for the

vectors of V is a minimal trellis for the submodule generated by V i V is two-way proper.

Proof : Suppose V is two-way proper. Let us show that the product trellis will be forward proper; the proof that it is backward proper is similar. If V has ki vectors, say Vi , that start at time index i, then any state, s, in the product trellis at time index i ? 1 will have pki out-transitions. Since the starting elements of the vectors in Vi are non-associates, by Lemma 7.2, the p-linear combinations of these vectors will all start with distinct elements. The set of symbols on the out-transitions of s consist of some element a 2 Zp added to these distinct elements, and so s is forward proper. Next, suppose V is not two-way proper. Suppose there are two vectors ~ and ~ starting at index u v i, so that their starting elements are associates; the proof in case V has two vectors whose ending points are the same, but ending elements are associates is similar. Now, there are units b; c 2 Zp such that b~ + c~ starts at a later index than i. Let Vi be the set u v of vectors of V that start at index i. Using the fact that V is a p-generator sequence it can be argued that b~ + c~ can be written as a p-linear combination of vectors in Vi ; clearly, this p-linear u v combination is non-trivial. In addition, the trivial p-linear combination of the vectors in Vi also gives a vector that is 0 at time index i. Finally, let s and a be as de ned above. Now, there are two p-linear combinations of vectors in Vi that give out-transitions on symbol a from state s. Therefore, the product trellis is not two-way proper, and hence it is not minimal.

15

Example 8 Consider the code over Z generated by the following two-way proper p-generator sequence: 1 0 1230 B 2020 C A @
4

0222

The trellises for the individual rows as well as the product trellis are shown in Figure 4.

8 Minimal trellises for codes over Abelian groups


We will rst extend our construction algorithm to codes over elementary Abelian groups; this will illustrate in a simpler setting the main ideas in the extension to codes over arbitrary nite Abelian groups. An elementary Abelian group G is isomorphic to a direct product of cyclic p-groups, i.e., m G ' Cp , where p is a prime.

mn over GF (p).

m Lemma 8.1 A length n group code C over G ' Cp can be viewed as a linear code, S, of length

Proof : Using the natural isomorphism between Cp and the additive group of GF (p), we can view C as a length mn code over GF (p), say S. Since C is a group code, so is S. Further, since multiplication in GF (p) is simply repeated addition, S is a linear code over GF (p). Biglieri and Elia 1] have shown that C can be speci ed by a k n generator matrix whose entries m m m are endomorphisms, i;j : Cp ! Cp . Any information vector ~ 2 (Cp )k yields the code word ~ , v v and the set of all code words constructed in this manner constitute C .

Lemma 8.2 Given a generator matrix for C , we can obtain a km mn generator matrix over
GF (p), A, for S.
m m Proof : As shown in 1], an endomorphism : Cp ! Cp can be viewed as an m m matrix, M , m as an m-dimensional row vector ~ with entries from Cp . Then, over Cp. View an element a 2 Cp a ~ M = (a). a Thus, can now be viewed as a k n matrix whose elements are m m matrices over Cp. Intuitively, the km mn matrix A is obtained by simply \removing the demarkations" of the element matrices of . Formally, for 1 i km and 1 j mn, divide i and j by m to obtain quotients and remainders qi ; qj and ri; rj respectively. Now, let the (i; j )th entry of A be the (ri; rj )th entry of the matrix corresponding to qi;qj , i.e.,

A i; j ] = M

qi ;qj ri ; rj ]:

Clearly, A is the generator matrix for code S. The algorithm for obtaining a minimal trellis for C is as follows: First, obtain a minimal trellis T for the linear code S. This trellis will have length mn. Next, sectionalize this trellis by collapsing m successive layers into one layer to obtain trellis T 0: T 0 has length n, and the set of states in layer i 16

in T 0 is the same as the set of states in layer ki in T . States u and v in successive layers of T 0 have a transition i there is a path from u to v in T . If so, each such path gives a symbol from group G (of course, if there are multiple labels on transitions of T , we will get multiple symbols from the same path); these symbols constitute the set of labels on this transition. It is easy to see that if T is two-way proper, then so is T 0 (notice that T 0 may be two-way proper even though T is not).

Lemma 8.3 T 0 is a minimal trellis for C . Example 9 For the elementary Abelian group with four elements, C
(1 (x (y (xy Under the map 1 1 1 1 1) xy xy) y y) x x) 1 (1 (x (y (xy consider the following length 4 group code. This is an MDS code, and it cannot be seen as a linear code over GF (4).
2

C2 = f1; xg f1; yg, x xy ) y 1) xy x) 1 y)

x x x x

xy y) 1 x) x 1) y xy )

(1 (x (y (xy

y y y y

y x) x y) 1 xy ) xy 1)

(1 (x (y (xy

xy xy xy xy

1 ! (00); x ! (01); y ! (10); xy ! (11) this code is same as a length 8 linear code over GF (2). A generator matrix for the original group code is ! ! ! !1 0 00 01 11 10 B 01 00 11 11 C C B C B 01 10 01 11 01 10 11 and a generator matrix for the corresponding code over GF (2) is given below from which we derive the following two-way proper generating matrix:

B B B @

C !C 10 C A

1 1 0 0 11101100 00011110 B 01001111 C B 01111000 C B C C B B 01100110 C ?! B 00101001 C A A @ @


11011011 00011110

Applying the trellis contruction procedures for linear codes we obtain the trellis given in Figure 5(a). Sectionalizing this trellis, and applying the reverse map from GF (2)2 to C2 C2 we obtain, in Figure 5(b), the minimal trellis for the original code. Finally, let us consider the case when G is an arbitrary nite Abelian group. Then, G is isomorphic to the direct product of cyclic groups, i.e.,

G ' (Cp1 11
where p1;

O O

Cp1 1m1 )

O O

(Cpl l1

O O

Cp lml )
l

; pl are distinct primes.


17

Lemma 8.4 Let C be a length n group code over Abelian group G. Let G ' G N G , where the orders of G and G are relatively prime. Then, there are length n group codes C and C over G N and G respectively such that C ' C C .
1 2 1 2 1 2 1 2 1 2

As a consequence of Lemma 8.4, we can decompose C into l codes C1 ; ; Cl. Obtain minimal trellises for these l codes; however, view labels in these trellises as if they were elements of G, by using the natural injection maps. Now, using Theorem 4.1, it is easy to see that the product of these trellises will be a minimal trellis for C . Hence, it is su cient to consider the case

G ' (Cp 1
where 8.2.
1

O O

Cp m )

m.

The proofs of the next two lemmas are identical to those of Lemma 8.1 and
1

Lemma 8.5 A length n group code C over (Cp 1 N N Cp m ), where


a linear code, A, of length mn over Zp , where = m .

m , is same as

Once again, by the result of Biglieri and Elia 1], C can be speci ed by a k n generator matrix whose entries are endomorphisms, i;j : G ! G.

Lemma 8.6 Given a generator matrix for C , we can obtain a km mn generator matrix over
Zp , A, for S.
Now, the structure of the algorithm is similar to the elementary Abelian case. We can obtain a generator matrix for the code over Zp from that for C , and construct a minimal trellis for it. Finally, sectionalizing this trellis will give a minimal trellis for C . Hence, we get:
code over an Abelian group, constructs a minimal trellis for the code. In addition, this algorithm computes s in O(k2n) time.

Theorem 8.7 There is an O(k n + s) time algorithm that given a generator matrix for a group
2

We illustrate the core ideas in the extension to the case of general nite Abelian groups, below:

Example 10 Consider the length 3 group code over C C given by the following generator matrix: ! ! !1 0 1 2 1 0 0 0 B 1 3 0 1 0 0 C C B C B B C B ! ! !C B 0 2 0 0 1 0 C A @
2 4

1 1

0 0

0 1

Observe that here the entries of the rst column of every endomorphism matrix are over Z2 whereas the second column is over Z4 . Since Z2 can be embedded into Z4 by the map i ?! 2i; i 2 Z2 , we can obtain an equivalent generator matrix over Z4 by using this map on the rst column of each 18

endomorphism matrix. Now, as in the previous example, we can view this code as as a length 6 code over Z4 . Applying our algorithm we obtain the following two-way proper generating matrix:

0 000101 1 B 012100 C B C B 222000 C B C B 000022 C B C B 000220 C A @


020200

Applying the trellis contruction procedures for linear codes we obtain the trellis given in Figure 6(a). Sectionalizing this trellis, and applying the reverse map we obtain, in Figure 6(b), the minimal trellis for the original code.

9 Computing local descriptions of minimal trellises


We will present e cient algorithms for the following two problems: Problem I: Given states s and t at time indices i and i + 1, determine if there is a transition from s to t, and if so, the set of labels on this transition. Problem II: Given state s at time index i, compute all states at time index i + 1 that s has transitions to, and the sets of labels on these transitions. The problem of computing all states at time index i ? 1 that have transitions in to s is analogous. Kschischang and Sorokine 15] have given algorithms for these problems for linear codes over elds. Using the notion of p-linearity developed in Sections 6 and 7, these algorithms extend to linear codes over rings Zp . In turn, using the concepts developed in Section 8, these algorithms extend to codes over Abelian groups. Rather than directly presenting the algorithms for codes over Abelian groups, we show below the natural progression of ideas; this will help state the algorithms more clearly. For the eld case, we have modi ed the algorithms of Kschischang and Sorokine, so they start with a two-way proper generator matrix, rather than an arbitrary generator matrix.

9.1 The eld case


Let A be a k n two-way proper generator matrix for a linear code, C , over GF (q ). For each i; 1 i < n, compute ai; bi and ci as follows:

ai is the set of rows of A that are zero in columns i + 1 to n. Linear combinations of these rows of A generate codewords in Ci? . bi is the set of rows of A that are zero in columns 1 to i. Linear combinations of these rows of A generate codewords in Ci+ . ci is the remaining set of rows of A. Linear combinations of these rows of A generate coset representatives for C =(Ci? Ci+ ), and are therefore in one-to-one correspondence with the set of states at time index i in the minimal trellis for C . We will denote state s at time index
19

i by a k-dimensional information vector vs that is zero in the components speci ed by ai and bi . Thus vs A is the coset representative for state s, and vs A + (C =(Ci? Ci+ )) is the set of
codewords that it is responsible for. A succinct representation of the minimal trellis for C consists of A together with ai ; bi and ci for each i; 1 i < n. This information can be computed in O(k2 n) time, and requires O(kn) space. In the following, we will denote the ith column of A by Ai . The algorithm for Problem I is now straightforward: there is a transition from s to t i the sets of codewords they are responsible for have non-empty intersection. This happens i vs and vt are identical on the components speci ed by ci \ ci+1 . If so, the set of codewords that use this transition are: where u ranges over all k-dimensional vectors that agree with vs on positions speci ed by ci and with vt on positions speci ed by ci+1 . So, the set of labels on this transition are given by:
u u

fuAg;

fuAi g;
+1

where u is as speci ed above. This expression can be simpli ed considerably. There are two cases: if bi \ ai+1 = ;, then on the positions speci ed by (ci ci+1), Ai+1 is zero. So, the label on the transition is given by uAi+1 , where from the vectors u given above, we have picked one that is zero on positions (ci ci+1). Otherwise, bi \ ai+1 is a single row of A which is zero everywhere except in column i + 1. In this case, the set of labels on the transition is all of GF (q ). The algorithm is summarized below. It is easy to check that it runs in O(k) time.
Algorithm local description, problem I

1). 2). 3). 4).

If vs and vt are not identical on components speci ed by ci \ ci+1 , then there is no transition from s to t. If bi \ ai+1 6= ;, then the transition from s to t is labelled with GF (q ); else, the transition from s to t is labelled with uAi+1 , where u agrees with vs on positions speci ed by ci , with vt on positions speci ed by ci+1 , and is zero on the remaining positions. end.

Next, we give an algorithm for Problem II. If ci+1 ? ci = ;, then there is only one transition out of state s. It goes to state t which is given by vt, where vt agrees with vs on positions speci ed by ci+1 and is zero everywhere else. The set of labels on this transition can be computed as above. Otherwise, ci+1 ? ci is a single row of A. In this case, there are q transitions out of s, in to states de ned by the following vectors: for each e 2 GF (q ), consider the vector that is e in the position speci ed by ci+1 ? ci, agrees with vs on positions speci ed by ci \ ci+1, and is zero elsewhere. The 20

label is computed as in Step 3 of the algorithm given above. This can be made more e cient by pre-computing vs Ai+1 , and adding to this ef , where f is the symbol in A at row ci+1 ? ci and column i + 1, for each e 2 GF (q ). Clearly, this takes O(k) time.

Example 11 Consider the code over Z generated by the following matrix: 1 0 100202 B 011000 C B C B 001100 C A @
3

000110

Then, and

a3 = f2g; b3 = f4g; c3 = f1; 3g; a4 = f2; 3g; b4 = ;; c4 = f1; 4g:

Since b3 \ a4 = ;, there is only one label on transitions from time index 3 to time index 4. The label on the transition from state (1020) at time index 3 to state (1001) at time index 4 is given by multiplying (1021) with the fourth column of the matrix, giving 2. Since c4 ? c3 6= ;, each state at time index 3 has transitions to 3 states at time index 4.

9.2 Extending to rings Zp


The algorithm and proof are similar to the eld case; the main di erence being that \linear combination" is replaced by \p-linear combination". Let A be a two-way proper p-generator sequencefor code C . As in the eld case, for 1 i < n, we will compute ai ; bi and ci , the rows whose p-linear combinations generate Ci? , Ci+ and coset representatives for C =(Ci?Ci+ ). Suppose A has k rows. Then, a state s at time index i will be represented by a k-dimensional information vector vs that is 0 in positions speci ed by ai and bi . The components of vs speci ed by ci give the p-linear combinationof these rows of A such that vs A is a coset representative for the codewords that s is responsible for. For Problem I, there is a transition from s to t i vs and vt agree on the positions speci ed by ci \ ci+1 . Again, there are two cases: If bi \ ai+1 = ;, then on the positions speci ed by (ci ci+1 ), Ai+1 is zero. In this case, there will be one symbol on the transition, given by uAi+1 , where u agrees with vs on positions speci ed by ci and with vt on positions speci ed by ci+1 , and is zero in the remaining positions. Otherwise, each row speci ed by bi \ ai+1 has a non-zero entry only in the (i + 1)th column. Let be the order of the highest order element among these non-zero entries. Then, using ideas from Section 6, it is easy to show that jbi \ ai+1 j = , and these non-zero entries have distinct orders. In this case, the transition from s to t will have p symbols: add each p-linear combinationof the non-zero entries to uAi+1 , where u is as de ned above. For Problem II, let jci+1 ? ci j = . Again, it is easy to show that . State s will have transitions to p states: construct vt by using an arbitrary p-linear combination on the positions speci ed by ci+1 ? ci, letting vt agree with vs on positions speci ed by ci \ ci+1 , and be zero elsewhere. The set of labels is computed as for Problem I, and this can be made more e cient by doing certain precomputations as in the eld case. Once the succinct representation is computed, the time for solving both problems is O(k) (we are assuming that the ring, and hence , is xed). 21

9.3 Extending to Abelian groups


Let C be a length n code over a nite Abelian group G. As in Section 8, using the Chinese Remainder Theorem, one can show that it is su cient to consider the case

G ' (Cp 1

O O

Cp m )

where 1 m . Also, using Lemmas 8.5 and 8.6, the problem reduces to the case of rings Zp . Let A be the km mn p-generator sequenceover Zp . The main di erences are: w.r.t. A, s and t correspond to states at time indices im and (i + 1)m. So, for example, s has a transition to t i vs and vt agree on components speci ed by cim \ c(i+1)m . Let B be the submatrix of A given by columns im + 1 to (i + 1)m. Then, the set of labels on this transition is given by:
u

fuDg;

where u ranges over all k-dimensional p-linear combinations that agree with vs on positions speci ed by cim and with vt on positions speci ed by c(i+1)m . This expression can be simpli ed as shown in the ring case. The number of symbols on this transition will be pr , where r = jbim \ a(i+1)m j. It is easy to show that r m . Also, if jc(i+1)m ? cim j = r0, then there are pr0 transitions out of s, and again r0 m .

Theorem 9.1 For any nite Abelian group G, there is an algorithm that pre-computes O(kn)
information, in O(k2 n) time, and solves Problem I and Problem II in O(k) time.

10 Transition Space Theorem


In this section, we will present the Transition Space Theorem. This theorem helps de ne a succinct representation for minimal trellises for group codes, using which local descriptions of the trellis can be e ciently computed. However, unlike the succinct representation given for group codes over Abelian groups in Section 9, in general this representation will not be of polynomial size, and so is less useful. Perhaps more importantly, the Transition Space Theorem gives algebraic structural properties of transitions in a minimal trellis for a group code. This theorem is derived as a corollary of the State Space Theorem of Forney and Trott, and can be viewed as a complementary theorem: the State Space Theorem characterizes states in a minimal trellis, and the Transition Space Theorem characterizes transitions. Let k and k denote the set of states and the state map at time index k, k : C ! k . The set of transitions from time index k to k + 1, is called the branch space and is denoted by k;k+1 in 9]. Let k k+1 be the Cartesian product of homomorphisms k and k+1 ,
k k+1 : C ! k k+1 :

Then, k;k+1 = k k+1 ](C ). For conciseness, let us denote k;k+1 by S (k) . We will view S (k) as a length two group code. Then, at time index 1, the codeword pasts,

P? (S (k)) =

' C =(Ck? Ck+ );

22

and the codeword futures,

P+ (S (k)) =
( )

k+1 ' C =(C(k+1)? C(k+1)+ ):

( ( Denote the past subcode at time index 1 by S?k) , and the future subcode by S+k) , i.e.,

S?k = f(a; 0) j (a; 0) 2 S k g


( )

S k = f(0; b) j (0; b) 2 S k g:
( ) + ( )

Then, by applying the State Space Theorem to this length two code, we get:

Theorem 10.1 (Transition Space Theorem) Sk ' k ' k : S?k S k S?k S k


( ) +1 ( ) ( ) + ( ) ( ) +

Let A and B be sets of states at time indices k and k + 1 in the minimal trellis,T , for code C . We will say that there is a clique of transitions from A to B if every state in A has a transition to every state in B in T . The Transition Space Theorem shows that the branch space S (k) is partitioned ( ( into disjoint cliques of transitions, each corresponding to a coset of S?k)S+k) in S (k) . In particular, ( ( the set of transitions in S?k) S+k) will be called the zero clique. See Figure 7 from Example 11 for a good illustration of this fact. The Transition Space Theorem enables us to give a succinct representation of the minimal trellis for a group code: for each time index, k, store the zero clique of transitions and quotient group

Clearly, this information is su cient to compute the local description of the trellis.

Sk : S?k S k
( ) ( ) ( ) +

11 Lattice Codes
Our algorithm can be used for constructing minimal trellises for lattices. Lattice codes constitute an important class of coset codes. An excellent treatment of lattice codes and trellises for lattice codes can be found in 6]. A real N -dimensional lattice is said to be rectangular if it has a generator matrix which is diagonal 2]. A lattice has a nite state trellis diagram with respect to a given set of coordinates if and only if it contains a sublattice that is rectangular with respect to the same set of coordinates. Let M = diag(a1; a2; : : :; aN ) be a generator matrix of a N -dimensional rectangular lattice, say , and R the maximal rectangular sublattice in . Then R has \trivial dynamics" and is the \nondynamical component" of 9]. The quotient = R is a nite Abelian group and the techniques presented in our work can be used to study the dynamical structure of this group. We illustrate this with the following example: 23

Example 12 Let the lattice be generated by 3 2 1 2 0 0 7 6 M = 6 1 ?2 ?3 0 7 60 2 0 0 7 5 4 0 0 3 ?4


The maximal rectangular sublattice R is generated by diag (2; 4; 6; 8) and the quotient = R is isomorphic to a subgroup of Z2 Z4 Z6 Z8 . The generator matrix for this subgroup can be obtained by taking the ith column modulo ai and discarding redundant rows and is shown below. 3 2 1 2 0 0 60 2 3 07 5 4 0 0 3 4 The corresponding trellis diagram is shown in gure 8(a). The trellis diagram for can be obtained by taking the product of this trellis with the trellis for R shown in gure 8(b).

12 Discussion
A natural rst step in extending our work to codes over non-Abelian groups is to consider group codes over semi-direct product groups, for example Dihedral groups. Group codes over such groups, obtainable using multilevel constructions, have been characterized in 10] and a theorem (Theorem 3) on trellis construction has been proposed. We believe that if we obtain minimal trellises for the component codes of the group code rst using our algorithm and then take the product of the resulting trellises, we shall get the minimal trellis for the block group codes discussed in 10]. A further extension to group codes over arbitrary nite non-Abelian groups seems di cult at present since we do not know of a generator matrix description for such codes. In particular, the set of endomorphisms of a non-Abelian group in general do not form a ring. Another research direction worth investigating is using the succinct representation of minimal trellises to obtaining faster decoding algorithms.

13 Acknowledgements
We wish to thank the anonymous reviewer for suggesting several important improvements, including pointing out the application to lattices, and giving Example 12.

References
1] E. Biglieri and M. Elia, \Construction of linear block codes over groups," in proceedings of 1993 IEEE International Symposium on Information Theory, San Antonio, Texas. 2] J.H. Conway and N.J.A. Sloane, \Sphere Packing, Lattices and Groups," 2nd edition, Springer Verlag, 1988. 24

3] F. Fagnani and S. Zampieri, \Dynamical systems and convolutional codes over nite Abelian groups," IEEE Trans. on Inform. Theory, this issue. 4] G. D. Forney, \The Viterbi Algorithm," Proceedings of the IEEE , vol. 61, 1973. 5] G. D. Forney, \Coset codes - part I: introduction and geometrical classi cation," IEEE Trans. on Inform. Theory, vol. IT-34, pp. 1123-1151, 1988. 6] G. D. Forney, \Coset codes - part II: binary lattices and related codes," IEEE Trans. on Inform. Theory, vol. IT-34, pp. 1152-1187, 1988. 7] G. D. Forney, \Geometrically uniform codes," IEEE Trans. on Inform. Theory, vol. IT-37, pp. 1241-1260, 1991. 8] G. D. Forney, \Dimension/length pro les and trellis complexity of linear block codes," IEEE Trans. on Inform. Theory, vol. IT-40, pp. 1741-1752, 1994. 9] G. D. Forney and M. Trott, \The dynamics of group codes: state spaces, trellis diagrams, and canonical encoders," IEEE Trans. on Inform. Theory, vol. IT-39, pp. 1491-1513, 1993. 10] R. Garello and S. Benedetto, \Multi-level construction of block and trellis group codes," IEEE Trans. on Inform. Theory, vol. IT-41, pp. 1257-1264, 1995. 11] A. R. Hammons, P. Vijay Kumar, A. R. Calderbank, N. J. A. Sloane, and P. Sole, \The Z4-linearity of Kerdock, Preparata, Goethals, and related codes," IEEE Trans. on Inform. Theory, vol. IT-40, pp. 301-319, 1994. 12] M. Isaksson and L. H. Zetterberg, \Block-coded M -PSK modulation over GF (M )," IEEE Trans. on Inform. Theory, vol. IT-39, pp. 337-346, 1993. 13] F. R. Kschischang, \The Trellis structure of maximal xed-cost codes," IEEE Trans. on Inform. Theory, this issue. 14] F. R. Kschischang, P.G. de Buda and S. Pasupathy, \Block coset codes for M -ary phase shift keying," IEEE Journal on Selected Areas in Communications, vol. 7, pp. 900-913, 1989. 15] F. R. Kschischang and V. Sorokine, \On the trellis structure of block codes," IEEE Trans. on Inform. Theory, vol. IT-41, no. 6, Nov 1995. 16] A. Lafourcade and A. Vardy, \Lower bounds on trellis complexity of block codes," manuscript, 1995. 17] H. Loeliger and T. Mittelholzer, \Convolutional codes over groups," IEEE Trans. on Inform. Theory, this issue. 18] H. Loeliger, G. D. Forney, T. Mittelholzer and M. Trott, \Minimality and observability of group systems," Linear Algebra and its Applications Vol. 205-206, pp. 937-963, 1994. 19] H. Matsumura, Commutative Ring Theory, Cambridge University Press, 1986. 20] D. J. Muder, \Minimal trellises for block codes," IEEE Trans. on Inform. Theory, vol. IT-34, pp. 1049-1053, 1988. 25

21] J. G. Proakis, Digital Communications, McGraw Hill, 1989. 22] G. Ungerboeck, \Channel coding with multilevel/phase signals," IEEE Trans. on Inform. Theory, vol. IT-28, pp. 55-67, 1982. 23] J. C. Willems, \From time series to linear systems, Part I," Automatica , vol. 32, pp. 561-580, 1986. 24] J. C. Willems, \From time series to linear systems, Part II," Automatica , vol. 32, pp. 675-694, 1986. 25] J. K. Wolf, \E cient maximum likelihood decoding of linear block codes using a trellis," IEEE Trans. on Inform. Theory, vol. IT-24, pp. 76-80, 1978.

26

0 0 0 3 0 1 4 0 2 0 0

0 0 2
1

2 3

1 4 3

Figure 1: The trellis for a single vector (example 1)

27

(a) 0 0 0 1 1 0

0 0 0 0 1 0 1

0 0 1 1 0 0 0 1 0 1 1

(b) 0 0 1 1 1 0 0 0 1

Figure 2: The trellis from an arbitrary generator matrix (example 2)

28

0 0 0 4 0 0 4 2 6 0 4 4 2 6 1 5 3 7 0 0 0 0 0 0 4 2 6 0 0

1 5 3 7 4

Figure 3: The trellis for the code generated by a single vector over a ring.

29

0 0 0 0 1 2 0 0 0 0 2 0 0 0 0 2 2 0 0 2 0 1 2 3 2 0 0 2 2 0 3 2 1 0 2 0 2 3

2 1 0 3 2

Figure 4: The trellis for Example 8

30

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

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

y xy 1 x x y xy 1 xy y x y x 1 xy x 1 1 x y xy xy y x 1 xy 1 x y x y xy 1 y 1 x xy y xy

Figure 5: The trellis for Example 9

31

0 1 0 3 2 2 0 2 2 2 0 3 2 2 1 3 0 0 1 2 1 0 0 0 0 2 3 2 0 0 1 2 3 2 3 0 2 1 1 0 2 2 3 0 2 0

2 3 5 6 0 4 7 6 3 2 1 0 1 7 4 6 7 1 2 4 5 3 7 2 0 0, 6 6 1 0 51 4 7 3, 5 3 2 6 5 5 4 0 3 1, 7

2, 4

Figure 6: The trellis for Example 10

32

s1 2 s2 s3 1 0 2 0 1

0 2

t1 t2 t3

0 0 1 2 0 0 1 1 2 2 1 2 1 0 2 1 2 0 1 0 1 2 2 1 0 2 1

0 0 2 0 1 0 2 1 0 0 2 2 0 1 2 0 1 2 0 1 2 1 0 1 2 1 2 1 2

0 2 0 1 0 2 1 0 2 1 2 0 1

0 1 2

0 2 1 0

Figure 7: The trellis for Example 11

33

(a) 1

0 4

2 0 0 (b)

3 0 0

2Z

4Z

6Z

8Z

Figure 8: The trellis for Example 12

34

You might also like