On the Intractability of Permuting a Block Code to ... - CiteSeerX

Report 4 Downloads 67 Views
On the Intractability of Permuting a Block Code to Minimize Trellis Complexity Gavin B. Horn

and

Frank R. Kschischang

March 25, 1996

Abstract | An important problem in the theory and application of block code trellises

is to nd a coordinate permutation of a given code to minimize the trellis complexity. In this paper we show that the problem of nding a coordinate permutation that minimizes the number of vertices at a given depth in the minimal trellis for a binary linear block code is NP-complete.

Keywords: permutation trellis complexity, NP-completeness.

I. Introduction Although the codes obtained by permuting the coordinates of a linear block code are equivalent, it is well known that the minimal trellises for these equivalent codes in general are not equivalent [1{7]; in particular, di erent coordinate permutations may yield trellises with di erent state complexity pro les. As J. L. Massey pointed out some time ago [2]: \the art of trellis decoding of a linear code [is] that of re-arranging the order of digits in the code word to obtain a non-systematic code for which [the trellis complexity] is as small as possible." In this paper we show that the problem of minimizing the ith component of the state complexity pro le is a hard problem in the same sense that many well-known problems in computer science (like the travelling salesman problem) are hard: namely that the problem is NP-complete [8]. It is widely believed that P 6= NP, i.e., that no algorithms that nd This paper was presented, in part, at the 32nd Allerton Conference on Communication, Control, and Computing, Allerton Park, Illinois, Sept. 1994. G. B. Horn was with the Department of Electrical and Computer Engineering, University of Toronto. He is now with the Department of Electrical Engineering, California Institute of Technology, Pasadena, CA. F. R. Kschischang is with the Department of Electrical and Computer Engineering, University of Toronto, Toronto, Ontario, M5S 3G4, Canada. 

1

solutions to NP-complete problems with a running time bounded by a polynomial function of the length of the problem input exist. Indeed, if a polytime algorithm were found for any NP-complete problem, then a polytime algorithm would exist for every problem in NP. Thus, optimal solutions to the coordinate ordering problem appear to be computationally infeasible, at least for large codes. Many problems in coding theory are known to be hard, and some have formally been proved NP-complete: for example, \Linear Decoding," the general problem of maximumlikelihood decoding an arbitrary binary linear block code used on a binary symmetric channel [9]. This problem remains hard even when arbitrary preprocessing of a given code is allowed [10]. Similarly, the problems of nding a codeword with least weight not a multiple k, nding a maximum weight codeword, or nding a codeword whose weight is in a given range in a binary linear block code are NP-complete [11]. Even the problem of minimizing the vertex count in the trellis of an arbitrary nonlinear code of length two is NP-complete [12]. Block code trellises appear to be closely related to graphs called binary decision diagrams (BDDs) [13] that are used to represent Boolean functions. The problem of ordering Boolean variables to minimize the size of various types of BDDs has been proved NP-complete [14,15]. We do not exploit this connection here, however. Instead, we present a polynomial-time reduction of a well-known NP-complete problem in graph theory to a restricted version of a linear block code trellis complexity minimization problem. A brief description of trellises and their state space complexity pro les is given in Section II, where a code's state complexity pro le is related to the \partition rank" pro le of the code's generator matrix (or, equivalently, parity-check matrix). In Section III, we de ne the \ith Partition Rank Permutation" (i-PRP) problem and various other problems related to optimizing the state complexity pro le. In Section IV, we prove the main result of this paper, namely that i-PRP is NP-complete. We do this by restricting the input generator (or parity-check) matrix to be the incidence matrix of a graph. Questions about the ranks of certain submatrices of the input matrix then translate to questions about the structure of certain subgraphs of the corresponding graph. A polynomial time reduction from \Simple Max Cut" [8,16] establishes the NP-completeness of the graph-theoretic PRP problem, which, by restriction, establishes the NP-completeness of i-PRP. Some concluding remarks are made in Section V. 2

II. State Complexity Pro les Formal de nitions of block code trellises are given, e.g., in [2, 12, 17]. Brie y, a trellis for a block code C of length n is an edge-labeled directed graph with a distinguished \root" vertex having in-degree zero and a distinguished \goal" vertex have out-degree zero, with the properties that: 1. all vertices can be reached from the root; 2. the goal can be reached from all vertices; 3. the number of edges traversed in passing from the root to the goal along any path is n; and 4. the set of n-tuples obtained by \reading o " the edge labels encountered in traversing all paths from the root to the goal is C . It is useful to think of the number of edges needed to reach a given vertex from the root as the \depth" or \time index" of that particular vertex. Vertices with the same depth are referred to as the trellis \states" at that depth. The minimal trellis for a linear block code C over GF (q) can be constructed in a number of di erent (but equivalent) ways, e.g., [1, 2, 12]. For linear codes, the set of states in the minimal trellis at a given depth i can be characterized [3,18] as a vector space over GF (q). Denoting the dimension of this vector space by si(C ), this means that there are qs (C) states at depth i. The vector (s0(C ); : : :; sn (C )) is the state complexity pro le of C [7]. Its maximum component is smax(C ) = maxifsi(C )g. If C 0 is a code equivalent to C obtained by permuting the coordinates of C , then smax(C 0) 6= smax(C ) in general. For example, the (8,4) binary Reed-Muller code, obtained by extending the cyclic (7,4) Hamming code has a state space complexity pro le (0; 1; 2; 3; 4; 3; 2; 1; 0), with smax = 4, whereas, when expressed in the coordinate ordering obtained from the iterated squaring construction described in [3], the (8,4) code has state space complexity pro le (0; 1; 2; 3; 2; 3; 2; 1; 0), with smax = 3. The minimum smax(C ) over all coordinate orderings is the state complexity s(C ) of C . The state complexity, s(C ) has been described by Muder [17] as a fundamental descriptive characteristic of the code C . As shown in [3, Appendix] and other papers (notably [18], which treats the problem in a general group-theoretic setting), the state complexity pro le for a given linear code can be obtained in terms of the dimensions of various subcodes and projections of that code. i

3

Let C be a linear code of length n over a eld F . At depth i, denote by Pi? : C ! F n the operator that maps an n-tuple c = (c1; c2; : : : ; cn) to (c1; : : :; ci; 0; : : : ; 0), i.e., the operator that zeroes out the \future" of c. Similarly, denote by Pi+ the operator that maps c to (0; : : : ; 0; ci+1; : : :; cn ), i.e., the operator that zeroes out the \past" of c. The images of C under the operation of these projections are denoted by Pi? (C ) and Pi+ (C ), respectively. The kernel of Pi? : C ! F n is the so-called future subcode Ci+ ; similarly, the kernel of Pi+ : C ! F n is the so-called past subcode Ci?. Clearly, Ci+ is the set of all codewords that are all zero in the past, while Ci? is the set of all codewords that are all zero in the future. Denote by k(C ) the dimension of a code (or vector space) C . The state complexity at depth i is given by [3] si(C ) = k(C ) ? k(Ci? ) ? k(Ci+ ): However, one of the basic properties of linear vector space transformations relates the dimensions of the image and kernel of the transformation to the dimension of the space being transformed: if T : V ! W is a linear transformation with range RT and kernel NT , then k(V ) = k(RT ) + k(NT ). In the context of the linear projection maps Pi? and Pi+ , we see that k(C ) = k(Pi? (C )) + k(Ci+) = k(Pi+ (C )) + k(Ci?): (This is Lemma 1 of [7]). We can therefore write

si = k(Pi? (C )) + k(Pi+ (C )) ? k(C ):

(1)

(This relation also follows from the reciprocal state space theorem for Abelian group codes [19].) Given a generator matrix G for C , the terms on the right hand side of (1) are easily computed in terms of the ranks of submatrices of G. For 0 < i < n, partition G into two submatrices, G = [AijBn?i ] (2) where Ai consists of the rst i columns of G and Bn?i consists of the last n ? i columns of G. Then (1) is equivalent to

si = r(Ai) + r(Bn?i ) ? r(G); 4

(3)

where r() denotes the rank of the enclosed matrix. Note that r(G) = k is a constant for a given (n; k) code. Equivalently, since the state complexity pro le for the dual code C ? of C is identical to that C [3], we can replace the generator matrix G in (2) and (3) with the parity check matrix H (which is the generator matrix for C ?). For 0 < i < n, we de ne the ith partition rank ri(G) of a given matrix G (with entries from some eld) as ri(G) = r(Ai) + r(Bn?i ) (4) where G is partitioned as in (2). We also de ne r0(G) = rn(G) = r(G). Note that ri (G) is preserved under elementary row operations, but not necessarily under column permutations that interchange columns of Ai with columns of Bn?i . De ne rmax(G) = maxi ri(G) to be the maximum partition rank of G.

III. Problem De nitions In this section, we pose various decision problems equivalent to various forms of trellis optimization. These problems are stated in terms of the ranks of submatrices of the generator or parity-check matrix. In Section IV, we obtain related graph-theoretic problems by restricting the input to be graph incidence matrices. The problem of nding a coordinate permutation to achieve s(C ) for a given code C is equivalent to nding a permutation of the columns of a generator matrix (or parity check matrix) for C with minimal maximum partition rank. For binary codes the decision problem corresponding to this optimization problem may be posed as follows:

Problem: Maximum Partition Rank Permutation (max-PRP) Instance: A binary k  n matrix, a positive integer w. Question: Can M be transformed by column permutations into a matrix M 0 having maximum partition rank rmax(M )  w? We also de ne two related problems.

Problem: ith Partition Rank Permutation (i-PRP) Instance: A binary k  n matrix, positive integers w and i. 5

Question: Can M be transformed by column permutations into a matrix M 0 having ith partition rank ri(M )  w? Problem: Vector Partition Rank Permutation (vector-PRP) Instance: A binary k  n matrix M , a vector of integers (w0; w1; : : :; wn). Question: Can M be transformed by column permutations into a matrix M 0 have ith partition rank ri(M 0)  wi for all i, 0  i  n? It is easy to see that all of these problems are in NP, as the vector of partition ranks (r0; r1; : : : ; rn) of any candidate solution is easily obtained in polynomial time, using standard algorithms from linear algebra. In the case of max-PRP and i-PRP, if there were a polytime algorithm for the decision problem, there would also be a polytime algorithm for the optimization problem: one would simply input w = 1; 2; 3; : : : to the decision problem, and retain the solution corresponding to the smallest w for which the decision algorithm returns an armative answer.

Theorem 1 i-PRP is NP-complete. Proof: See Section IV.

A simple corollary to this theorem is the following.

Corollary 1 Vector-PRP is NP complete. Proof: An input to i-PRP is easily transformed to an input to vector-PRP by taking wi = w and wj = 1, j = 6 i.

Unfortunately, neither Theorem 1 nor Corollary 1 establishes the NP-completeness of max-PRP.

IV. Proof of Theorem 1 A. Graph Problems Our main approach in tackling the matrix PRP problems de ned in the previous section is to restrict the input matrix to be the incidence matrix of a graph. With this restriction, we obtain graph-theoretic versions of the problems. Speci cally, let G = (V; E ) be a graph with n edges, m vertices and no self-loops. Order the edges as fe1; : : :; eng and the vertices as fv1; : : :; vmg. De ne an m  n incidence matrix 6

M = [mij ] whose m rows correspond to the m vertices and whose n columns correspond to the n edges, as follows: (

ej is incident on vi, and mij = 10 ifotherwise. The incidence matrix, M , of a graph will have exactly two 1s in each column. This implies that the last row of M is the modulo two sum of the rst m ? 1 rows, so that the rank of M is at most m ? 1. Indeed, it is a standard result from graph theory [20] that the rank of the incidence matrix of a graph is equal to the rank of the graph, where the rank the rank r(G) of a graph G is de ned as the number of vertices m minus the number of connected components of G. In other words, if M is an incidence matrix for G,

r(G) = r(M ): Codes with generator or parity-check matrices that are the incidence, circuit, or cut-set matrices of a graph have been studied by several authors (e.g., [21{25]). It is important to note that the set of codes generated by a matrix having exactly two 1s in each column is a proper subset of the set of all binary codes. However, we will prove that the i-PRP problem is NP-complete for the in nite family of codes with generator matrices in this form; this implies that the i-PRP problem is NP-complete for binary codes in general. Let Ei = fe1; : : :; eig be the set containing the \ rst" i edges of E , and let Ei induce two subgraphs G1(i) = (V1; Ei) and G2 (i) = (V2; E ? Ei ). De ne the ith \graph partition rank" as ri(G) = r(G1 (i)) + r(G2 (i)): It is now straightforward to translate questions about the graph partition rank into questions about the matrix partition rank of the corresponding incidence matrix, and vice-versa. Denoting \Graph PRP" by GPRP, the problems max-GPRP, i-GPRP, and vector-GPRP are de ned as obvious restrictions of the corresponding matrix problems.

B. A Reduction from Simple Max Cut In this section we show that i-PRP is NP-complete by restriction to the (n=2)-GPRP problem. We present a polynomial reduction from Simple Max Cut: 7

Problem: Simple Max Cut (SMC) Instance: A graph G = (V; E ), a positive integer w. Question: Is there a set S  V such that jffu; vg 2 E : u 2 S; v 2 V ? S gj  w? Remark: It is well known [8,16] that SMC is NP-complete. Before proving that n=2-GPRP is NP-complete, we make the following observations. Suppose an edge partition of a graph G = (V; E ) induces a pair of (not necessarily connected) subgraphs G1 = (V1; E1) and G2 = (V2; E2) having I1 and I2 connected components, respectively. Then, since r(G1) = jV1j ? I1, r(G2) = jV2j ? I2 and jV1j + jV2j = jV1 [ V2j + jV1 \ V2j = jV j + jV1 \ V2j it follows that the rank sum can be expressed as

r(G1 ) + r(G2) = jV j + jV1 \ V2j ? (I1 + I2):

(5)

If G1 and G2 are both constrained to be connected, then I1 = I2 = 1, and minimizing the rank sum is equivalent to minimizing jV1 \ V2 j, which is the number of vertices that the two subgraphs have in common. We now prove the main result.

Theorem 2 n=2-GPRP is NP-complete. Proof: We adopt the notation of the i-PRP problem with i = n=2, where n is the number of edges in the given graph G = (V; E ). The problem asks for a partition of E into two subsets of equal cardinality so that the rank sum of the induced subgraphs is not greater than w. It is easy to see that this problem is in NP since a nondeterministic algorithm need only guess a subset E1 of appropriate size from E and check in polynomial time whether r(G1) + r(G2)  w. We show rst how an input to SMC may be transformed into an input for n=2-GPRP. Given a graph G = (V; E ) and a positive integer w as input for SMC,

1. let m = jV j, n = jE j, and U = fu1; : : :; umg satisfy U \ V = ;; 2. let S = V [ U and label the vertices of S as s1; : : : ; s2m, where si corresponds to vi, 1  i  m, and sm+i corresponds to ui, 1  i  m; 3. let T = ffsi; sj g : si; sj 2 S and fvi; vj g 62 E g be the complement of E in the edge set of the complete graph on S ; 4. corresponding to each vertex si 2 S , form a complete graph Si = (Ci; Ai) on m3 vertices, where Ci = fci;1; : : :; ci;m3 g, and Ai = ffa; bg : a; b 2 Cig; 8

5. let C = fC1; : : :; C2mg and A = fA1; : : : ; A2mg; 6. nally, if n ? m is odd let X = fx1; x2g be a set of two vertices and Y = fX g an edge connecting them, otherwise let X = ; and Y = ;. The corresponding input for n=2-GPRP is the graph G0 = (V 0; E 0) and positive integer w0 de ned as

V 0 = C1 [    [ C2m [ X ; E 0 = A1 [    [ A2m [ Y [ ffci;j ; cj;ig : fsi; sj g 2 T g; w0 = 2m4 + m2 ? w + jY j ? 2: This construction is an extended version of the one used by Garey, Johnson and Stockmeyer [16] in their transformation of SMC to Minimum Cut into Equal-Sized Subsets. In that problem, the vertices of a graph must be partitioned into two disjoint sets of equal size with minimum possible number of edges in the cut. In light of the remark following (5), we must partition the edges of G0 into disjoint sets of equal size with the minimum possible number of vertices in common. The main addition to the construction of [16] is the substitution of the original 2m vertices created by their transformation with 2m complete graphs on m3 vertices, S1; : : :; S2m. The edge Y in the construction merely ensures that G0 has an even number of edges. The construction can obviously be performed in polytime because there are O(m4) vertices in the nal resulting graph. An example of the construction is shown in Fig. 1. There are certain properties of G0 that will be required in the main proof, and since their proofs are not straightforward, we present them here as lemmas.

Lemma 1 Let B = (S; T ) be the graph, with jS j = 2m, produced by the rst 3 steps in

the above construction, and assume that B is not complete, or equivalently that the original graph G has at least one edge. Partition S into two equal-sized subsets N1 and N2 so that ffu; vg 2 T : u 2 N1; v 2 N2g is a cut of size t < m2. If G1 = (N1; A1) and G2 = (N2; A2) are the corresponding induced subgraphs, then

t  jjA1j ? jA2jj:

Proof of lemma. The proof is by contradiction. Let G = (V; E ) be an arbitrary graph that

is transformed into B = (S; T ) by the rst three steps of the construction. Partitioning S as 9

N1 = U and N2 = V will result in a cut of size t = m2. Thus N1 \ V 6= ;, and N2 \ V 6= ;. Indeed, if t = m2 ? w, w > 0, then G has a cut of size w induced by partitioning V into V1 = N1 \ V , and V2 = N2 \ V [16]. Since the vertices of U are interchangeable in B , we can assume, without loss of generality, that N1 = (

[ i:vi 2V1

si) [ (

[ i:vi 2V2

sm+i ); N2 = (

[ i:vi 2V2

si) [ (

[ i:vi 2V1

sm+i ):

Now let jA1j  jA2j without loss of generality and assume that t < jA1j ? jA2j. If jV2j = p then w  p(m ? p). This is because there are p vertices in V2 and m ? p vertices in V1 so there can be a maximum of p(m ? p) edges connecting the two. Therefore t  m2 ? p(m ? p). Also if jV2j = p then jA2j  p(m ? p) because the p vertices of V2 in N2 are connected by the construction to m ? p vertices of U in N2. By assumption

jA1j  jA2j + t  p(m ? p) + m2 ? p(m ? p) = m2: Therefore jT j = jA1j + jA2j + t > 2m2, but since jS j = 2m, jT j  2m(2m ? 1)=2. This is a contradiction so t  jjA1j ? jA2jj .

Lemma 2 Let G = (V; E ) be a graph consisting of n isolated complete subgraphs, Km1 ; Km2 ; : : :; Kmn , of m vertices each. Let E1 and E ? E1 be an edge partition with induced subgraphs G1 = (V1; E1) and G2 = (V2 ; E ? E1). If G1 and G2 have I1 and I2 components, respectively, then jV1 \ V2j ? (I1 + I2)  (I1 + I2) ? 2n:

Proof of lemma. For n = 1 and I1 + I2  2, each component in G1 must have at least

2 vertices in V1 which are also in V2 and vice versa. Every new component adds at least 2 vertices to jV1 \ V2j so jV1 \ V2j  2(I1 + I2 ? 1). If I1 + I2 = 1 then either G1 or G2 is a null graph, so jV1 \ V2j = 0 and the inequality holds. For n > 1, let I1i be the number of components of Kmi in G1 and I2i be the number of components of Kmi in G2, so that I1 = Pni=1 I1i and I2 = Pni=1 I2i. For n complete graphs

jV1 \ V2 j 

n X i=1

2(I1i + I2i ? 1):

Therefore jV1 \ V2j ? (I1 + I2)  (I1 + I2) ? 2n. 10

Lemma 3 Let G0 (from the construction) be partitioned into two disjoint subgraphs G01 = (V10; E10 ) and G02 = (V20; E20 ), with E 0 = E10 [ E20 , E10 \ E20 = ; and jE10 j = jE20 j, such that r(G01) + r(G02 )  w0 = 2m4 + m2 ? w + jY j ? 2. If I1 and I2 are the number of components of G01 and G02, respectively, then I1 + I2  3m2 for m  4. Proof of lemma. There are 2m4 vertices in V 0 (ignoring X ), so from (5) jV10 \ V20j ? (I1 + I2)  m2 ? w ? 2  m2 ? 2: From the construction there are 2m complete graphs Si, so from Lemma 2 the maximum number of components that all the Si can contribute to I1 + I2 is less than or equal to m2 + 4m ? 2. Similarly all the edges connecting the di erent Si's can form a maximum of m2 components. Therefore I1 + I2  2m2 + 4m ? 2  3m2, for m  4.

Lemma 4 Let G = (V; E ) be a complete graph of m > 1 vertices. If E1 and E ? E1 is an edge partition with induced subgraphs G1 = (V1 ; E1) and G2 = (V2 ; E ? E1 ) then either

V1 = V or V2 = V .

Proof of lemma. The proof is by contradiction. Assume V1 6= V and V2 6= V . Take u 2 V ? V1 and v 2 V ? V2. If u 6= v, the edge fu; vg 2 E cannot be in E1 or E ? E1 as neither V1 nor V2 contain both u and v. If u = v, then pick any other vertex w = 6 u. Then the edge fw; ug is in neither E1 nor E ? E1. In both cases, at least one edge of E is neither E1 nor E ? E1, which is impossible. Suppose now that the original SMC problem has a solution, i.e., that there is a partition V = V1 [ V2 such that jffu; vg 2 E : u 2 V1; v 2 V2gj  w. We must show that E 0 can be split into two disjoint subsets of equal size to induce two subgraphs with rank sum  w0. First, we partition the vertices of the Si to form two subsets N1 and N2, as follows. Let

N1 = (

[ i:vi 2V1

Ci) [ (

[ i:vi 2V2

Cm+i ); N2 = (

[ i:vi 2V2

Ci) [ (

[ i:vi 2V1

Cm+i )

and let G1 and G2 be the corresponding induced subgraphs. Correspondingly partition the vertices of S to form U1 and U2 where U1 = fsi 2 S : Ci 2 N1g and U2 = fsi 2 S : Ci 2 N2g. Note that G1 and G2 are connected, and each has rank r(G1) = r(G2 ) = m4 ? 1. Not counting Y , there remain

t = jffu; vg 2 E 0 : u 2 N1; v 2 N2gj 11

= jffu; vg 2 T : u 2 U1; v 2 U2gj = m2 ? jffu; vg 62 T : u 2 U1; v 2 U2gj = m2 ? jffu; vg 2 E : u 2 V1; v 2 V2gj  m2 ? w unassigned edges. Both G1 and G2 contain the same number of complete graphs Si, so the complete graphs contribute the same number of edges to each. Ignoring these edges and considering only the edges that connect the complete graphs Si to one another, by Lemma 1 the di erence between the remaining edges in G1 and G2 is less than or equal to t. These remaining edges can be assigned (arbitrarily) to G1 and G2 to form G01 and G02, each having an equal number of edges with any imbalance made up by the appropriate assignment of Y . Since none of these edges have any vertices in common, this adds t vertices to the total rank; in fact, it is easy to see that

r(G01 ) + r(G02) = 2m4 ? 2 + t + jY j  2m4 + m2 ? w + jY j ? 2 = w0: Conversely, suppose now that there is a solution to the n=2-GPRP problem, i.e., a partition of G0 into two disjoint subgraphs G01 = (V10; E10 ) and G02 = (V20; E20 ) with E 0 = E10 [ E20 , E10 \ E20 = ; and jE10 j = jE20 j = n=2, such that the graph partition rank rn=2(G0) = r(G01) + r(G02)  w0 = 2m4 + m2 ? w + jY j ? 2. Remove the isolated edge Y (if it exists) from G0, and assume it belonged to E20 without loss of generality. We also assume m > 4 so Lemma 3 applies. By Lemma 3 and (5)

jV10 \ V20j  4m2 ? w ? 2: There are m7 ? m4 + 2m2 ? m ? n edges in G0 . De ne j = jfE10 \ Ai : 1  i  2mgj to be the number of edges in E10 contributed by the complete graphs Si, then 7 4 j  m ?2 m ? (2m2 ? m ? n):

12

There are (m6 ? m3)=2 edges and m3 vertices in each Si, so then

jV 0j 1

&

m7 ? m4 ? (2m2 ? m ? n)   m6 ? m3 ' 2 & 2  m4 ? 4mm3 ??21m  m4 : m3 

2

!'

Similarly jV20j  m4. Now jV10j = jV 0j?jV20j + jV10 \ V20j, so jV10j  m4 +4m2 and by symmetry jV20j  m4 + 4m2. By Lemma 4, each Ci must be in either V10 or V20. Therefore based on the upper and lower bounds for jV10j and jV20j, there have to be exactly m sets of complete graph vertices Ci in V10 and m sets of complete graph vertices Ci in V20. This is because all 2m4 vertices in V 0 have to be in either V10 or V20, so V10 and V20 must have at least m set of Ci each. V10 and V20 can not have more than m sets of Ci due to the upper bounds on their size. So every valid n=2-GPRP solution has a form in which V10 contains exactly m of the Ci and V20 contains the other m of the Ci. Garey, Johnson and Stockmeyer [16] in their transformation of SMC to Minimum Cut into Equal-Sized Subsets proved that a split of this type must have at least one Ci , m +1  i  2m in each of G01 and G02. This means that it is possible to modify G01 and G02 so that both are connected without increasing their rank sum. This is because each edge that is removed from G02 to connect two disconnected components in G01 will result in the rank of G01 increasing by 1 (as there is now one less component in G01) and the rank of G02 decreasing by 1 (because the edge is either an isolated edge, or an articulation point in G02) and vice versa. This can be done in polynomial time as it is simple to check if each edge in G02 connects two components of G01 and the number of edges in G02 is bounded by a polynomial function of m. V1 and V2 can now be found from G01 and G02 by the following procedure. Note that after each step, the resulting graphs are renamed B1 = (Q1; R1) and B2 = (Q2; R2). 1. Modify G01 and G02 so that both are connected without increasing their rank sum and let B1 = (Q1; R1) and B2 = (Q2; R2) be the resulting graphs. From (5), jQ1 \Q2j  m2 ?w. 2. Collapse the \complete graphs," i.e., remove every edge in A and replace each Ci 2 C with a single vertex si; 1  i  2m. 3. Remove all edges ffu; vg 2 R1 [ R2 : u 2 Q1; v 2 Q2g. This removes t  m2 ? w edges because each vertex in jQ1 \ Q2j of step (1), corresponds to at most 1 edge in R1 or R2 of step (2). 13

4. Finally remove all the isolated vertices in B1 and B2. Now V = V1 [ V2, where V1 = Q1 \ V and V2 = Q2 \ V , is a partition for G satisfying:

jffu; vg 2 E : u 2 V1; v 2 V2 gj    

jffu; vg 62 R1 [ R2 : u 2 Q1; v 2 Q2gj m2 ? jffu; vg 2 R1 [ R2 : u 2 Q1; v 2 Q2gj m2 ? t m2 ? (m2 ? w) = w:

Thus G has a cut of weight w if and only if E 0 can be partitioned into two disjoint sets E10 , E 0 ? E10 , with jE10 j = jE 0 ? E10 j, so that the disjoint induced subgraphs G01 = (V10; E10 ) and G02 = (V20; E20 ) have rank sum satisfying r(G01) + r(G02 )  w0. Since n=2-GPRP is a restricted version of the more general i-PRP problem, and n=2GPRP is NP-complete, it follows (since i-PRP is in NP) that i-PRP is NP-complete. This is our main result.

V. Concluding Remarks The main result of this paper is a proof that the i-PRP problem|equivalent to the problem of minimizing the ith component of the trellis state complexity pro le|is NP-complete. There seems to be a close relationship between max-PRP|equivalent to the problem of nding a coordinate permutation that achieves the state complexity of a given code|and i-PRP. This leads us to conjecture that max-PRP is also NP-complete, but we have so far been unable to prove this, and so propose it as a research problem. Our reduction from Simple Max Cut required the construction of a fairly complicated graph. In principle, every NP-complete problem (indeed, every problem in NP) can be reduced to i-PRP, so it is quite possible that a simpler and more direct NP-completeness proof may be found. Finally, it is important to note that the computation of an optimal coordinate permutation is not a recurring problem in the sense that it needs to be done only once for any given code. For small codes, an exhaustive search (or a search of a traversal of the left cosets of the automorphism group of the code) may be quite feasible. For larger codes, a local search procedure (like that proposed in [26]) may yield acceptable results. 14

Acknowledgements The authors would like to thank Professor S. A. Cook for useful advice and guidance given in the early stages of this work. We also thank Zeljko Zilic for pointing out the connection between block code trellises and binary decision diagrams.

References [1] J. K. Wolf, \Ecient maximum-likelihood decoding of linear block codes using a trellis," IEEE Trans. on Inform. Theory, vol. IT-24, pp. 76{80, 1978. [2] J. L. Massey, \Foundation and methods of channel encoding," in Proc. Int. Conf. Inform. Theory and Systems, vol. 65, (Berlin), Sept. 1978. [3] G. D. Forney, Jr., \Coset codes II: Binary lattices and related codes," IEEE Trans. on Inform. Theory, vol. 34, pp. 1152{1187, Sep. 1988. [4] T. Kasami, T. Takata, T. Fujiwara, and S. Lin, \On the optimum bit orders with respect to the state complexity of trellis diagrams for binary linear codes," IEEE Trans. on Inform. Theory, vol. 39, pp. 242{245, Jan. 1993. [5] T. Kasami, T. Takata, T. Fujiwara, and S. Lin, \On complexity of trellis structure of linear block codes," IEEE Trans. on Inform. Theory, vol. 39, pp. 1057{1064, May 1993. [6] A. Vardy and Y. Be'ery, \Maximum-likelihood soft decision decoding of BCH codes," IEEE Trans. Inform. Theory, vol. 40, pp. 546{554, March 1994. [7] G. D. Forney, Jr., \Dimension/length pro les and trellis complexity of linear block codes," IEEE Trans. on Inform. Theory, vol. 40, pp. 1741{1752, Nov. 1994. [8] M. R. Garey and D. S. Johnson, Computers and Intractability: A Guide to the Theory of NP-Completeness. New York: W. H. Freeman and Company, 1979. [9] E. R. Berlekamp, R. J. McEliece, and H. C. A. van Tilborg, \On the inherent intractability of certain coding problems," IEEE Trans. on Inform. Theory, vol. IT-24, pp. 384{386, May 1978. [10] J. Bruck and M. Naor, \The hardness of decoding linear codes with preprocessing," IEEE Trans. on Inform. Theory, vol. 36, pp. 381{385, March 1990. 15

[11] S. C. Ntafos and S. L. Hakimi, \On the complexity of some coding problems," IEEE Trans. on Inform. Theory, vol. IT-27, pp. 794{796, Nov. 1981. [12] F. R. Kschischang and V. Sorokine, \On the trellis structure of block codes," IEEE Trans. on Inform. Theory, vol. 41, pp. 1924{1937, Nov. 1995. [13] R. E. Bryant, \Graph based algorithms for Boolean function manipulation," IEEE Trans. on Computers, vol. C-35, pp. 677{691, Aug. 1986. [14] S. Tani, K. Hamaguchi, and S. Yajima, \The complexity of the optimal variable ordering problems of shared binary decision diagrams," in Proc. 4th Int. Symp. Algorithms and Computation, ISAAC '93, vol. 762 of Lecture Notes in Computer Science, pp. 389{398, Springer-Verlag, 1993. [15] C. Meinel and A. Slobodova, \On the complexity of constructing optimal OBDDs," Tech. Rep. 94-05, University of Trier, FB IV { Informatik, 1994. [16] M. R. Garey, D. S. Johnson, and L. Stockmeyer, \Some simpli ed NP-complete graph problems," Theoretical Computer Science, vol. 1, pp. 237{267, 1976. [17] D. J. Muder, \Minimal trellises for block codes," IEEE Trans. on Inform. Theory, vol. 34, pp. 1049{1053, Sept. 1988. [18] G. D. Forney, Jr. and M. D. Trott, \The dynamics of group codes: State spaces, trellis diagrams and canonical encoders," IEEE Trans. on Inform. Theory, vol. 39, pp. 1491{ 1513, Sept. 1993. [19] G. D. Forney, Jr. and M. D. Trott, \The dynamics of group codes: Dual group codes and systems." preprint, Sept. 1994. [20] N. Deo, Graph Theory with Applications to Engineering and Computer Science. Englewood Cli s, N.J.: Prentice-Hall, 1974. [21] T. Kasami, \A topological approach to construction of group codes," J. Inst. Elec. Commun. Engrs. (Japan), vol. 44, pp. 1316{1321, Sep. 1961. [22] D. A. Hu man, \A graph-theoretic formulation of binary group codes," in Summaries of papers presented at ICMCI, pt. 3, pp. 29{30, Sep. 1964. 16

[23] W. D. Frazer, \A graph-theoretic approach to linear codes," in Proc. 2nd Annual Allerton Conf. on Circuit and System Theory, pp. 888{898, 1964. [24] S. L. Hakimi and H. Frank, \Cut-set matrices and linear codes," IEEE Trans. on Inform. Theory, vol. IT-11, pp. 457{458, July 1965. [25] S. L. Hakimi and J. G. Bredeson, \Graph theoretic error-correcting codes," IEEE Trans. on Inform. Theory, vol. IT-14, pp. 584{591, July 1968. [26] F. R. Kschischang and G. B. Horn, \A heuristic for ordering a linear block code to minimize trellis state complexity," in Proc. 32nd Annual Allerton Conf. on Communication, Control, and Computing, Allerton Park, Illinois, pp. 75{84, Sept. 1994.

17

(a)

(b)

(c)

Figure 1: An example of the construction showing (a) the original graph of 1 edge and 2 vertices which is input to the SMC problem; (b) the graph after the rst three steps of the transformation; and (c) the nal graph used as input to the n=2-GPRP problem.

18

List of Figures 1

An example of the construction showing (a) the original graph of 1 edge and 2 vertices which is input to the SMC problem; (b) the graph after the rst three steps of the transformation; and (c) the nal graph used as input to the n=2-GPRP problem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

18