I
I.
I
I
I
I
I
I
I.
I
I
I
I
I
I
I
Ie
I
I
ERROR DETECTING AND ERROR CORRECTING nIDEXING SYSTEM>
FOR LARGE SERIAL NUMBERS
R. C. Bose
University of North Carolina
Institute of Statistics Mimeo Series No. 426
March 1965
Given a set of serial numbers, they can be indexed by adding a few redundant digits, calculated according to certain
rules. If X is the original serial number, then the number X*
obtained after addition of the redundant digits is called the
index of X. The purpose of adding the redundant digits is to
enable us either to detect, or to both detect and correct the
more common errors which are liable to be made in reporting
X*. The most common errors are (i) wrongly reporting a single
digit (error of type I) (ii) reversal of two adjacent digits
(error of type II).
In this paper we describe two indexing systems. In the
first system X is a six digit number, the digits being
0,1,2,3,4,5,6,7,8,9. Each X is indexed by adding no more than
one redundant digit. Errors of type I and II in reporting X*
can be detected. In the second system we consider an octal
numerical system based on the 8 digits 0,1, ••• , 7. We take
X to be a seven digit serial number. It is indexed by adding
three suitably chosen redundant digits. Errors of type I and
II in reporting X* can be correc~ea.
This research was supported by the National Science
Foundation Grant No. GP-3792 and the Air Force Office
of Scientific Research Grant No. AF-AFOSR-760-65.
DEPARTMENT OF STATISTICS
UNIVERSITY OF NORTH CAROLINA
Chapel Hill, N. C.
I
I.
I
I
I
I
I
I
I.
I
I
I
I
I
I
I
Ie
I
I
Error Detecting and Error Correcting Indexing Systems
for Large Serial Numbers
R. C. Bose
University of North Carolina
1.
Introduction. Given a set of serial numbers, they can be indexed
by adding a few redundant digits, calculated according to certain rules.
If
X is the original serial number, then the number X* obtained after addition
of the redundant digits is called the index of X.
The purpose of adding the
redundant digits is to enable us either to detect, or to both detect and
correct the JOOre common errors which are liable to be made in reporting X*.
An indexing system is useful when information has to be stored with
respect to a large number of individuals.
a la.'rge clientele.
For example consider a firm with
An index number is to be assigned to each client whicl1
he quotes in any correspondence.
The clients I card on 'tmch the information
relative to him is stored is identified by means of this index number.
No.. ., the index number may be wrongly reported.
The most cOIlllOOn errors are
(i) wrongly quoting a single digit (error of Type I), (ii) reversal of
t . . ro adjacent digits (error of type II).
It would be useful to have an
indexing system which is self-checking with respect to common errors, 1. e.,
When a client makes such an error it is readily detected.
Also it would be
desirable to have a system in which When an error has been detected, it
should be possible to correct it.
This research was supported by the National Science Foundation Grant
No. GP-3792 and the Air Force Office of Scientific Research Grant No.
AF-AFOSR-76o-65.
II
In this paper we describe two indexing systems.
In the first system
X is a six digit number, the digits being 0,1,2,3,4,5,6,7,8,9.
indexed by adding no nx:>re than one redundant digit.
II in reporting
x*
can be detected.
Errors of type I and
In the second system
redundant digits.
2.
consider an
vie
octal numerical system based on the 8 digits 0, 1, ••• , 7.
a seven digit serial number.
Each X is
We take X to be
It is indexed by adding three suitably chosen
Errors of type I and
An Error Detecting Indexing
n
in reporting X* can be corrected.
Syste~
Suppose we have a set of six
diBit serial numbers (the digits being 0,1,2,3,4,5,6,7,8,9).
an example of an indexing system employing no
We give here
mare than one redundant digit
and able to detect either a single error in one digit (including the redundant digit) or an error consisting of a reversal of two consecutive digits.
These two types of error we shall call errors of type I and type II respectively.
We shall also show that i f an error has been detected then (under the
assumption that the error belongs to one of the two types described above)
there are only a few possibilities among which the true serial numbers must
lie.
Let the serial number to be indexed be
X
where
x.J. (i
= 1,2,3,4,5,6)
is a unique integer x
(2.1)
If
X
°< x
-
o
= x6~x4~~:lCJ. '
is one of the digits 0,1, ••• , 9.
Then there
such that
o == -(~+X4+x6) + (xl+~+x5) (nx:>d 11),
°S
X
o S 10 •
< 9, we say that the index of X is the seven digit number
.-II
II
III
II
I'
I'
.-I
I
I
I
I
I
I
0-
el
2
I
I
I
I.
I
I
I
I
I
I
I.
I
I
I
I
I
I
I
Ie
I
I
= 10,
If Xo
case
we say that the index of X is the same as
X.
= X, is a six digit number.
x*
For example if X = 487293, then x == -7 (rod 11).
0
and X is indexed by X* = 4872934.
Hence
Again if X
N~l
= Y6Y5Y4Y3Y2Y1YO
= Y6Y5Y4Y3Y2Yl
a unique integer
Yo
where
= 487299, x0
x =4
0
== -l(rod 11).
suppose we allow the possibility that in reporting x* one of the
two types of errorsconsidered has been committed.
y*
Hence
= 10, and X is indexed by X* = 487299.
xo
be y*
Thus in this
in case I, when X*
in case II, when X*
c
such that
0
~
c
~
is a seven digit number and
is a six digit number.
We can find
10, and
is taken to be 10 in case II.
reported c
Let the reported value
Then if the index has been correctly
= O.
Suppose now that in reporting X* an error of type I has been cornrnitted, then there is an integer a
for i
~
a.
In case I, 0
1 < a < 6 and i
a
~
6 and
i
Ya ~ Xa whereas
y.
~
= x.
~
= 0,1,2, ••• , 6. In case II,
= 1,2, ••• ,6. Then from (2.1) and (2.2)
c == (-1)
(2.3 )
Since
~
such that
0 <IYa - ~I~ 9,
a+l
c ~ o.
(ya - xex),
(mod 11).
Thus we will conclude that an error has
been committed.
Again suppose that in reporting X* an error of the second type has
been committed.
Ya +
l
X
a
Then there is an integer a such that Ya
= xa Whereas Yi = Xi for
~ X +
a l
i~
a
or a + 1.
' otherwise there would be no error.
3
Also
= xa+1 '
vl'C
In case I, 0
can assume that
~ a ~
5 and
II
i
= 0,1,2, ••• , 6. In
case II, 1 ~ a ~ 5 and i
= 0,1,2, ••• , 6.
Then from
(2.1) and (2.2) we have,
(2.1~ )
=(-1) a+l 2(Xa+l -
c
Since 0 < I~+l-
~ 9,
xal
c" O.
a ),
(mod 11).
X
Thus we will conclude tInt an error has
been committed.
Notice that the non-vanishing of the check number c does not tell us
what error has been committed.
Example 1.
x = 487293 then X*
as 5.
Then y*
For the purpose of illustration let us suppose that
= 4872934.
= 4572934.
= 8,
8 is wrongly reported
Now 0 ~ c ~ 10
=-(4 + 9 + 7 + 4)
c
Hence c
In reporting X* suppose
+ (3 + 2 +5),
(mod 11).
and we conclude that an error has been committed.
We can
reconstruct the possible values of X* from y* using the fact that c
= 8,
and
assuming that the error is of type I or type II, i.e., there is an error
in a single digit or there has been a reversal of two digits.
of type I has been committed in reporting xa then from (2.3),
= Ya
xa
+ (_l)a c,
(mod 11).
We can make the following table:
Table 1
xa
Ya
0
1
2
3
4
5
6
4
1
6
6
3
9
2
7
5
4
5
4
8
1
4
Correct
x*
4572931
4 5 '( 2 964
4 572 6 3 4
4 5 7 5 934
4542934
4872934
1572934
If an error
.-II
II
II
II
II
II
.-II
II
II
II
II
II
II
ell
I'
I
I
I.
I
I
I
I
I
I
I.
I
I
I
I
I
I
I
Ie
I
I
Again it is possible that the discrepancy is due to a reversal of two
consecutive digits in reporting X*.
In this case we can reconstruct X* by
reversing two consecutive digits of y* and check whether (2.1) holds.
We
then have
Table 2
y*
4572934
~·___5P:S:i:l: :*4
x
10
x
5
x
0
x
4
2
2
x
4752934
4527934
4 5 792 3 4
4 5 723 9 4
4572943
Since
x
o
0
x
must be the same as the last digit in X* the only possi-
bility is that the correct X* was 4579234.
Thus altogether there are 8
different values of X* which could have lead to Y*.
Example 2.
= 487299.
X*
Let us next suppose that X
~
c
~
Then x
o
= 10
and
Then X* would be reported as y*
= 482799.
Now
10, and
c
Hence c
487299.
Suppose there is an error of type II reversing the position
of the digits 2 and 7.
o
=
= 10,
=- (10+4+2+9)
+ (8+7+9)
(mod 11).
which shows that an error has been conunitted.
As in example 1,
we find that any of the following 6 values of X* could have lead to y*:
X*
3.
= 482789;
482899; 481799; 492799; 382799; 487299.
An error correctillg indexing system.
Consider an octal system in which we use only the eight digits
0,1,2,3,4,5,6,7.
87
A seven digit number in this system will take care of
= 221 = 2,097,152
or roughly two million serial numbers.
5
We shall now
I
show that by adding 3 redundant digits, suitably calculated, one can correct
any single error in a digit (error of type I), or any error consisting of
a reversal of two adjacent digits (error of type II).
Consider the Galois field GF
0:0
= 0,0:1,0:2,ex;,0:4,0:5,0:6'~.
8
of 8 e1enents.
Let the elements be
It is well known [1,2, ] that the non-zero
elements can be written in t'fQ different forms:
(i)
The multiplicative form where each non-zero element is a power
of a primitive element t •
(ii)
The additive form where each element is a quadric polynomial of
t with coefficients 0 or I •
Multiplicative form
Element
=
0
~
=
to
0:
2
=
=
t
0:
0
ex;
t2
C\
=
t
0:
5
0:
6
=
=
=
0:
7
3
0
1
t
t2
+ t
2
=
1
t4
=
1 + t + t2
t5
=
=
1 + t
t
6
t + t2
To add two elements we take the additive form and remember that the
coefficients of the polynomials add (mod 2).
ex; + ~
=t 2
+ (1 +t+t2 )
=1
Thus
+ t
= 0:6
•
To multiply two elements we take the multiplicative form and remember
o
that t 7 = t • Thus
6
I
I
I
I
I
.-I
Additive form
=
=
=
=
.-I
I
I
I
I
I
I
_I
I
I
I
I.
I
I
I
I
I
I
I.
I
I
I
I
I
I
I
aO,a1,a2'~'04,a5,a6,a7
the elements
respectively °
Then any seven digit octal number X can be made to correspond with
a 7-vector ! with elements from GF S
= (x1 ,x2 ,
!
where the
Xi's belong to GFso
Let
!* = (X1'~'
so that
. Consider the vector
~),
... , ~,
xs ' x9 ' x10 ),
x8,x9'~0 are determined by the relation
,
x:*'HT=O
where
000,
X be encoded to
H is the matrix given by
H =
1
1
1
1
1
1
t
t2
t3
t4
t5
t
0
1
0
1
0
1
6
1
t
0
0
1
0
1
0
0
0
0
t2
°
This gives the encoding rules:
xs
= t 6 (x1 +~+~+x4+x5+x6+~)
x
=
9
t ~+ t2~ + t3~ + t4x4 + t 5 x
5
+ ta.x6 + t 7x
7
x10 = t 5 (x2 + x4 + x6)
Then the index of X is X* the octal number corresponding to the
vector
2f*
°
lor example to find the index of 2,401,546
vTe
identify it with
3
3
5
4
the vector (a2'04,ao,a1'~'04,a6 ) or (t, t , 0, 1, t , t , t )
:. Xs
= t 7+
=1
t2 + t
6
+ t3 + t2 + t 4
+ t 2 + (t+t2 ) + (1+t2 ) + t 2 + (1+t+t2 )
Ie
I
I
~dth
We can identify the digits 0,1,2,3,4,5,6,7
7
I
x
9
= t2
+ tS + t4 + t2 + tS
= t2
+ (1+t) + (1+t+t2
=1
)
.-I
+ t 2 + t 2 + (l+t)
+t
I
I
I
I
I
=tS
x
10
= 0:6 •
=t 8 + tS + t 8
= t + (1+t) + t
=1
+ t
= 0:6
:.
•
!* = (0:2,C\,0:0,,\,~,C\,0:6,C\,0:6,0:6)
Hence the index of X
= 2,~01,546
is x*
•
= 2,401,546,466.
We shall now show that if an error of type I or type II is committed
in reporting X* it can be corrected.
'if.!'
Let
be the vectors (with elements from GF
ively.
X* be reported as y*.
Let x* and
8 corresponding to X* and y* respect-
The error vector e* is defined by
~*
= Y:.* -
x*.
If an error of the type I has been committed, so that the i-th digit
of X* has been wrongly reported, then
e*
Now
Y:.*
is known to us.
= (0,0,
••• , Yi-xi' ••• 0) •
We may therefore calculate the syndrome of
t*
may be defined as
Y:.*
Ii! = (!* + e*) JiX
= e* H!
= e.h
J.-i
,.,here e
i
= y.J.
- Xi
'
T
and -J.
h. is the i-th row vector of vector of H •
8
which
.-I
I
I
I
I
I
I
_I
I
I
I
I.
I
I
I
I
I
I
I.
I
I
I
I
I
I
I
Ie
I
I
Again suppose there is an error of type II in reporting
the i-th and {i+l)-th digits have been reversed.
x*
so that
Then
e* = y* - x*"
= (o,o, ••• ,
Since the field GF ()
(1
are identical.
xi+1-xi , xi-xi +1 , ••• , 0) •
is of characteristic 2, addition and subtraction
Let
Nov; the syndrome of
y*
is
y*rr = (x*" + e*)HT
e~ rr
=
= z.(h.
1 -1
where
h.
-~
and
h'+l
-~
+ -1+
h. 1)
,
are the i-th and {i+l)-th row vectors of
The sum of i-th and (i+l)-th columns of
col~~
rrr.
H is given by the i-th
of S, where
o
S
=
to
° t° °
1
1
1
1
o
o
°
1
1
o
0
Now it should be noted that the last three columns of S are
proportional to
It is now easy to check that no two of the 19 columns of H and S are
proportional to one another.
If there is one error in a digit or a single
reversal error, the syndrome of
of HT or
sT.
y* "lill be proportional to just one row
In the first case we conclude that there is an error of type
I, and in the second case we conclude that there is an error of type II.
9
I
~ne
position of the column will give the position of the error and the con-
stant of proportionality will give e. or z. as the case may be.
~
The error
~
can then be corrected.
E;KBJII.Ple.
We shall
nOVT
illustrate the procedure of error correction.
We have seen that the index of X = 2,401,546 is X*
= 2,401,546,466.
Suppose that there is an error of type I, so that the digit 4 in the
= 2,401,526,466.
6-th position in X* has been reported as 2, then y*
Hence
= (t,t3,0,1,t4,t,t5,t3,t5,t5) ,
~
~ HT
= (a1,a2 ,a.,) ,
where
a
=t
1
=
a.,
=0
~
+ t3 + 0 + 1 + 0 + t + 0 + 0 + 0 + t
6,
= t 4 (1, t 6
1) is the 6-th row of
,
= t4
•
1) •
rt.
is an error of type I in the 6th digit, and e6
~
7
= t 3,
is
(t4 , t 3 , t 4 )
N01.:r (1, t
= t4 ,
t2 + t5 + 0 + t4 + t2 + 1 + t5 + 0 + t5 + 0
a2
Hence tl1e syndrome of
+ t3 + 0 + 1 + t4 + t + t 5 + t4 + 0 + 0
= Y"l
+ e6
=t
+ t
4
Hence we conclude that there
= t 4 • Now
= t 3 = 0:4
~
= t . Hence
•
Hence we correct the 6-th digit of y* to 4, getting back the correct
X* = 2,401,546,466.
Now suppose there has been an error of type
diGits of X* have been reversed giving y*
~
= (t,
=
n,
say the 5-th and 6-th
2,401,456,466.
t 3 , 0, 1, t 3 , t 4, t 5, t 3 , t 5 ,t5 ) ,
~HT = (b1 , b2 , b ) ,
3
Then
.-I
I
I
I
I
I
.-I
I
I
I
I
I
II
_I
I:
10
I,
I
I.
I
I
I
I
I
I
I.
I
I
I
I
I
I
I
where
b
b
1
2
=t + t3 + 0 + 1 +
=t2 + t5 + 0 + t4
t3 + t4 + t5 + t4 + 0 + 0
+ t + t
= 0 + t 3 + 0 + 1 + 0 + t 4 + 0 + 0 ... 0 + t 7
3
Hence the syndrome of ;[* is
(0, t 4 , t)
= t(O,
,
+ t5 + 0 + t5 + 0 = t4
b
=t •
t 3 , 1) •
He note that 0, t 3 , 1 is the 5-th row of ST. Hence we conclude
an
that there has been/interchange in the 5th and 6th digits. Hence intercl~ing
the 5-th and 6-th digits in y* we get back the correct
x* = 2,401,546,466
The value of z5 is t.
5
5 - x6 • (};5 -
X
which
•
This should agree with x -x6 •
Cl4
=
t4 -
t
3
= t
But
,
check~.
References
1.
R. C. Bose.
On the application of the properties of Galois fields to
the problem of construction of hyper-Graeco-Latin squares.
Sankhya 3
(1938), pp. 323-338.
2.
R. D. Carmichael.
Introduction to the theory of groups of finite order.
New York, Dover publications (1956), Chapter IX •
Ie
I
I
3
=0
11
© Copyright 2026 Paperzz