A polynomial time reduction from the multi-graph isomorphism problem to additive code equivalence

We present a polynomial time reduction from the multi-graph isomorphism problem to the problem of code equivalence of additive codes over finite extensions of ${\mathbb F}_2$.


Introduction
Let F be a finite field of characteristic p, where p is a prime. An additive code of length n over F is a subset of F n with the property that for all u, v ∈ C, we have that u + v ∈ C. It is easy to prove that an additive code over F is linear over F p , the finite field with p elements. Thus, an additive code over F can be defined as the row space over F p of a matrix whose elements are from F . The code equivalence problem for additive codes is the following. Given two k × n matrices over F , when is there a permutation of the columns of one of the matrices, together with a permutation σ i , for i ∈ {1, . . . , n}, which is a permutation of the elements of F in the i-th coordinate, so that the row-spaces over F p are the same. If F = F p then an additive code is linear and if, furthermore, p = 2 then the code is a binary linear code. If the permitations σ i are all additive then the codes are additively equivalent. It is not known if equivalent additive codes are necessarily additively equivalent, see [1].
A multi-graph is a graph whose edges are assigned a weight from {1, . . . , h}, for some natural number h. An edge joining vertices u and v of weight w is interpreted as w edges joining u and v. The multi-graph isomorphism problem is the following. Given two multi-graphs determine if there a bijection between the set of vertices which induces a bijection on the edges. i.e. edges of weight w are mapped to edges of weight w. If h = 1 then a multi-graph is simply a graph.
In [7], Petrank and Roth provide a polynomial time reduction from the graph isomorphism problem to the binary linear code equivalence problem. The graph isomorphism problem is in NP but is not known to be NP-complete. The problem is not known to be solvable in polynomial time either and is therefore a good candidate to belong to the computational complexity class NP-intermediate. Known algorithms for graph isomorphism include McKay's Nauty algorithm [5], Ullmann's algorithm [10], the VF2 algorithm [3] and the parameterised matching algorithm [6]. All these algorithms have exponential worst case performance. Solving isomorphism generally takes much longer time if there is no match, since all possible mappings are eventually searched until it is shown that there is no isomorphism. The latter extends to multi-graph isomorphism and is based on a parameterised sequence which is a walk that covers every vertex in the graph.
In this note we extend the polynomial time reduction of Petrank and Roth [7] to a polynomial time reduction of multi-graph isomorphism to additive code equivalence, where the code is over an extension of F 2 . Since a graph on n vertices has at most 1 2 n(n − 1) edges, we assume that the multi-graph has h 1 2 n(n − 1) weights and that these are from the set {1, . . . , h}.

The reduction of multi-graph isomorphism to additive code equivalence
Let Γ be a multi-graph with vertex set V , whose edges have weights belonging to the set {1, . . . , h}. Let A be the incidence matrix of Γ, whose rows are indexed by the edges, whose columns are indexed by the vertices and where the edge-vertex entry is equal to the weight of the edge if the edge is incident with the vertex and zero otherwise. Let E denote the set of edges of Γ and let E i be the subset of E of edges of weight at least i (so E 1 = E).
Let e be a primitive element of F 2 r , where r > log 2 h. Let D i be the |E i | × |E i | diagonal matrix indexed by the edges of E i whose diagonal entry is e j−1 , where j is the weight of the edge indexing the row of D i .
We map Γ to the additive code which is the F 2 -row span of the |E| × N matrix where O i is a matrix of zeros, whose dimensions are determined by the fact that the matrix G(Γ) is a |E| × N matrix and the matrix D i is a |E i | × |E i | matrix.
The following two observations will be vital.
(O1) The row of G(Γ) indexed by an edge of weight i is a codeword of weight h + 3 + i whose coordinates are either 0 or e i−1 .
(O2) The only codewords of weight at most 2h + 3 are rows of G(Γ).
The following is the main theorem of this note.
Theorem 1. The multi-graphs Γ and Γ ′ are isomorphic if and only if the additive codes generated by G(Γ) and G(Γ ′ ) are equivalent.
Proof. Suppose the multi-graphs Γ and Γ ′ are isomorphic. Then there is a permutation of the columns of A and a permutation of the rows of A, which gives A ′ , the incidence matrix of the multi-graph Γ ′ . Apply the column permutation to the last |V | columns of Γ and the permutation of the rows of A to the rows of G(Γ). Since the permutation of the rows of A, takes edges of weight i to edges of weight i, it takes codewords of weight h + 3 + i, which are rows of G(Γ), to codewords of weight h + 3 + i, which are rows of G(Γ ′ ) by (O1) and (O2). Thus, G(Γ) and G(Γ ′ ) generate equivalent codes.
Now suppose the additive codes generated by G(Γ) and G(Γ ′ ) are equivalent. Then, by definition, there is an N × N permutation matrix P , a |E| × |E| change of basis matrix S and permutations σ i , i ∈ {1, . . . , N}, such that we can apply P to the columns of G(Γ), S to the rows of G(Γ) and the permutation σ i to the i-th coordinate and obtain a matrix whose generates, over F 2 , the same code as G(Γ ′ ).
Properties (O1) and (O2) imply that the change of basis matrix S is in fact a permutation matrix, since rows of G(Γ) must be mapped to rows of G(Γ ′ ). Furthermore, S maps codewords of weight h + 3 + i to codewords of weight h + 3 + i, so the initial N − |V | columns of SG contain each vector of weight one, with a non-zero coordinate indexed by an edge of weight i, precisely h + 1 + i times. Hence, the first N − |V | columns of G ′ can be obtained by permuting the first N − |V | columns of SG. This permutation of the columns then maps the columns of A to columns of A ′ .
The permutation σ i must fix all elements of F appearing in the i-th column of a column of A, since by property (O1) the rows of G(Γ ′ ) of weight h + 3 + i have coordinates 0 or e i−1 .
Hence, we obtain G(Γ ′ ) from G(Γ) by applying a permutation of the columns of A and a permutation of the rows of A. Thus, Γ and Γ ′ are isomorphic.
The polynomial time reduction follows from Theorem 1, by noting that |N| < chn 2 < n 4 , for some constant c. Note also that we can replace equivalence with additive equivalence, since the permutations σ i are always trivial.
It is interesting to ask if N could be decreased, possibly by increasing the size of the field extension. For h = 2 it is possible to reduce N to 3|E 1 | + |E 2 | + |V | by simply deleting one of the initial D 1 matrices. One can check that the proof still works, although a little more subtlety is required. Observe that the sum of two codewords of weight 5 (corresponding to edges of weight one) cannot produce a codeword of weight 6 since this would require a repeated single edge, which is an edge of weight two.

Code equivalence algorithms
We discussed known algorithms for solving the graph isomorphism problem in the introduction. Algorithms for solving binary linear code equivalence include Bouyukliev's algorithm [2], which is similar to McKay's graph isomorphism algorithm [5], Leon's algorithm [4] and the support splitting algorithm of Sendrier [8], [9]. The latter does not apply to all binary linear codes but it is interesting because it is fast for binary linear codes in which the dimension of the hull H(C) = C ∩ C ⊥ is small. It seems that this is the case for codes obtained from the polynomial time reduction of the graph isomorphism problem due to Petrank and Roth [7]. This warrants further investigation.
The support splitting algorithm allows one to determine signatures from the weight distribution of the hull of truncated binary linear codes, truncating one coordinate at a time. This works because one of the hulls of either the truncated code or the truncations of its dual is non-trivial. This can be seen as follows. Let C i be the code obtained from C be setting the i-th coordinate to zero in all codewords. Suppose that H(C) = {0}. Thus, F n 2 = C ⊕ C ⊥ . Without loss of generality, we consider a truncation on the first coordinate. We have that for some u ∈ C and v ∈ C ⊥ .
This truncation trick does not carry over to additive codes. It is possible that both H((C ⊥ ) 1 ) and H(C 1 ) are trivial. However, if we are interested in establishing additive equivalence then we can employ a slightly modified support splitting algorithm; instead of removing the i-th coordinate we take a subspace. In effect, truncating in the binary case would be equivalent to taking the subspace {0}. This is done in the following way. The i-th column of a generator matrix for C is a vector v i ∈ F k 2 r , where |C| = 2 k . Writing v i out over the basis {1, α, . . . , α r−1 } of F 2 r over The subspace ρ i is unaffected by an additive permutation on the i-th coordinate, which only has the effect of changing the basis. Thus, we can select a subspace π i of ρ i and replace the i-th column of the generator matrix with the corresponding vector of F k 2 r obtained from the subspace π i by reversing the construction of ρ i above. This code we denote by C i,π i , where i is the selected coordinate and π i is the subspace. For equivalent codes, we have that selecting a coordinate and a subspace in C, there must be a corresponding coordinate and subspace in C ′ which is equivalent, i.e. C i,π i is equivalent to C ′ i ′ ,π ′ i ′ , for some i ′ and π ′ i ′ . The weight distribution of the hull of C i,π i can then be used as a signature with an aim of establishing the permutation taking C to C ′ , as in the support splitting algorithm.