1. Some error Detecting anDerror correcting coDeSapplication
Felicia FortFelicia Fort
proFeSSor Dr. mutungi
Senior preSentation
Department oF mathematicS anD
computer Science
april 22, 2010
12:30pm
2. table oF contenttable oF content
• Purpose
• Identifiers
– What is a Check Digit
– Why use Check Digits
• Introduction
– Error Correcting/ Detecting
– What is a code
– What is Linear Codes
• Advantaged/Disadvantages
• Encoding
• Decoding
• Conclusion
3. purpoSepurpoSe
Available information of error detecting, error correcting
codes and check-digit schemes as a way to show students
a practical application of mathematics and introduce them
to coding theory.
A message can become distorted through a wide range of
unpredictable errors.
• Humans
• Equipment failure
• Scratches in a magnetic tape
4. iDentiFierSiDentiFierS
• Social Security Number
• Vehicle Identification Number
• UPC (Bar Codes)
• ISBN
• U. S. Post Office Money Orders
• Zip Codes (12 digit)
• Credit Card Numbers
COMMON FEATURES:
•All of these Identifiers
contain a Check Digit,
except for Social Security
Numbers.
5. Why uSe check DigitS?Why uSe check DigitS?
Check Digit (1)- Redundancy which has been added to
the message (End of number) to detect or give
permission against noise
Check Digit (2)- A digit added to a number for the
purpose of detecting the sorts of errors humans
typically make on data entry.
• Machines can make errors.
– Transmission errors.
• People can make errors.
6. i.S.b.ni.S.b.n
international StanDarD bookinternational StanDarD book
numbernumber
• Form: L-PPPPP-BBBBB-C
• The ISBN is shown in four groups of
• numbers. The first number identifies the
• country, or language group, the second
• the publisher, the third the book, and the
• fourth is a check digit.
7. ISBN ANAlySISISBN ANAlySIS
• Advantages:
– This will catch all single digit errors and all
• transposition errors.
– It is not difficult to calculate.
• Disadvantages:
– It uses a “strange” character (X) to represent a
“digit” (ten).
9. ErrorSErrorS
• The general idea for achieving error detection
and correction is to add some extra data to a
message.
• Error detection is caused by noise during
transmission from: transmitter receiver.
• Error correction is the detection of errors.
10. 10
FormulA For dEtEctINg ErrorFormulA For dEtEctINg Error
Let d2, d4, d6, d8, d10, d12, d14, d16 be all the even values
in the credit card number.
Let d1, d3, d5, d7, d9, d11, d13, d15 be all the odd values in
the credit card number.
Let n be the number of all the odd digits which have a value
that exceeds four
Credit card has an error if the following is true:
(d1 + d3 + d5 + d7 + d9 + d11 + d13 + d15) x 2 + n +
(d2 + d4 + d6 + d8 + d10 + d12 + d14 + d16)
0 mod(10)≠
11. 11
dEtEct Error oN crEdIt cArddEtEct Error oN crEdIt cArd
d1
d2 d3 … d15 d16
n = 3
12. 12
Now thE tEStNow thE tESt
(4 + 4 + 8 + 1 + 3 + 5 + 7 + 9) = 41
(5 + 2 + 1 + 0 + 3 + 4 + 6 + 8) x 2 + 3 = 61
41 + 61 = 102 mod (10) = 2
3
13. IntroductIon- What Is a code?IntroductIon- What Is a code?
• A code is defined as an n-tuple of q elements.
Where q is any alphabet.
• Ex. 1001 n=4, q={1,0}
• The most common code is when q={1,0}. This
is known as a binary code.
14. LInear codeLInear code
• Is a subspace of V(n, q), for some positive
integer n.
– Thus a subset C of V(n, q) is a Linear Code iff
• U + V ∈ C, for all u and v in C, and
• au ∈ C, for all u ∈ C, a ∈ GF(q).
• If C is a k-dimensional subspace of V(n ,q), then the
linear code C is called an [n, k]- code.
15. advantages/dIsadvantagesadvantages/dIsadvantages
of LInear codesof LInear codes
Advantages
– We can specify a linear [n, k] code by simply giving a basis of k
codeword's. To specify a non-linear code, we may have to list all the
codeword's.
Disadvantages
– The restriction to linear codes might be a restriction to weaker codes
than desired.
– Linear q-ary codes are not defined unless q is a prime number.
16. LInear codesLInear codes
encodIng LInear codesencodIng LInear codes
The generator matrix G provides a way to encode a
message
G = [Ik / A] where A=[aij] is a K x (n-k) matrix
decodIng LInear codesdecodIng LInear codes
Decoding operation involves a parity-check matrix.
C= {X∈V(n,q)/xHT
= 0}
17. send a messagesend a message
• Digital Communication System
Message
Source
user Decoder
Encoder Channel
18. exampLe: 7.6exampLe: 7.6
Let G= 1 1 1 0
2 0 1 1
Let C be the ternary linear code with generator matrix: Find a generator matrix for C in standard form, Find a parity-
check matrix for C in standard form, Use syndrome decoding to decode the received vectors
Let C be the ternary linear code with generator matrix: Find a generator matrix for C in standard form, Find a parity-
check matrix for C in standard form, Use syndrome decoding to decode the received vectors
R1
R2
2 x 4 Matrix Z3 = {0,1, 2}
1 1 1 0
0 -2 -1 1
G =
R1
-2R1 + R2---R2 G = -1R2 + R1------R1
1 0 -1 -1
0 1 2 1G =
-1≡ 2MOD 3 =2
1 0 2 2
0 1 2 1G =
G in Standard Form
G = I2 A = 2 2
2 1
2 X 4
K x N
-AT
In-kH = =
-2 -2 1 0
-2 -1 0 1
MOD 3
= 1 1 1 0
1 2 0 1
Parity-Check Matrix
21. ConClusionConClusion
• Error correcting codes make it possible to detect and correct
common errors in transmission.
• We have proven that different error coding schemes are
chosen depending on the types of errors expected, such as
Linear Coding.
• Using error correction codes, the transmitter encodes the
data by adding parity check information and sends the
encoded data through the transmission channel to the
receiver. The receiver uses the decoder to decode the
received data and to make corrections using the added parity
check information.
22. REFEREnCEs
• Gallian, J.A. (1991). The Mathematical of Identification Numbers. The College
• Mathematics Journal 22: (194-202).
• Gonzalez, Diego L. (2008). The Codes of Life: Error Detection and Correction Codes.
Springer Netherlands (379-394)
• Guiasu, S. (1977). Information Theory with Applications. McGraw-Hill, New York.
• Hamming, Richard. (1986). Error Correcting and Error Detecting Coding: Coding and
Information Theory, 2e, Prentice Hall (27)
• Hill, Raymond. (1986). A First Course in Coding Theory, Clarendon press, Oxford (1-59)
• Roman, Steven. (1997). Linear Codes. Introduction to Coding and Information Theory.
Fullerton, CA (163).
• Rzeszowska-Wolny, J. (1983). Is Genetic Code Error-Correcting? J. Theory. Biology. 104:
(701-702).
• Shannon, Claude. (1948). A Mathematical Theory of Communication, (1-20)
• Trappe, Wade. Lawrence C. Washington. (2002). Linear Codes-Error Correcting Codes.
Introduction to Cryptography with Coding Theory. Prentice Hall. Upper Saddle, New
Jersey (301-311).
• www.beachnet.com
• http://en.wikipedia.org/wiki/Linear_code
• www.ISBN.com
• http://en.wikipedia.org/wiki/check_digits