defense senior college on error coding presentation 4/22/2010

24
Some Error Detecting and Error Correctin g Codes Appl ication Felicia Fort Felicia Fort Professor Dr. Mutungi Senior Presentation Department of Mathematics and Computer Science April 22, 2010 12:30pm

Upload: felicia-fort-mba

Post on 08-Aug-2015

39 views

Category:

Education


0 download

TRANSCRIPT

Some Error Detecting and Error Correcting Codes ApplicationFelicia Fort Felicia Fort

Professor Dr. MutungiSenior Presentation

Department of Mathematics and Computer Science

April 22, 201012:30pm

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

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

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.

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.

I.S.B.N I.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.

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).

ISBN ExampleISBN Example

• 0-1304-1717-?10(0)+9(1)+8(3)+7(0)+6(4)+5(1)+4(7)+3(1)+2(7)

= 0 + 9 + 24 +0 + 24 + 5 +28 + 3 + 14= 107/11 = 11 -8 = (3) Check Digit

• 0-1340-1717-?= 0 + 9 + 24 + 28 + 0 + 5 +28 + 3 + 14

• 111 which is not a multiple of eleven.

Check110 (mod 11) = 0

Check110 (mod 11) = 0

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

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

Detect Error On Credit CardDetect Error On Credit Card

d1

d2 d3 … d15 d16

n = 3

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

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.

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.

Advantages/disadvantages of Advantages/disadvantages of Linear CodesLinear CodesAdvantages

– 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.

Linear CodesLinear Codes

ENcoding Linear CodesENcoding Linear CodesThe generator matrix G provides a way to encode a

messageG = [Ik / A] where A=[aij] is a K x (n-k) matrix

Decoding Linear CodesDecoding Linear CodesDecoding operation involves a parity-check matrix. C= {XV(n,q)/xHT= 0}

Send a messageSend a message

• Digital Communication System

Message Source

user Decoder

Encoder Channel

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

R22 x 4 Matrix Z3 = {0,1, 2}

1 1 1 00 -2 -1 1

G = R1

-2R1 + R2---R2 G = -1R2 + R1------R1

1 0 -1 -1 0 1 2 1G =

-1≡ 2MOD 3 =21 0 2 20 1 2 1G = G in Standard Form

G = I2 A = 2 2 2 1

2 X 4K 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

Identify the Codeword’s:

1 1 1 02 0 1 1

λ1 (1,1,1,0) + λ2 (2,0,1,1) λ1, λ2 Є Ζ3 = { 0, 1, 2 }

Λ1= 0, Λ2 =0Λ1 =0, λ2 = 1Λ1= 0, λ2= 2Λ1= 1, λ2= 0Λ1= 1, λ2= 1Λ1= 1, λ2= 2Λ1= 2, λ2= 0Λ1= 2, λ2= 1Λ1= 2, λ2= 2

Distribute Property: plug in λ1,λ2

(0,0,0,0)

(2,0,1,1)

(1,1,1,0)(0,1,2,1)

(2,1,0,2)

(2,2,2,0)

(1,2,0,1)(0,2,1,2)

(1,0,2,2)

1

89

7

6

45

3

2

List of Codeword's of the ternary (Z3) with generator matrix 1 1 1 1

2 0 1 1(0,0,0,0)(2,0,1,1)(1,0,2,2)(1,1,1,0)(0,1,2,1)(2,1,0,2)(2,2,2,0)(1,2,0,1)(0,2,1,2)

33333333

Minimum Distance of this code = smallest weight of any non-zero codeword.Minimum Distance = 3Can detect 2 errorsCorrect 1 error

2 x 4 4 x 1

1 1 1 01 2 0 1

2011

=2+0+1+02+0+0+1 = 3

3= 0

03 MOD 3= 0

CodewordParity-CheckMatrix

= (2, 1, 0, 2) (2, 1, 0, 2) ЄЄ C. C.

Let’s say that the Result (Sent Vector) was this instead…. (0, 1, 0, 2)(0, 1, 0, 2) Due to noise

1 1 1 01 2 0 1

0 0 110022

=0+1+0+00+2+0+2 =

14 X

Receiver Detects Error

(0000) (2011) (1022) (1110) (0121) (2102) (2220) (1201) (0212)

(1000) (0111) (2022) (2110) (1121) (0102) (0220) (2201) (1212)

(0100) (2111) (1122) (1210) (0221) (2202) (2020) (1001) (0012)

(0010) (2021) (1002) (1120) (0101) (2112) (2200) (1211) (0222)

(0002) (2010) (1021) (1112) (0120) (2101) (2222) (1200) (0211)

(0200) (2211) (1222) (1010) (0021) (2002) (2120) (1101) (0112)

(0020) (2001) (1012) (1100) (0111) (2122) (2210) (1221) (0202)

(0001) (2012) (1020) (1111) (0122) (2100) (2221) (1202) (0210)

(2000) (1011) (0022) (0110) (2121) (1101) (1220) (0201) (2212)

Syndrome Look-Up Table

Coset Leaders

(0,1,0,20,1,0,2) – (1,0,0,0) = (-1,1,0,2) = (2,1,0,2)

-1MOD3= 2Received Vector - Coset Leader

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.

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

Acknowledgements

• God Almighty• BC STEM Faculty

– Dr. Patrick Mutungi– Mrs. Feresteh Zahed– Ms. Gallon– Ms. Counts– Friends

QUESTIONSQUESTIONS