Multiple Error Detection and Correction Based on ... - IEEE Xplore

6 downloads 0 Views 245KB Size Report
Based on Redundant Residue Number Systems. Vik Tor Goh and Mohammad Umar Siddiqi. Abstract—This paper presents some results on multiple error.
IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 56, NO. 3, MARCH 2008

325

Multiple Error Detection and Correction Based on Redundant Residue Number Systems Vik Tor Goh and Mohammad Umar Siddiqi

Abstract—This paper presents some results on multiple error detection and correction based on the Redundant Residue Number System (RRNS). RRNS is often used in parallel processing environments because of its ability to increase the robustness of information passing between the processors. The proposed multiple error correction scheme utilizes the Chinese Remainder Theorem (CRT) together with a novel algorithm that significantly simplifies the error correcting process for integers. An extension of the scheme further reduces the computational complexity without compromising its error correcting capability. Proofs and examples are provided for the coding technique. Index Terms—Arithmetic codes, error correction coding, maximum likelihood decoding, redundant number systems, residue codes.

I. I NTRODUCTION HE integrity of information passing through modern digital systems such as filters and arithmetic units is of utmost importance. Different coding schemes have been employed to achieve reliable and efficient transmission of data through these systems [1]. An area of particular interest is error detection and correction using a Redundant Residue Number System (RRNS). A Residue Number System (RNS) for integers describes methods of representing an integer as a set of its remainders or residues. Error control is achieved by addition of extra residues, hence the term RRNS. The RRNS code used in this work uses the Chinese Remainder Theorem (CRT) as a means of recovering the integer from a set of its residues. Error correcting codes based on the CRT are attractive because of their ability to perform carry-free arithmetic and lack of ordered significance among the residues [2]. Significant work concerning RRNS has been carried out by numerous parties after the initial push by [3], [4], and [5]. They introduced some of the concepts related to this error correction technique such as the terms legitimate range and illegitimate range for consistency checking. In [1], a discussion of a single residue error correction algorithm is given. [6] and [7] addressed the problem of double and multiple residue error correction, respectively. There are generally two different strategies employed to correct errors in a redundant residue code. The first method

T

Paper approved by T.-K. Truong, the Editor for Coding Theory and Techniques of the IEEE Communications Society. Manuscript received October 21, 2005; revised February 1, 2007. V. T. Goh was with the Centre for Cryptography and Information Security, Multimedia University, Malaysia. He is now with the Information Security Institute, Queensland University of Technology, Gardens Point Campus, GPO Box 2434, Brisbane QLD 4001, Australia (e-mail: [email protected]). M. U. Siddiqi is with the Department of Electrical and Computer Engineering, Faculty of Engineering, International Islamic University Malaysia (IIUM), P.O. Box 10, Kuala Lumpur 50728, Malaysia (e-mail: [email protected]). Digital Object Identifier 10.1109/TCOMM.2008.050401.

calculates the syndromes of received residues and then compares them with a set of predetermined observations. From there, conclusions are drawn and the appropriate integer recovery algorithm is performed. This is similar to algorithms given in [1] and [7]. The second method begins by recovering the erroneous integer from the received residues using the CRT. Subsequently, an error value is estimated using either continued fractions or integer programming. The correct integer is thus recovered by subtracting the error value from the erroneous integer. [5] and [6] suggested algorithms using this strategy. In this paper, a novel error correction scheme based on the second strategy is proposed. This scheme is similar to that in [5] and [6]. However, the proposed scheme is significantly simpler and does not require any complicated optimization algorithms. Briefly, in this scheme, the erroneous integer that is computed from its residues is used in a simple modular calculation that is iterated until the original integer is recovered. The algorithm is straightforward and easier to implement. Furthermore, the theory and concept of this error correction scheme is extended to make it more efficient and less computationally intensive. The presentation of this work can be divided into five sections. In Section II, some initial concepts and materials related to the RRNS and CRT are given. The major contribution of this paper, which is the multiple error correction scheme, is given in Section III. In this section, mathematical proofs and examples are given to illustrate the salient features of the error correction scheme. Section IV discusses techniques that are used to improve performance of the scheme, without compromising its error correcting capabilities. Conclusions and recommendations are given in Section V. II. C ONCEPTS R ELATED TO R EDUNDANT R ESIDUE N UMBER S YSTEMS To enable error correcting capabilities in RRNS, some relevant background and terminologies must be first defined. To begin, a set of n pairwise relatively prime positive integers m1 , m2 , . . . , mi , mi+1 , . . . , mn called moduli is selected. Note that the term moduli is the plural of modulus. The moduli mi are chosen such that, the greatest common divisor, gcd(mi , mj ) = 1 for each pair of i and j with i = j and m1 < m2 < . . . < mi < mi+1 < . . . < mn . From this set of n moduli, the first k moduli form a set of nonredundant moduli while the last r = n − k moduli form a set of redundant moduli [1]. These sets of moduli are used to define the following,

c 2008 IEEE 0090-6778/08$25.00 

MK =

k  i=1

mi

(1)

326

IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 56, NO. 3, MARCH 2008

MR =

n 

mi

i=k+1

M=

n 

mi = M K · M R

(2)

i=1

for i = 1, 2, . . . , k, k + 1, . . . , n. It can be seen that MK is the smallest product of k different mi ’s. As with other error correction codes, the redundant components are used for error detection and correction. Without loss of generality, an integer X in the range of [0, M ) where M is as defined in (2), can be uniquely represented by a residue vector x = {x1 , x2 , . . . , xn } using X ≡ xi (modmi ) (3) for i = 1, 2, . . . , k, k + 1, . . . , n. With (3), each of the residues xi corresponds to X modulo mi such that 0 ≤ xi < mi . However, for error correction to work, X has to be selected from the range of [0, MK ) instead, where MK is from (1). In doing so, the residue vector x can be divided into two parts, namely the first k residues called information residues and the remaining r residues called redundant residues [1]. Without loss of generality again, when a residue vector x is given, the corresponding integer X can be uniquely determined by simultaneously solving all n linear congruences in (3). The problem of simultaneously solving a set of linear congruences is simplified by using the CRT as shown below X=

n 

xi Mi ai modM

(4)

x = {x1 , x2 , . . . , xn }. n and k are chosen such that Theorem 2 holds, thus allowing this code to correct up to t errors. From here onwards, let the range [0, MK ) be termed as the legitimate range while its counterpart, the range [MK , M ) be termed as the illegitimate range. Suppose that t errors have been introduced into the vector y when it passes through a potentially noisy system. The resulting vector is y, that is y =x+e {y1 , . . . , yn } = +

M Mi = mi

and

{eu1 , . . . , 0, eu2 , . . . , eut }

Y =

n 

yi Mi ai modM

(6)

i=1

where Mi and ai are as defined earlier for (4). If the recovered Y is within the legitimate range, then y is a valid vector and no further steps need to be carried out. On the other hand, if Y is in the illegitimate range, it can then be concluded that y has errors in its residues. When there are errors, the relationship between X and Y is X ≡ (Y − E) (modM ) , 0 ≤ E ≤ M.

ai =

Mi−1 modmi

for i = 1, 2, . . . , n. The integers ai are also known as the multiplicative inverses of Mi mod mi . If X is selected from the range of [0, MK ), any k residues out of the total n residues from the residue vector x, where n > k should be sufficient in recovering the original integer X. From [1], when the integer X is chosen from the range of [0, MK ), the resulting redundant residue code can be considered semilinear. Theorem 1: A code Ω based on a redundant residue number system has the minimum nonzero Hamming weight wtmin ≥ r + 1 and minimum distance dmin ≥ r + 1 [8]. According to Theorem 1, since the minimum distance can have the value of r + 1, the code Ω can be considered maximum distance separable (MDS). MDS codes are codes that have dmin = r + 1. Theorem 2: A code Ω based on a redundant residue number system can correct up to t errors; t ≤ r/2 where ∗ is the largest integer less than or equal to ∗ [8]. MDS codes are attractive because they are optimal whereby they can correct the maximum amount of errors t, with the least number of redundancies.

(7)

In (7), E is the amount of error that has propagated into the X resulting in the erroneous Y . The magnitude of the error E can be calculated using the CRT and is determined to be E≡

t 

euj Muj auj (modM )

(8)

j=1

where Muj , muj and auj are the corresponding values of Mi , mi and ai for i = uj . To simplify the decoding problem, let E in (8) be expressed in its expanded form, giving   M M au1 + . . . + eut aut (modM ) . (9) E ≡ eu1 mu1 mut Let M from (2) be expressed as M=

n  i=1

mi =

ut 

ln−t

mα ·

α=u1





(10)

β=l1

where u1 , u2 , . . . , uj , uj+1 ,. . . , ut are the positions of residues with errors and l1 , l2 , . . . , ln−t are the remaining positions without errors inside the vector y. By substituting (10) into (9), (11) is obtained. Continue by letting g = eu1 ·

III. M ULTIPLE E RROR C ORRECTION S CHEME For the multiple error correction scheme, first consider a redundant residue code with a set of moduli mi . An integer X is selected from the range [0, MK ) and the residue vector is

(5)

where 0 ≤ euj < muj for 1 ≤ j ≤ t. The error values are eu1 , eu2 , . . . , euj , euj+1 , . . . eut and the subscripts u1 , u2 , . . . , uj , uj+1 , . . . , ut are the positions of errors within y. Upon receiving the vector y, error detection is first performed by determining whether y is a valid vector. This can be accomplished by computing the corresponding integer Y using a formula based on (4), which is

i=1

where

{x1 , . . . , xn }

ut  α=u1 α=u1

ln−t

Zc =



β=l1



mα · au1 + . . . + eut ·

ut  α=u1 α=ut

mα · aut

GOH and SIDDIQI: MULTIPLE ERROR DETECTION AND CORRECTION BASED ON REDUNDANT RESIDUE NUMBER SYSTEMS

327

⎞ ⎛ ⎞ ⎤ ln−t ln−t ut ut     ⎜ ⎟ ⎜ ⎟ ⎥ ⎢ E ≡ ⎣eu1 ⎝ mα · mβ ⎠ au1 + . . . + eut ⎝ mα · mβ ⎠ aut ⎦ (modM ) ⎡



α=u1 α=u1

α=u1 α=ut

β=l1



⎛ ⎜ E ≡ ⎝eu1

β=l1

ut  α=u1 α=u1

mα · au1 + . . . + eut ·

Zc is the product of all moduli corresponding to residues without errors in y. Now, assume that no more than t errors occur. This would mean that the residue vector corresponding to the error E as in (5) will have at least n − t residues that are equal to zero. If these n−t zero residues were picked, then let Zc represent the product of the moduli corresponding to these residues. This means that E must be a multiple of Zc since Emodmβ = 0

ut  α=u1 α=ut

ln−t ⎟  ma · au1 ⎠ · mβ (modM ) .

corresponds to the incorrect positions of errors. Let Zσ and Zτ be defined as qn−t



Zσ =

(12)

for some integer g. Since this implies that Y and X differ by a factor of Zc , (12) can be rewritten as X = Y modZc where 0 ≤ X < Zc . With that, the multiple error correction scheme can be summed up in the following theorem. Theorem 3: For a redundant residue number system code having the proper amount of redundancies r, such that no more t ≤ r/2 errors have occurred in a received vector y, the original integer X can be found by performing the following operation, X = Y modZc where Zc =

ln−t  β=l1

(13)

mβ and l1 , l2 , . . . , ln−t are the positions

without errors within y. (13) is used iteratively to find the one combination of Zc that produces X that falls within the legitimate range. The subscript c is the index of one combination out of the p = n Ct possible combinations of uj . ut  Zc in (13) can alternatively be written as Zc = M/ mα α=u1

where u1 , u2 , . . . , ut are the positions of the errors within y. Both these expressions are valid and equivalent. Now, it remains to be shown that if no more than t errors have occurred, Theorem 3 will provide a unique solution. Theorem 4: There is only one combination of Zc that produces a value of X in the legitimate range for (13) in Theorem 3. Proof: Begin by first letting Zσ be the product of moduli that corresponds to the correct positions of errors while Zτ for τ = 1, 2, . . . , p and τ = σ be the product of moduli that

sn−t

mi

and Zτ =

i=q1



mi .

i=s1

Let Q = {q1 , q2 , . . . , qn−t } be the correct positions of errors and S = {s1 , s2 , . . . , sn−t } be the incorrect positions of errors. When (13) is expressed in its alternate form of (12), the following are obtained,

for β = l1 , l2 , . . . , ln−t . This can be clearly seen from (11). As a result, (7) becomes X = Y − gZc

(11)

β=l1

Xσ = Y − g σ Zσ

(14)

Xτ = Y − g τ Zτ

(15)

where Xσ and Xτ are the correct and incorrect solutions to (13), respectively. Assume that Xτ > Xσ in (14) and (15). This assumption is without loss of generality, since if Xσ > Xτ , the labels σ and τ can simply be swapped. The relationship between (14) and (15) is given as Xτ = Xσ + (gσ Zσ − gτ Zτ ) .

(16)

Since Zσ and Zτ are the products of the moduli mi , they will both have a common factor which is  gcd (Zσ , Zτ ) = mi (17) i∈W

where the set W = Q ∩ S. In other words, (17) defines gcd (Zσ , Zτ ) as the product of all moduli whose indices are in the intersection of the indices of Zσ and Zτ . Observation of (17) will reveal that it is a multiplication of n − 2t moduli. From Theorem 2, it can be seen that n − 2t ≥ k. This would mean that the gcd (Zσ , Zτ ) would be at the very least a multiplication of k moduli that is gcd (Zσ , Zτ ) ≥ MK . Factoring out (17) from (16) will result in      mi − g τ mi · mi Xτ = Xσ + g σ i∈A



=

Xσ + H · gcd (Zσ , Zτ ) 

where H=



 i∈A

mi − g τ

i∈B



i∈W

(18)  mi

(19)

.

i∈B

The sets A and B are defined A = Q − W and B = S − W . H in (19) is guaranteed to be positive because of the  earlier mi > assumption that Xτ > Xσ . This implies that gσ i∈A

328



IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 56, NO. 3, MARCH 2008

 i∈B

mi . Substituting the worst case situation for 0 ≤ Xσ
t, any errors less than o can also be corrected. However, ambiguity will arise because more than one possible solution will fall within the legitimate range. The problem is caused by the fact that the algorithm is attempting to correct more errors then it possibly can. Therefore, the solutions are for residues with γ, t+1, t+2, . . . , o errors where γ ∈ {0, 1, . . . , t−1, t}. To resolve the ambiguity, solutions for residues with t + 1, t + 2, . . . , o errors will have to eliminated. A very simple way of eliminating nonsensical solutions is to use the maximum likelihood decoding (MLD). Let the set of solutions of a scheme that has been set to correct o errors

GOH and SIDDIQI: MULTIPLE ERROR DETECTION AND CORRECTION BASED ON REDUNDANT RESIDUE NUMBER SYSTEMS

TABLE II E XAMPLE SHOWING HOW THE FOUR ERROR POSITIONS ARE SELECTED . S INGLE STRIKETHROUGH INDICATES ELIMINATION OF ONE COMBINATION WHILE DOUBLE STRIKETHROUGH INDICATES OVERLAPPING . f

1

Error Positions

1, 2, 3, 4

2

1, 2, 5, 6

3

3, 4, 5, 6

u1

u2

1 1 1 2 2 3 1 1 1 2 2 5 3 3 3 4 4 5

2 3 4 3 4 4 2 5 6 5 6 6 4 5 6 5 6 6

Included Combinations (u1, u2)

(1, 2) (1, 3) (1, 4) (1, 5) (1, 6) (2, 3) (2, 4) (2, 5) (2, 6) (3, 4) (3, 5) (3, 6) (4, 5) (4, 6) (5, 6)

(1, 2) (1, 3) (1, 4) (1, 5) (1, 6) (2, 3) (2, 4) (2, 5) (2, 6) (3, 4) (3, 5) (3, 6) (4, 5) (4, 6) (5, 6)

(1, 2) (1, 3) (1, 4) (1, 5) (1, 6) (2, 3) (2, 4) (2, 5) (2, 6) (3, 4) (3, 5) (3, 6) (4, 5) (4, 6) (5, 6)

be V , that is V = {V1, V2 , . . . , Vi , Vi+1 , . . . , Vλ } where λ is the total number of solutions that falls within the legitimate range. For each Vi where i = 1, 2, . . . , λ, the corresponding residue vector vi is obtained using Equation (3). With MLD, the Hamming distances d(y, vi ), between the received vector y and each of the residue vector vi are calculated. When the distance is less than or equal to t, the corresponding integer Vi is the recovered integer. The solution to this MLD problem will be unique and this can be seen by using the definition of distances. Suppose that there are two vectors x1 and x2 in the legitimate range. Both these vectors have distances less than t from y that is, d(x1 , y) ≤ t and d(x2 , y) ≤ t. But this would also mean that d(x1 , x2 ) ≤ 2t < dmin , which contradicts the assumption that the code has a minimum distance of dmin . Thus, there can only be one residue vector in the legitimate range that corresponds to the incorrect vector. To see the improvements that are achieved using this modified algorithm, first let the most optimum value for o be o = n − k. This ensures that the recovered integer X using Equation (13), will be in the legitimate range of 0 ≤ X < MK , since Zc =

lk  M = mβ . un−k  β=l 1 mα

α=u1

Zc is now the product of any k moduli and therefore Zc ≥ MK where MK is the smallest product of k different mi ’s. Recall earlier that as long as all the erroneous integers are part of the residues assumed to be in error, the correct integer can still be recovered. Therefore, the o positions that are selected and assumed to be in error should be able to cover as many combinations of t errors as possible.

329

This idea is better explained with the help of an example. For a n = 6 and k = 2 code, the total number of correctable errors is t = 2. Hence, there is a total of p = 6 C2 = 15 different combinations of error positions. The list of all possible error positions for t = 2 is shown in column 3 and 4 from Table 1. Since the most optimum value of o is given as n − k, the parameter is therefore set as o = 6 − 2 = 4. Next, four error positions are selected such that when they are taken t = 2 at a time, most of the possible combinations would have been included. Table 2 shows the results of performing this operation. As it can be seen, by selecting o positions at a time, a total of o Ct combinations of t errors can be covered in a single iteration. Hence, the number of iterations that is needed to recover the original integer is estimated to be   p f= o Ct where ∗ is the largest integer greater than or equal to ∗. This is a significant reduction in the number of iterations needed to recover the correct integer. The modified multiple error correction algorithm can be described as follows, 1) Compute Y from the received vector y using Equation (6). 2) If Y is in the legitimate range, stop and output Y . 3) Compute Equation (13) starting with c = 1 to obtain X. 4) If X is in the legitimate range, let V = X and proceed to Step 5. Otherwise, increment c and repeat from Step 3 while c ≤ f . If c > f , go to Step 6. 5) Calculate the residue vector v from V and the Hamming distance d(y, v). If d(y, v) ≤ t, stop and output V . Otherwise, increment c and repeat from Step 3 while c ≤ f . If c > f , go to Step 6. 6) Indicate that there are more than t errors and end. As it can be seen, the modified multiple error correction algorithm is still similar to the original algorithm shown earlier in Section III. An example illustrates the usage of the modified algorithm in correcting multiple errors. Using the same example from Section III, a (n = 6, k = 2) code with t = 2 is given. The set of moduli, legitimate range and illegitimate range is {11, 13, 17, 23, 29, 37}, [0, 143) and [143, 59994649), respectively. If X = 51, the residue vector x, is {7, 12, 0, 5, 22, 14}. During transmission, errors propagate into the residue x at position u1 = 1 and u2 = 5. As such, let the received vector be y = {1, 12, 0, 5, 6, 14}. Using (6), Y = 50403079 where the and ai are corresponding values of Mi {5454059, 4614973, 3529097, 2608463, 2068781, 1621477} and {2, 12, 16, 7, 11, 10} respectively. Since Y is in the illegitimate range, error correction is performed using the modified algorithm. Table 3 presents the results of performing (13). The error positions that are used in Table 3 are obtained from Table 2. From Table 3, it can be seen that there are two

330

IEEE TRANSACTIONS ON COMMUNICATIONS, VOL. 56, NO. 3, MARCH 2008

increases the computational overhead in terms of resources and time. In addition, when using the CRT, large numbers may be encountered that can further reduce the performance of the algorithm. Fortunately, these limitations can be overcome. The first problem is fixed by modifying the algorithm to include MLD. The modifications result in a faster error correction scheme with reduced computational overhead. The second restriction

Fig. 1. Total number of trials for r = 6, and t = 3. The value of n is the number of residues used to represent X while the number of minimum residues used to recover X is k = n − r. TABLE III R ESULTS OF PERFORMING E QUATION (13) ON Y . c 1 2 3

Y 50403079 50403079 50403079

1 1 3

Error Positions 2 3 2 5 4 5

4 6 6

Zc 1073 391 143

X = Y mod Zc 1050 51 12

possible solutions that falls within the legitimate range. Let them be V = {51, 12}. In line with the algorithm, the residue vectors vi and Hamming distances are calculated and shown in Table 4. The only value of Vi that has a Hamming distance which is less than or equal to t = 2 is 51. Therefore, the modified error correction algorithm has correctly recovered the original integer. Although the total number of iterations shown in this example is three, the original integer could have been recovered in the second iteration. The overall performance gain of the modified algorithm compared to the original algorithm is shown in Fig. 1. The effects of the modified algorithm are more significant when the total number of correctable errors, t is larger. Note that the number of trials for the modified algorithm f , is obtained experimentally and are obtained for worst case situations where the maximum number of iterations need to carried out. V. C ONCLUSIONS The single error correction scheme is significantly simpler and does not require any complicated optimization algorithm such as those used by [6]. Furthermore, the algorithm is quite straightforward and easy to implement as it has been shown in the procedural codes. Unlike the scheme proposed by [1], this algorithm can be easily improved upon to correct multiple errors without major changes in the algorithm. However, the proposed multiple error correction scheme does require more iterations in order to correct the errors. This limitation

TABLE IV T HE RESIDUE VECTORS AND H AMMING DISTANCES . i 1 2

Vi 51 12

vi {7, 12, 0, 5, 22, 14} {1, 12, 12, 12, 12, 12}

y {1, 12, 0, 5, 6, 14} {1, 12, 0, 5, 6, 14}

d(vi, y) 2 4

is rectified by using Garner’s algorithm as explained in [10]. This algorithm allows the original integer to be recovered without having to use large numbers. ACKNOWLEDGEMENT The authors would like to thank the reviewers for their thorough examination of the manuscript and invaluable feedback. These have led to various improvements in the manuscript. Special thanks also go to Mr. Ming Tao Gan and Mr. Pechin Lo for their insights during the drafting of this manuscript. R EFERENCES [1] H. Krishna, K. Y. Lin, and J. D. Sun, “A coding theory approach to error control in redundant residue number systems. Part I: Theory and single error correction,” IEEE Trans. Circuits Syst., vol. 39, pp. 8-17, Jan. 1992. [2] L. L. Yang and L. Hanzo, “Redundant residue number system based error correction codes,” in Proc. 54th Veh. Technol. Conf., 2001, pp. 1472-1476. [3] F. Barsi and P. Maestrini, “Error correcting properties of redundant residue number systems,” IEEE Trans. Comput., vol. 81, pp. 307-315, Mar. 1973. [4] D. M. Mandelbaum, “Error correction in residue arithmetic,” IEEE Trans. Comput., vol. 21, pp. 538-545, June 1972. [5] D. M. Mandelbaum, “On a class of arithmetic codes and a decoding algorithm,” IEEE Trans. Inform. Theory, vol. 22, pp. 85-88, Jan. 1976. [6] O. Goldreich, D. Ron, and M. Sudan, “Chinese remaindering with errors,” IEEE Trans. Inform. Theory, vol. 46, pp. 1330-1338, July 2000. [7] J. D. Sun and H. Krishna, “A coding theory approach to error control in redundant residue number systems. Part II: Multiple error detection and correction,” IEEE Trans. Circuits Syst., vol. 39, pp. 18-34, Jan. 1992. [8] C. Ding, D. Pei, and A. Salomma, Chinese Remainder Theorem: Applications in Computing, Coding, Cryptography. Singapore: World Scientific Publishing, 1996. [9] P. E. Beckmann and B. R. Musicus, “Fast fault-tolerant digital convolution using a polynomial residue number system,” IEEE Trans. Signal Processing, vol. 41, pp. 2300-2313, July 1993. [10] A. J. Menezes, P. C. van Oorschot, and S. A. Vanstone, Handbook of Applied Cryptography. Boca Raton, FL: CRC Press, 1996.