aa r X i v : . [ c s . I T ] F e b Distance Enumerators for Number-Theoretic Codes
Takayuki Nozaki
Yamaguchi University, JAPANEmail: [email protected]
Abstract —The number-theoretic codes are a class of codesdefined by single or multiple congruences and are mainly usedfor correcting insertion and deletion errors. Since the number-theoretic codes are generally non-linear, the analysis method forsuch codes is not established enough. The distance enumeratorof a code is a unary polynomial whose i th coefficient givesthe number of the pairs of codewords with distance i . Thedistance enumerator gives the maximum likelihood decodingerror probability of the code. This paper presents an identityof the distance enumerators for the number-theoretic codes.Moreover, as an example, we derive the Hamming distanceenumerator for the Varshamov-Tenengolts (VT) codes. I. I
NTRODUCTION
The number-theoretic codes [1] are a class of codes definedby single or multiple congruences. These codes are mainlyused for correcting insertion and deletion errors [2]–[6] or forcorrecting asymmetric errors [7], [8]. In general, the number-theoretic codes are non-linear. Unfortunately, analysis methodsfor the number-theoretic codes have not been establishedenough compared with linear codes.The distance enumerators for codes characterize the errorcorrecting capability. In particular, the Hamming distance enu-merators [9], [10] are used for analyzing the error probabilityof the maximum likelihood decoder for the codes throughsymbol error channels. The distance enumerator of a code isa unary polynomial whose i th coefficient gives the numberof pairs of codewords with distance i . For linear codes, wecan easily derive the Hamming distance enumerator fromthe Hamming weight enumerator. Thus, many works haveinvestigated the Hamming distance enumerators for the linearcodes.On the other hand, for non-linear codes, the Hammingweight enumerators have been much researched. Delsarte [9]defined the Hamming distance enumerator for linear/non-linear codes and derived an upper bound for the cardinalityof code with designed Hamming distance. Kalai and Linial[10] analyzed the asymptotic behavior of growth rate forthe Hamming distance enumerator. Mimura [11] analyzed theasymptotic growth rate for the Hamming distance enumeratorfor a class of non-linear code ensemble.We introduced the simultaneous congruence (SC) code, ageneral class of the number-theoretic code, in previous work[6]. Moreover, we presented an identity for the Hammingweight enumerators for the SC codes and derived their cardi-nalities. In this paper, we provide an identity for the distanceenumerators for the SC codes. This identity gives the distanceenumerator related to not only Hamming distance but alsoother distances, e.g., Levenshtein distance [3] and Lee distance [12]. This identity can be derived as a natural extension ofthe previous work. This paper also derives the Hammingdistance enumerators for Varshamov-Tenengoltz (VT) codesas an example.The rest of the paper is organized as follows: Section IIdefines notations and definitions used throughout the paper.Section III presents an identity for the distance enumeratorsfor the SC codes. Section IV derives the Hamming distanceenumerator for the VT codes and shows a numerical example.Section V concludes the paper.II. D EFINITIONS AND N OTATIONS
This section gives the definitions and notations usedthroughout the paper. Moreover, we define several codes andthe distance enumerators.Section II-A defines the notations used throughout the paper.Section II-B gives the two general classes of number-theoreticcodes. Section II-C defines the several distances and thedistance enumerators.
A. Notations
Let Z , Z + , R ≥ , and C be the set of all integers, positiveintegers, non-negative real numbers, and complex numbers,respectively. For a, b ∈ Z , denote the integers between a and b , by [[ a, b ]] , i.e., [[ a, b ]] := { i ∈ Z | a ≤ i ≤ b } . In particular wedenote [[ r ]] := [[0 , r − . Let I { P } be the indicator function,which equals if the proposition P is true and equals otherwise. Denote the cardinality of a set T , by | T | . Denotethe vector of length n , by x = ( x , x , . . . , x n ) .For a, b ∈ Z , we write a | b if a divides b . For a, b ∈ Z and n ∈ Z + , denote a ≡ b (mod n ) if ( a − b ) | n . For a, b ∈ Z ,let gcd( a, b ) be the greatest common divisor of a, b . Let i bethe imaginary unit. Define e ( x ) := exp(2 π i x ) . B. Number-Theoretic Codes
Bibak and Milenkovic [4] defined the binary linear congru-ence (BLC) codes as follows:
Definition 1 ( [4]):
Denote the code length, by n ∈ Z + . Let m ∈ Z + , h = ( h , h , . . . , h n ) ∈ Z n , and a ∈ [[ m ]] . Then, theBLC code of length n with parameters m, a, h is defined by BLC a ( n, m, h ) := { ( x , x , . . . , x n ) ∈ { , } n | P ni =1 h i x i ≡ a (mod m ) } . We [6] defined the SC codes by extending the definition ofthe BLC codes as follows:
Definition 2 ( [6, Def. 2]):
Denote the code length, by n ∈ Z + . Let r, s ∈ Z + , m := ( m , m , . . . , m s ) ∈ ( Z + ) s ,nd a := ( a , a , . . . , a s ) ∈ [[ m ]] × [[ m ]] × · · · × [[ m s ]] .For all i ∈ [[1 , s ]] , let ρ i : [[ r ]] n → Z and denote ρ :=( ρ , ρ , . . . , ρ s ) . Then, the r -ary SC code of length n withparameters s, ρ , a , m is C ρ , a , m ( n, r, s ):= { x ∈ [[ r ]] n | ∀ i ∈ [[1 , s ]] ρ i ( x ) ≡ a i (mod m i ) } . There are examples of the number-theoretic codes included inthe SC code in [6]. For h = ( h , h , . . . , h n ) ∈ Z n , definea linear mapping ℓ h as ℓ h ( x ) = P ni =1 h i x i . Then, the BLCcodes is written as C ℓ h ,a,m ( n, ,
1) = BLC a ( n, m, h ) . Section IV investigates Varshmov-Tenengoltz (VT) code[2], which is known as a single insertion/deletion correctingcode. Define a linear mapping ω : [[2]] n → Z as ω ( x ) = P ni =1 ix i . Then, the VT code of length n is defined by thefollowing set: VT a ( n ) := (cid:8) x ∈ { , } n | ω ( x ) ≡ a (mod n + 1) (cid:9) , where a ∈ [[0 , n ]] . The cardinality of VT codes [13], [14]satisfies | VT ( n ) | ≥ | VT a ( n ) | ( a ∈ [[0 , n ]] ). C. Distance and Distance Enumerator
A distance on [[ r ]] n is a function d : [[ r ]] n × [[ r ]] n → R ≥ ,satisfying the following conditions:1) For all x , y ∈ [[ r ]] n , d( x , y ) ≥ . Moreover, d( x , y ) = 0 iff x = y .2) For all x , y ∈ [[ r ]] n , d( x , y ) = d( y , x ) .3) For all x , y , z ∈ [[ r ]] n , d( x , y ) ≤ d( x , z ) + d( z , y ) .The following distances are often used in the coding theory.1) The Hamming distance d H ( x , y ) is the minimum num-ber of substitutions required to change x to y , i.e., d H ( x , y ) := |{ i ∈ [[1 , n ]] | x i = y i }| .2) The longest common subsequence (or insdel) distance d I ( x , y ) is the minimum number of insertions anddeletions required to change x to y .3) The Levenshtein distance d Lev ( x , y ) [3] is the mini-mum number of insertions, deletions, and substitutionsrequired to change x to y .4) The Lee distance d L ( x , y ) [12] is defined by d L ( x , y ) := n X i =1 δ L ( x i , y i ) ,δ L ( x, y ) := min {| x − y | , r − | x − y |} . For a code T ∈ [[ r ]] n , the distance enumerator related to adistance d is defined by D ( T ; z ) = X x ∈ T X y ∈ T z d( x , y ) = n X i =0 D i z i . where D i := |{ ( x , y ) ∈ T | d( x , y ) = i }| represents thenumber of pairs of codewords whose distance is i . We denotethe distance enumerator related to the Hamming distance d H for a code T , by D H ( T ; z ) , and call it Hamming distanceenumerator. Example 1:
To simplify the notation, we denote the binaryvector ( x , x , . . . , x n ) ∈ [[2]] n , by x x . . . x n . Consider VT (5) = { , , , , , } . TheHamming distance enumerator for this code is D H (VT (5); z ) = 6 z + 8 z + 16 z + 6 z . Remark 1:
By normalizing the Hamming distance enumer-ator by the cardinality | T | of the code, we get the averageHamming distance enumerator [9], [10] ¯ D H ( T ; z ) . Since D H ( T ; 0) = D = |{ ( x , y ) ∈ T | x = y }| = | T | , we get ¯ D H ( T ; z ) := D H ( T ; z ) | T | = D H ( T ; z ) D H ( T ; 0) . In words, the average Hamming distance enumerator ¯ D H ( T ; z ) is derived from Hamming distance enumerator D H ( T ; z ) .This paper investigates the extended distance enumerator,which is a generalization of the distance enumerator. Definition 3:
Let n, r, s ∈ Z + . Let ρ i : [[ r ]] n → Z for i ∈ [[1 , s ]] . Denote ρ = ( ρ , ρ , . . . , ρ s ) , u = ( u , u , . . . , u s ) , v =( v , v , . . . , v s ) . We define the extended distance enumeratorparameterized by ρ for a code T ⊆ [[ r ]] n as E ( T, ρ ; z, u , v ) = X x ∈ T X y ∈ T z d( x , y ) Y i ∈ [[1 ,s ]] u ρ i ( x ) i v ρ i ( y ) i . In particular, we denote the extended Hamming distanceenumerator, by E H ( T, ρ ; z, u , v ) . Example 2:
We continue from Example 1. The extendedHamming distance enumerator for VT (5) is E H (VT (5) , ω ; z, u, v )= (cid:0) u v (cid:1)(cid:0) u v (cid:1) + 2 (cid:0) u + v (cid:1)(cid:0) u v (cid:1) z + (cid:0) u (cid:1)(cid:0) v (cid:1)(cid:0) u + v + 2 u v (cid:1) z + (cid:0) u + v (cid:1)(cid:0) u + v + u v (cid:1) z . Remark 2:
Define := (1 , , . . . , . Then, the distanceenumerator D ( T ; z ) is derived from the extended distanceenumerator E ( T, ρ ; z, u , v ) as follows: E ( T, ρ ; z, , ) = D ( T ; z ) . III. E
XTENDED D ISTANCE E NUMERATORS FOR
SC C
ODES
A. Main Result and Corollary
The following theorem presents an important formula toderive the extended distance enumerator.
Theorem 1:
Define the SC codes (resp. extended weightenumerator) as in Definition 2 (resp. 3). Define u e (cid:0) km (cid:1) := u e (cid:0) k m (cid:1) , u e (cid:0) k m (cid:1) , . . . , u s e (cid:0) k s m s (cid:1)(cid:1) . Then the following iden-tity holds: E ( C ρ , a , m ( n, r, s ) , ρ ; z, u , v )= X j ,k ∈ [[ m ]] X j ,k ∈ [[ m ]] · · · X j s ,k s ∈ [[ m s ]] E (cid:0) [[ r ]] n , ρ ; z, u e (cid:0) jm (cid:1) , v e (cid:0) km (cid:1)(cid:1) × s Y i =1 m i e (cid:18) − a i ( j i + k i ) m i (cid:19) . (1) Remark 3:
In some special cases, we are able to obtainan explicit formula of the extended distance enumerator E ([[ r ]] n , ρ ; z, u , v ) . In such cases, Theorem 1 presents theextended distance enumerator for the SC code C ρ , a , m ( n, r, s ) .The following corollary gives the Hamming distance enu-merators for the BLC codes. Corollary 1:
Define the parameters of BLC codes as inDefinition 1. Then, the Hamming distance enumerators for theBLC codes are E H (BLC a ( n, m, h ); z )= X j,k ∈ [[ m ]] m e (cid:18) − a ( j + k ) m (cid:19) × n Y i =1 (cid:18) e (cid:18) h i jm (cid:19) z + e (cid:18) h i km (cid:19) z + e (cid:18) h i ( j + k ) m (cid:19)(cid:19) . B. Proofs
The proof of Theorem 1 uses the following identity for thecode membership function.
Lemma 1 ( [6, Eq. (4)]):
Define the parameters of SCcodes as in Definition 2. The following identity holds for any ρ , a , m : I { x ∈ C ρ , a , m ( n, r, s ) } = s Y i =1 X k i ∈ [[ m i ]] m i e (cid:18) − a i k i m i (cid:19)(cid:18) e (cid:18) k i m i (cid:19)(cid:19) ρ i ( x ) .
1) Proof of Theorem 1:
Combining Lemma 1 and Defini-tion 3, we get E ( C ρ , a , m ( n, r, s ) , ρ ; z, u , v )= X x ∈ [[ r ]] n X y ∈ [[ r ]] n z d( x , y ) s Y i =1 u ρ i ( x ) i v ρ i ( y ) i × I { x ∈ C ρ , a , m ( n, r, s ) } I { y ∈ C ρ , a , m ( n, r, s ) } = X x ∈ [[ r ]] n X y ∈ [[ r ]] n z d( x , y ) s Y i =1 X j i ,k i ∈ [[ m i ]] m i e (cid:18) − a i ( j i + k i ) m i (cid:19) × (cid:18) e (cid:18) j i m i (cid:19) u i (cid:19) ρ i ( x ) (cid:18) e (cid:18) k i m i (cid:19) v i (cid:19) ρ i ( y ) = X j ,k ∈ [[ m ]] X j ,k ∈ [[ m ]] · · · X j s ,k s ∈ [[ m s ]] " s Y i =1 m i e (cid:16) − a i ( j i + k i ) m i (cid:17) × X x , y ∈ [[ r ]] n z d( x , y ) s Y i =1 (cid:0) e (cid:0) j i m i (cid:1) u i (cid:1) ρ i ( x ) (cid:0) e (cid:0) k i m i (cid:1) v i (cid:1) ρ i ( y ) = X j ,k ∈ [[ m ]] X j ,k ∈ [[ m ]] · · · X j s ,k s ∈ [[ m s ]] " s Y i =1 m i e (cid:16) − a i ( j i + k i ) m i (cid:17) × E ([[ r ]] n , ρ ; z, u e ( j / m ) , v e ( k / m )) .
2) Proof of Corollary 1:
The following holds: E H (cid:0) [[2]] n , ℓ h ; z, u, v (cid:1) = n Y i =1 (cid:8) u h i z + v h i z + ( uv ) h i (cid:9) . (2)Combining this identity and (1), we get E H (BLC a ( n, m, h ) , ℓ h ; z, u, v )= X j,k ∈ [[ m ]] m e (cid:18) − a ( j + k ) m (cid:19) n Y i =1 (cid:18) u h i e (cid:18) h i jm (cid:19) z + v h i e (cid:18) h i km (cid:19) z + ( uv ) h i e (cid:18) h i ( j + k ) m (cid:19)(cid:19) From this equation and Remark 2, we have D H (BLC a ( n, m, h ); z )= E H (BLC a ( n, r, m ) , ℓ h ; z, , X j,k ∈ [[ m ]] m e (cid:18) − a ( j + k ) m (cid:19) × n Y i =1 (cid:18) e (cid:18) h i jm (cid:19) z + e (cid:18) h i km (cid:19) z + e (cid:18) h i ( j + k ) m (cid:19)(cid:19) . IV. H
AMMING D ISTANCE E NUMERATOR FOR
VT C
ODES
This section derives the Hamming distance enumerator forthe VT codes. Section IV-A gives some properties whichare useful to calculate the Hamming distance enumerator.Section IV-B shows algorithms to calculate the Hammingdistance enumerator efficiently. Section IV-C gives a numericalexample.
A. Properties
To simplify the notation, we denote m := n + 1 . Corollary1 leads the Hamming distance enumerators for the VT codes: D H (VT a ( n ); z ) = 1 m X j,k ∈ [[ m ]] e (cid:18) − a ( j + k ) m (cid:19) A m,j,k ( z ) ,A m,j,k ( z ) := m − Y i =1 (cid:16) e (cid:16) i ( j + k ) m (cid:17) + e (cid:16) ijm (cid:17) z + e (cid:16) ikm (cid:17) z (cid:17) . Define polynomial B m,j,k ( z ) as B m,j,k ( z ):= (2 + 2 z ) A m,j,k ( z )= m Y i =1 (cid:18) e (cid:18) i ( j + k ) m (cid:19) + e (cid:18) ijm (cid:19) z + e (cid:18) ikm (cid:19) z (cid:19) . (3)rom this definition, B m,j + sm,k + tm ( z ) = B m,j,k ( z ) holds forall s, t ∈ Z . Hence, if we get B m,j,k ( z ) for all j, k ∈ [[ m ]] , wehave the Hamming distance enumerator as follows: D H (VT a ( n ); z ) = 1 m X j ∈ [[ m ]] e (cid:18) − ajm (cid:19) F m,j ( z ) , (4) F m,j ( z ) := 12 z + 2 X k ∈ [[ m ]] B m,k,j − k ( z ) . (5)This section gives some properties of B m,j,k ( z ) to calculatethe Hamming distance enumerators. All the proofs are inAppendix. Lemma 2:
For all m ∈ Z + , j, k ∈ [[ m ]] , the following hold B m,j,k ( z ) = B m,k,j ( z ) , (6) B m,j,k ( z ) = ( − j ( m +1) z m B m,m − j,k (cid:0) z − (cid:1) , (7) B m,j,k ( z ) = ( − k ( m +1) z m B m,j,m − k (cid:0) z − (cid:1) . (8)Note that for an m th degree polynomial f ( z ) = P mi =0 a i z i ,its reciprocal polynomial is written by z m f ( z − ) = P mi =0 a m − i z i . Denote the floor function for x ∈ R , by ⌊ x ⌋ ,i.e., ⌊ x ⌋ = max { i ∈ N | i ≤ x } . By this lemma, we needto derive B m,j,k ( z ) for only j, k ∈ [[0 , ⌊ m − ⌋ ]] . Moreover, thefollowing lemma allows us to reuse the calculation results. Lemma 3:
Suppose integers t, m are coprime. Then, B m,jt,kt ( z ) = B m,j,k ( z ) . (9)Denote the Chebyshev polynomials of second and thirdkind, by U n ( z ) and V n ( z ) , respectively. The explicit formulasfor U n ( x ) and V n ( x ) are known as U n ( x ) = ⌊ n/ ⌋ X k =0 ( − k (cid:18) n − kk (cid:19) (2 x ) n − k ,V n ( x ) = n X k =0 ( − k (cid:18) n − kk (cid:19) n − k ( x − n − k . For some pairs ( j, k ) , we have the explicit formulas of B m,j,k ( z ) . Lemma 4:
Define d := gcd( m, j ) and denote m ′ := m/d .Denote ¯ m := ⌊ m ′ − ⌋ . For all m ∈ Z and all j ∈ [[ m ]] , thefollowing hold: B m,j, ( z ) = B m, ,j ( z ) = 2 d (1 + z ) m I [ m ′ : odd ] , (10) B m,j,j ( z )= ( ( − j d (cid:0) z − (cid:1) d (cid:0) U ¯ m ( z ) (cid:1) d , ( m ′ : even ) , d ( z + 1) d (cid:0) V ¯ m ( z ) (cid:1) d , ( m ′ : odd ) , (11) B m,j,m − j ( z )= ( d (cid:0) z − (cid:1) d (cid:0) z ¯ m U ¯ m (cid:0) z − (cid:1)(cid:1) d , ( m ′ : even ) , d ( z + 1) d (cid:0) z ¯ m V ¯ m (cid:0) z − (cid:1)(cid:1) d , ( m ′ : odd ) . (12)Now, consider the general case of ( j, k ) . Lemma 5:
Denote d := gcd( m, j, k ) . For all m ∈ Z + and j, k ∈ [[ m ]] , we have B m,j,k ( z ) = (cid:16) B md , jd , kd ( z ) (cid:17) d . Algorithm 1
Brute-force algorithm for calculating D H (VT a ( n ); z ) Require:
Code length n and an integer a ∈ [[0 , n ]] Ensure:
Hamming distance distribution D H (VT a ( n ); z ) = P ni =0 D i z i Initialize D i ← for all i ∈ [[0 , n ]] Enumerate codewords c , c , . . . , c u in VT a ( n ) for j = 1 , , . . . , u do for k = 1 , , . . . , u do D d H ( c j , c k ) ← D d H ( c j , c k ) + 1 end for end for Output P ni =0 D i z i This lemma implies that B m,j,k ( z ) is derived from B md , jd , kd ( z ) , where gcd( md , jd , kd ) = 1 . Hence, the followingtwo lemmas suppose the case of gcd( m, j, k ) = 1 . Lemma 6:
Suppose m is an odd integer. For j, k ∈ [[ m ]] such that gcd( m, j, k ) = 1 , we get B m,j,k ( z ) = 2 m (1 + z ) × m − Y i =1 (cid:18) cos (cid:18) πi j + km (cid:19) + z cos (cid:18) πi j − km (cid:19)(cid:19) . (13) Lemma 7:
Suppose m is an even integer. For j, k ∈ [[ m ]] such that gcd( m, j, k ) = 1 , we get B m,j,k ( z ) = 2 m (1 − z ) I [ j : odd ] I [ k : odd ] × m − Y i =1 (cid:18) cos (cid:18) πi j + km (cid:19) + z cos (cid:18) πi j − km (cid:19)(cid:19) . (14) B. Algorithms
This section shows some algorithms to calculate the Ham-ming distance enumerators for VT codes. Firstly, we give abrute-force algorithm (Algorithm 1) and evaluate its complex-ity. Next, we give an efficient algorithm (Algorithm 2) basedon the previous section results.At first, let us consider a brute-force algorithm. In this algo-rithm, we enumerate all the codewords in VT a ( n ) and evaluatethe Hamming distance between all the pairs of codewords.Algorithm 1 gives this brute-force algorithm. Here, a ← b represents substituting b for a . This algorithm’s complexity is O ( u ) , where u represents the number of codewords in the VTcode. Since the cardinality u of an VT code is approximatedby n / ( n + 1) , this algorithm’s complexity is O (2 n /n ) . Inother words, this brute-force algorithm is exponential time.Next, let us consider an efficient algorithm based on The-orem 1 and lemmas given in the previous section. Thisalgorithm calculates D H (VT a ( n ); z ) by deriving B m,j,k ( z ) .Algorithm 2 shows the details of this algorithm. For all j, k ∈ [[0 , n ]] , to derive B m,j,k ( z ) with Lemmas 5, 6, and7, we need O ( n ) times multiplication in the real number lgorithm 2 Algorithm for calculating D H (VT a ( n ); z ) basedon Theorem 1 Require:
Code length n and an integer a ∈ [[0 , n ]] Ensure:
Hamming distance distribution D H (VT a ( n ); z ) Calculate B m,j,k ( z ) for j, k ∈ [[0 , n ]] for j = 0 , , , . . . , n do Calculate F m,j ( z ) by Eq. (5) end for Calculate D H (VT a ( n ); z ) by Eq. (4) Output D H (VT a ( n ); z ) Algorithm 3
Calculation of B m,j,k ( z ) Require:
Integer m ∈ Z + Ensure:
Polynomials B m,j,k ( z ) for j, k ∈ [[ m ]] Calculate B m,j, ( z ) by Eq. (10) for j ∈ [[ m ]] for j = 1 , , . . . ⌊ m − ⌋ do d ← gcd( m, j ) , d ′ ← gcd( m, j/d ) if d ′ = 1 then B m,j,k ( z ) ← B m,k,j ( z ) for k = 0 , , . . . j − Calculate B m,j,j ( z ) by Eq. (11) Calculate B m,j,k ( z ) by Lemmas 5, 6, 7 for k = j +1 , . . . , ⌊ m − ⌋ Set B m,j,k ( z ) by Eq. (7) for k = ⌊ m − ⌋ +1 , . . . , m − else B m,j,kj/d ( z ) ← B m,d,k ( z ) for k ∈ [[ m ]] end if end for for j = ⌊ m − ⌋ + 1 , . . . , m − do Set B m,j,k ( z ) by Eq. (8) for all k ∈ [[ m ]] end for Output B m,j,k ( z ) for j, k ∈ [[ m ]] field. Hence, the complexity of Step 1 is O ( n ) . Because thecomplexity of the other steps are upper bounded by O ( n ) ,the complexity of this algorithm is O ( n ) . Thus, Algorithm 2has lower complexity than Algorithm 1.In Step 1 of Algorithm 2, to derive B m,j,k ( z ) , we canreuse the calculation results as in Lemmas 2, 3. By usingthese results, we summarize an efficient algorithm to derive B m,j,k ( z ) in Algorithm 3. C. Numerical Example
This section gives a numerical example of Hamming dis-tance enumerator for VT codes.Table I displays the Hamming distance enumerator forVT codes VT a (15) with code length n = 15 . Note that D H (VT a ( n ); z ) depends on d := gcd( a, m ) . In other words,the column labeled with d = 16 gives the case of a = 0 ,and the column labeled with d = 1 gives the cases of a = 1 , , , , , , , .From this table, we see that D = 0 for all d . Thisresult is easily checked since the VT codes correct singleinsertion/deletion. This table also shows that D has the same TABLE IH
AMMING DISTANCE ENUMERATOR D H (VT a (15); z ) = P i =0 D i z i , WHERE d := gcd( a, m ) i d = 16 d = 1 d = 2 d = 4 d = 8 value. This value coincides the cardinalities of VT codes [13],[14].Moreover, by comparing D /D , we see that the case of d = 4 has the smallest value. Hence, in the case of n = 15 ,the VT codes with a = 4 , are the best codes from theHamming distance perspective. On the other hand, in general,the VT code with a = 0 is the best code from the perspectiveof the cardinality of the code. Summarizing above, there arecases that the VT code with a = 0 is not the best in term ofthe Hamming distance.V. C ONCLUSION AND F UTURE W ORKS
This paper has presented the identity of the distance enu-merators for the SC codes. Using this result, we have shownan efficient algorithm to calculate the Hamming distanceenumerators for the VT codes. Moreover, there are cases that VT ( n ) is not the best in terms of the Hamming distanceenumerator.As future work, we derive the distance enumerator for otherSC codes and other distances.A PPENDIX
Proof of Lemma 2:
From (3), we get (6). Equation (3)leads z m B m,m − j,k (cid:0) z − (cid:1) = m Y i =1 (cid:18) z + e (cid:18) i ( − j + k ) m (cid:19) z + e (cid:18) − ijm (cid:19) + e (cid:18) ikm (cid:19)(cid:19) = m Y i =1 e (cid:18) − ijm (cid:19)! × m Y i =1 (cid:18) e (cid:18) ijm (cid:19) z + e (cid:18) ikm (cid:19) z + 1 + e (cid:18) i ( j + k ) m (cid:19)(cid:19) = ( − j ( m +1) B m,j,k ( z ) . Hence, we have (7). Similarly, we get (8). roof of Lemma 3:
For a ∈ Z , m ∈ Z + , denote theremainder in the division of a by m , by h a i m . Then, since t satisfies gcd( t, m ) = 1 , we have {h it i m | i ∈ [[ m ]] } = [[ m ]] .Combining this and (3), we get (9). Proof of Lemma 4:
The first equality of (10) follows (6).From (3), we get B m,j, ( z ) = (1 + z ) m m Y i =1 (cid:18) e (cid:18) ijm (cid:19)(cid:19) . (15)Note that m Y i =1 (cid:18) e (cid:18) ijm (cid:19) u (cid:19) = (cid:0) − ( − u ) m/d (cid:1) d . Substituting u = 1 , we get m Y i =1 (cid:18) e (cid:18) ijm (cid:19)(cid:19) = 2 d I [ m/d : odd ] . (16)Combining (15) and (16), we get the second equality of (10).From (3), we have B m,j,j ( z ) = m Y i =1 (cid:18) e (cid:18) ijm (cid:19) + 2 e (cid:18) ijm (cid:19) z (cid:19) = m Y i =1 (cid:18) e (cid:18) ijm (cid:19)(cid:19) m Y i =1 (cid:18) cos (cid:18) π ijm (cid:19) + z (cid:19) = 2 m ( − j ( m +1) m Y i =1 (cid:18) cos (cid:18) π ij/dm/d (cid:19) + z (cid:19) = ( − j ( m +1) ( m ′ m ′ Y i =1 (cid:18) z + cos (cid:18) πim ′ (cid:19)(cid:19)) d =: ( − j ( m +1) (cid:8) G m ′ ( z ) (cid:9) d , (17)where the fourth equality follows from gcd( j/d, m ′ ) = 1 .The Chebyshev polynomials of second and third kind (e.g.,see [15]) are expressed as U n ( z ) = 2 n n Y i =1 (cid:18) z − cos (cid:18) π in + 1 (cid:19)(cid:19) = 2 n n Y i =1 (cid:18) z + cos (cid:18) π in + 1 (cid:19)(cid:19) ,V n ( z ) = 2 n n Y i =1 (cid:18) z − cos (cid:18) π i − n + 1 (cid:19)(cid:19) = 2 n n Y i =1 (cid:18) z + cos (cid:18) π i n + 1 (cid:19)(cid:19) . Consider even m ′ , i.e., m ′ = 2 ¯ m + 2 . Then, G m ′ ( z ) = 4( z − ( ¯ m ¯ m Y i =1 (cid:18) z + cos (cid:18) π i ¯ m + 1 (cid:19)(cid:19)) = 4( z − { U ¯ m ( z ) } . (18) Here, Q m +1 i = ¯ m +2 (cid:0) z +cos (cid:0) πi ¯ m +1 (cid:1)(cid:1) = Q ¯ mi =1 (cid:0) z +cos (cid:0) πi ¯ m +1 (cid:1)(cid:1) leadsthe first equality. Consider odd m ′ , i.e., m ′ = 2 ¯ m + 1 . Then, G m ′ ( z ) = 2( z + 1) ( ¯ m ¯ m Y i =1 (cid:18) z + cos (cid:18) π i m + 1 (cid:19)(cid:19)) = 2( z + 1) (cid:8) V ¯ m ( z ) (cid:9) . (19)Here, Q m +1 i = ¯ m +2 (cid:0) z + cos (cid:0) π i m +1 (cid:1)(cid:1) = Q ¯ mi =1 (cid:0) z + cos (cid:0) π i m +1 (cid:1)(cid:1) leads the first equality. Combining (17), (18), and (19), we get(11).Equations (11) and (8) lead (12). Proof of Lemma 5:
Equation (3) gives the lemma.From (3), we get B m,j,k ( z )= m Y i =1 (cid:18) e (cid:18) i j + km (cid:19) + e (cid:18) ijm (cid:19) z + e (cid:18) ikm (cid:19) z (cid:19) = m Y i =1 e (cid:18) i j + k m (cid:19)(cid:18) e (cid:18) − i j + k m (cid:19) + e (cid:18) i j + k m (cid:19) + e (cid:18) i j − k m (cid:19) z + e (cid:18) i k − j m i (cid:19) z (cid:19) = 2 m ( − ( j + k )( m +1) / × m Y i =1 (cid:18) cos (cid:18) πi j + km (cid:19) + z cos (cid:18) πi j − km (cid:19)(cid:19) . (20)Based on this equation, we will derive Lemmas 6 and 7. Proof of Lemma 6:
From (20), we have B m,j,k ( z )= 2 m ( − ( j + k )( m +1) / (1 + z ) × m − Y i =1 (cid:18) cos (cid:18) πi j + km (cid:19) + z cos (cid:18) πi j − km (cid:19)(cid:19) × m − Y i = m − +1 (cid:18) cos (cid:18) πi j + km (cid:19) + z cos (cid:18) πi j − km (cid:19)(cid:19) = 2 m ( − ( j + k )( m +1) / (1 + z ) × m − Y i =1 ( − j + k (cid:18) cos (cid:18) πi j + km (cid:19) + z cos (cid:18) πi j − km (cid:19)(cid:19) = 2 m (1 + z ) m − Y i =1 (cid:18) cos (cid:18) πi j + km (cid:19) + z cos (cid:18) πi j − km (cid:19)(cid:19) . This concludes the proof.
Proof of Lemma 7:
Let us start from (20). Note that (cid:18) cos (cid:18) π m j + km (cid:19) + z cos (cid:18) π m j − km (cid:19)(cid:19) = I [ j + k : even ] (cid:8) ( − ( j + k ) / + z ( − ( j − k ) / (cid:9) = I [ j : odd ] I [ k : odd ]( − ( j + k ) / (cid:8) z ( − − k (cid:9) = I [ j : odd ] I [ k : odd ]( − ( j + k ) / (1 − z ) . ere, the first equality follows from the fact that ( j + k ) iseven iff ( j − k ) is even; The second equality follows fromeven m and gcd( m, j, k ) = 1 . Combining this equation and(20) leads B m,j,k ( z )= 2 m ( − ( j + k ) / (1 + z ) × I [ j : odd ] I [ k : odd ]( − ( j + k ) / (1 − z ) × m − Y i =1 (cid:18) cos (cid:18) πi j + km (cid:19) + z cos (cid:18) πi j − km (cid:19)(cid:19) × m − Y i = m +1 (cid:18) cos (cid:18) πi j + km (cid:19) + z cos (cid:18) πi j − km (cid:19)(cid:19) = 2 m (1 − z ) I [ j : odd ] I [ k : odd ] × m − Y i =1 (cid:18) cos (cid:18) πi j + km (cid:19) + z cos (cid:18) πi j − km (cid:19)(cid:19) . This concludes the proof.A
CKNOWLEDGMENT
This work is supported by Inamori Research Grants.R
EFERENCES[1] A. S. J. Helberg, “Coding for the correction of synchronization errors,”Ph.D. dissertation, University of Johannesburg, 1993.[2] R. Varshamov and G. Tenenholtz, “Codes which correct single asym-metric errors,”
Avtomatica i Telemekhanika , vol. 26, no. 2, pp. 288–292,1965.[3] V. I. Levenshtein, “Binary codes capable of correcting deletions, inser-tions, and reversals,” in
Soviet physics doklady , vol. 10, no. 8, 1966, pp.707–710.[4] K. Bibak and O. Milenkovic, “Weight enumerators of some classes ofdeletion correcting codes,” in . IEEE, 2018, pp. 431–435.[5] T. Nozaki, “Bounded single insertion/deletion correcting codes,” in , June 2019,pp. 2379–2383.[6] T. Nozaki, “Weight enumerators for number-theoretic codes and cardi-nalities of Tenengolts’ non-binary codes,” in , 2020, pp. 729–733.[7] R. Varshamov, “A class of codes for asymmetric channels and a problemfrom the additive theory of numbers,”
IEEE Transactions on InformationTheory , vol. 19, no. 1, pp. 92–95, 1973.[8] A. Shiozaki, “Single asymmetric error-correcting cyclic an codes,”
IEEEComputer Architecture Letters , vol. 31, no. 06, pp. 554–555, 1982.[9] P. Delsarte et al. , “Bounds for unrestricted codes, by linear program-ming,” 1972.[10] G. Kalai and N. Linial, “On the distance distribution of codes,”
IEEETransactions on Information Theory , vol. 41, no. 5, pp. 1467–1472,1995.[11] K. Mimura, “Distance distribution of a nonlinear random code usingnonlinear functions,” in
Asia Europe Workshop 9 (AEW9) , 2015.[12] C. Lee, “Some properties of nonbinary error-correcting codes,”
IRETransactions on Information Theory , vol. 4, no. 2, pp. 77–82, 1958.[13] B. Ginzburg, “A certain number-theoretic function which has an ap-plication in coding theory,”
Problemy Kibernet , vol. 19, pp. 249–252,1967.[14] R. P. Stanley and M. F. Yoder, “A study of Varshamov codes forasymmetric channels,”
Jet Prop. Lab. Tech. Rep , pp. 32–1526, 1972.[15] J. C. Mason and D. C. Handscomb,