Exercise in the previous class p: the probability that symbols are delivered correctly C: 1 00 → 00000 01 → 01011 10 → 10101 11 → 11110 What is the threshold.

Slides:



Advertisements
Similar presentations
CSNB143 – Discrete Structure
Advertisements

Chapter Matrices Matrix Arithmetic
Error Control Code.
10.1 Chapter 10 Error Detection and Correction Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
296.3Page :Algorithms in the Real World Error Correcting Codes II – Cyclic Codes – Reed-Solomon Codes.
CHANNEL CODING REED SOLOMON CODES.
II. Linear Block Codes. © Tallal Elshabrawy 2 Last Lecture H Matrix and Calculation of d min Error Detection Capability Error Correction Capability Error.
Quantum Error Correction Joshua Kretchmer Gautam Wilkins Eric Zhou.
Cellular Communications
Chapter 3: Channel Coding (part 1)
DIGITAL COMMUNICATION Coding
EEE377 Lecture Notes1 EEE436 DIGITAL COMMUNICATION Coding En. Mohd Nazri Mahmud MPhil (Cambridge, UK) BEng (Essex, UK) Room 2.14.
Chapter 11 Algebraic Coding Theory. Single Error Detection M = (1, 1, …, 1) is the m  1 parity check matrix for single error detection. If c = (0, 1,
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
CALCULUS – II Matrix Multiplication by Dr. Eman Saad & Dr. Shorouk Ossama.
15-853Page :Algorithms in the Real World Error Correcting Codes I – Overview – Hamming Codes – Linear Codes.
exercise in the previous class (1)
Hamming Codes 11/17/04. History In the late 1940’s Richard Hamming recognized that the further evolution of computers required greater reliability, in.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
Linear codes 1 CHAPTER 2: Linear codes ABSTRACT Most of the important codes are special types of so-called linear codes. Linear codes are of importance.
February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 1 Addition of Integers How do we (humans) add two integers? Example: 7583.
ECON 1150 Matrix Operations Special Matrices
Linear Codes.
USING THE MATLAB COMMUNICATIONS TOOLBOX TO LOOK AT CYCLIC CODING Wm. Hugh Blanton East Tennessee State University
1 S Advanced Digital Communication (4 cr) Cyclic Codes.
Exercise in the previous class (Apr. 26) For s = (|s|=36), compute  2 -values of s for block length with 1, 2, 3.
Information and Coding Theory Linear Block Codes. Basic definitions and some examples. Juris Viksna, 2015.
1 Channel Coding (II) Cyclic Codes and Convolutional Codes.
4-2 binary fields and binary vector spaces Special Thanks to Dr. Samir Al-Ghadhban & EE430 Students.
CODING/DECODING CONCEPTS AND BLOCK CODING. ERROR DETECTION CORRECTION Increase signal power Decrease signal power Reduce Diversity Retransmission Forward.
Algebra 3: Section 5.5 Objectives of this Section Find the Sum and Difference of Two Matrices Find Scalar Multiples of a Matrix Find the Product of Two.
Chapter 4 – Matrix CSNB 143 Discrete Mathematical Structures.
Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.
1 SNS COLLEGE OF ENGINEERING Department of Electronics and Communication Engineering Subject: Digital communication Sem: V Cyclic Codes.
MIMO continued and Error Correction Code. 2 by 2 MIMO Now consider we have two transmitting antennas and two receiving antennas. A simple scheme called.
Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming.
Matrices Matrices A matrix (say MAY-trix) is a rectan- gular array of objects (usually numbers). An m  n (“m by n”) matrix has exactly m horizontal.
2009/9 1 Matrices(§3.8)  A matrix is a rectangular array of objects (usually numbers).  An m  n (“m by n”) matrix has exactly m horizontal rows, and.
DIGITAL COMMUNICATIONS Linear Block Codes
ADVANTAGE of GENERATOR MATRIX:
Chapter 31 INTRODUCTION TO ALGEBRAIC CODING THEORY.
Module #9: Matrices Rosen 5 th ed., §2.7 Now we are moving on to matrices, section 7.
Information Theory Linear Block Codes Jalal Al Roumy.
Word : Let F be a field then the expression of the form a 1, a 2, …, a n where a i  F  i is called a word of length n over the field F. We denote the.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
1 Graphics CSCI 343, Fall 2015 Lecture 10 Coordinate Transformations.
Computer Communication & Networks Lecture 9 Datalink Layer: Error Detection Waleed Ejaz
The parity bits of linear block codes are linear combination of the message. Therefore, we can represent the encoder by a linear system described by matrices.
Error Detection and Correction – Hamming Code
Some Computation Problems in Coding Theory
Error Detection and Correction
Digital Communications I: Modulation and Coding Course Term Catharina Logothetis Lecture 9.
Cryptography and Coding Theory
1.3 Matrices and Matrix Operations. A matrix is a rectangular array of numbers. The numbers in the arry are called the Entries in the matrix. The size.
Hamming Distance & Hamming Code
Error Control Coding. Purpose To detect and correct error(s) that is introduced during transmission of digital signal.
Richard Cleve DC 2117 Introduction to Quantum Information Processing QIC 710 / CS 667 / PH 767 / CO 681 / AM 871 Lecture (2011)
Reed-Solomon Codes Rong-Jaye Chen.
Matrices CHAPTER 8.9 ~ Ch _2 Contents  8.9 Power of Matrices 8.9 Power of Matrices  8.10 Orthogonal Matrices 8.10 Orthogonal Matrices 
Exercise in the previous class (1) Define (one of) (15, 11) Hamming code: construct a parity check matrix, and determine the corresponding generator matrix.
II. Linear Block Codes. © Tallal Elshabrawy 2 Digital Communication Systems Source of Information User of Information Source Encoder Channel Encoder Modulator.
Channel Coding: Part I Presentation II Irvanda Kurniadi V. ( ) Digital Communication 1.
RS – Reed Solomon Error correcting code. Error-correcting codes are clever ways of representing data so that one can recover the original information.
MTH108 Business Math I Lecture 20.
Hamming Code In 1950s: invented by Richard Hamming
MATHEMATICS Matrix Multiplication
II. Linear Block Codes.
Information Redundancy Fault Tolerant Computing
II. Linear Block Codes.
Presentation transcript:

exercise in the previous class p: the probability that symbols are delivered correctly C: 1 00 → → → → What is the threshold ( 閾値 ) of p with which using C is good/bad? without coding, correct probability = p 2 = A with coding, correct probability = p 5 + 5p 4 (1 – p) = B B > A if p 5 + 5p 4 (1 – p) – p 2 = p 2 (p – 1)(–4p 2 + p + 1) > 0 (roots = –0.39, 0, 0.64, 1) Using C is better if 0.64 < p < 1.

what did we learn? motivation and models of communication channels simple examples of linear codes even parity check codes (a 1, …, a k ) → (a 1, …, a k, p), p = a 1 + … + a k mod 2 error detection only horizontal and vertical parity check (2D) code (a 1, a 2, a 3, a 4 ) → 2 a1a1 a2a2 a3a3 a4a4 x1x1 x2x2 y1y1 y2y2 z → (a 1, a 2, a 3, a 4, x 1, x 2, y 1, y 2, z) one-bit error correcting, two-bits error detecting

errata: additional remark (cnt’d) We expect that 2D codes detect all two-bit errors. If we don’t use the parity of parity, then codeword bit err. to the nearest codeword 1-bit err. some two-bit errors are not detected, instead, they are decoded to a wrong codeword to the nearest codeword

additional remark (cnt’d) , corrected We expect that 2D codes detect all two-bit errors. If we don’t use the parity of parity, then codeword bit err. to the nearest codeword 1-bit err. some two-bit errors are not detected, instead, they are decoded to a wrong codeword. to the nearest codeword

today’s class linear codes definition encoding decoding (error detection and correction) 5

(one of) definition(s) of linear codes a binary code C is linear  C is a vector space  for any u, v  C, we have u + v  C parity check code with length 3: how about parity check code with other length?

linearity of parity check codes C: parity check code for length k data (x 1,..., x k )... codewords in C are (x 1,..., x k, p) with p = x x k Theorem: parity check codes are linear Proof: confirm that u + v  C for any u, v  C. 7 u = (u 1,..., u k, p),(p = u u k ), v = (v 1,..., v k, q),(q = v v k ), u + v = (u 1 + v 1,..., u k + v k, p + q). because p + q = u u k + v v k = (u 1 + v 1 ) (u k + v k ), p + q is a valid parity bit for (u 1 + v 1,..., u k + v k ).  u + v is a codeword Theorem: 2D codes are linear (proof omitted)

computation of parity bits parity check codes, 2D codes... for information bits (x 1, x 2,..., x k ), parity bits are defined by linear equations p = a 1 x 1 + a 2 x a k x k (a 1, a 2,..., a k ∈ {0, 1}) 8 (x 1,..., x k, p)p = x x k (x 1,..., x ab, p 1,..., p b, q 1,..., q a, r) In both codes, parity bits are sum of some of information bits.

linear parity bits make the code linear Lemma: for a linear equation f(x 1, x 2,..., x k ) = a 1 x 1 + a 2 x a k x k, f(u 1, u 2,..., u k ) + f(v 1, v 2,..., v k ) = f(u 1 + v 1, u 2 + v 2,..., u k + v k ) Theorem: If parity bits are defined by linear equations, then C is linear. 9 codeword (u 1, u 2,..., u k,..., f(u 1, u 2,..., u k ),...) codeword (v 1, v 2,..., v k,..., f(v 1, v 2,..., v k ),...) +) (u 1 + v 1, u 2 + v 2,..., u k + v k,..., f(u 1, u 2,..., u k ) + f(v 1, v 2,..., v k ),...) (u 1 + v 1, u 2 + v 2,..., u k + v k,..., f(u 1 + v 1, u 2 + v 2,..., u k + v k ),...) = codeword

example of linear code construction k = 3: information bits are (x 1, x 2, x 3 ). determine parity bits as you like... p 1 = x 1 + x 2 p 2 = x 2 + x 3 10 ⇒ the codeword is (x 1, x 2, x 3, p 1, p 2 )

codewords for unit vectors Assume that... we define m parity bits for k-bit information x 1, x 2,..., x k, with the j-th parity bit defined by p j = a j,1 x 1 + a j,2 x a j,k x k (a j,i = 0 or 1) the codeword for the unit vector (0,...,0, 1, 0,..., 0) is... c i = (0,..., 1,..., 0, a 1,i, a 2,i,..., a m,i ) 11 ^^^ i1k c 1 = c 2 = c 3 = p 1 = x 1 + x 2 p 2 = x 2 + x 3 example in p.10: k = 3, m = 2 (a 1,1 a 1,2 a 1,3 ) = (1 1 0) (a 2,1 a 2,2 a 2,3 ) = (0 1 1) transposition ( 転置 )

“basis” in a linear code a vector space has a basis ( 基底 ) b 1, b 2,..., b k : any u in the space is written as u = u 1 b 1 + u 2 b u k b k (u i ∈ {0, 1}) 12 Theorem: Codewords c 1, c 2,..., c k for unit vectors constitute the basis of C. any codeword c  C is written as u = u 1 c 1 + u 2 c u k c k (u i ∈ {0, 1})

basis of the p.8 example k = 3: information bits are (x 1, x 2, x 3 ) p 1 = x 1 + x 2 p 2 = x 2 + x 3 13 c 1 = c 2 = c 3 = codewords = 0 ・ ・ ・ = 0 ・ ・ ・ = 0 ・ ・ ・ = 0 ・ ・ ・ = 1 ・ ・ ・ = 1 ・ ・ ・ = 1 ・ ・ ・ = 1 ・ ・ ・ 00101

generator matrix if the j-th parity bit is p j = a j,1 x 1 + a j,2 x a j,k x k, then c i = (0,..., 1,..., 0, a 1,i, a 2,i,..., a m,i ) c 1, c 2,..., c k is a basis of C any codeword u is written as u = u 1 c 1 + u 2 c u k c k 14 generator matrix of C encoding = multiplication of the generator matrix and a vector

the structure of the generator matrix 15 the generator matrix k × k identity matrix row vectors = codewords for unit vector transposition of the coefficients of the linear equations of parity bits

example 16 parity check codep = x 1 + x 2 + x 3 2D code p 1 = x 1 + x 2 p 2 = x 3 + x 4 q 1 = x 1 + x 3 q 2 = x 2 + x 4 r = x 1 + x 2 + x 3 + x 4 x1x1 x2x2 x3x3 x4x4 p1p1 p2p2 q1q1 q2q2 r

encoding 17 encoding of a 2D code to encode the codeword is

hardware encoder 18 u1u1 u2u2 u3u3 u4u4 u1u1 u2u2 u3u3 u4u4 p1p1 p2p2 q1q1 q2q2 r data codeword XOR

summary of the first half A code is linear if and only if... it is a vector space parity bits are defined by linear equations codewords of unit vectors is a basis of the code the generator matrix... contains basis codewords as its row vectors gives mathematical principle for encoding  an encoder is realizable by a combinatorial circuit ( 組み合わせ回路 ) 19

condition for a vector to be a codeword (1) consider a 2D code 20 p 1 = x 1 + x 2 p 2 = x 3 + x 4 q 1 = x 1 + x 3 q 2 = x 2 + x 4 r = x 1 + x 2 + x 3 + x 4 a vector (x 1 x 2 x 3 x 4 p 1 p 2 q 1 q 2 r) is a codeword if and only if

condition for a vector to be a codeword (2) 21 p 1 = x 1 + x 2 p 2 = x 3 + x 4 q 1 = x 1 + x 3 q 2 = x 2 + x 4 r = x 1 + x 2 + x 3 + x 4 x 1 + x 2 – p 1 = 0 x 3 + x 4 – p 2 = 0 x 1 + x 3 – q 1 = 0 x 2 + x 4 – q 2 = 0 x 1 + x 2 + x 3 + x 4 – r = 0 in binary world, x – y = x + y x 1 + x 2 + p 1 = 0 x 3 + x 4 + p 2 = 0 x 1 + x 3 + q 1 = 0 x 2 + x 4 + q 2 = 0 x 1 + x 2 + x 3 + x 4 + r = 0 parity check equations (x 1 x 2 x 3 x 4 p 1 p 2 q 1 q 2 r) is a codeword move the lhs to rhs...

condition for a vector to be a codeword (3) 22 x 1 + x 2 + p 1 = 0 x 3 + x 4 + p 2 = 0 x 1 + x 3 + q 1 = 0 x 2 + x 4 + q 2 = 0 x 1 + x 2 + x 3 + x 4 + r = 0 (x 1 x 2 x 3 x 4 p 1 p 2 q 1 q 2 r) is a codeword Is (x 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 ) a codeword? transpose the vector, multiply to this matrix from the right, and see if the result is 0 or not. zero ⇒ it’s a codeword nonzero ⇒ it’s not a codeword parity check matrix

parity check matrix for error detection consider a 2D code Is a codeword?... yes 23 Is a codeword?... no

generator and check matrices 24 definition of parity bits p 1 = a 1,1 x 1 + a 1,2 x a 1,k x k p 2 = a 2,1 x 1 + a 2,2 x a 2,k x k : p m = a m,1 x 1 + a m,2 x a m,k x k generator matrix identitycoefficients transposed a 1,1 x 1 + a 1,2 x a 1,k x k + p 1 = 0 a 2,1 x 1 + a 2,2 x a 2,k x k + p 2 = 0 : a m,1 x 1 + a m,2 x a m,k x k + p m = 0 k rows parity check matrix identitycoefficients n - k rows

example of matrices 25 2D code : n = 9, k = 4, m = n - k = 5. x1x1 x2x2 x3x3 x4x4 p1p1 p2p2 q1q1 q2q2 r generator matrixparity check matrix p 1 = x 1 + x 2 p 2 = x 3 + x 4 q 1 = x 1 + x 3 q 2 = x 2 + x 4 r = x 1 + x 2 + x 3 + x 4

syndrome For a parity check matrix H and a vector v, if Hv T = 0, then v  C if Hv T  0, then v  C the vector Hv T is called the syndrome ( シンドローム ) of v: if the syndrome of v is zero, then v  C if the syndrome of v is nonzero, then v  C The syndrome is more useful, because it contains the information of errors. 26

syndrome and error send a codeword u to a binary symmetric channel an error vector e is added to the codeword in the channel the received vector is v = u + e 27 u e v = u + e noise codewordreceived if e = 0 (no error), then the syndrome of v is... Hv T = Hu T = 0 if e  0 (error occurs), then the syndrome of v is... Hv T = H(u + e) T = Hu T + He T = He T the syndrome is solely determined from e, independently from u... if you see the syndrome, then you can say what e is.

error patterns determine the syndrome is sent, is received... H( ) T = ( ) T is sent, is received... H( ) T = ( ) T. ⇒ if the syndrome is ( ), then the fourth bit is in error independent from the sent codeword

error correction if you know the correspondence between error patterns and syndromes, then you can correct errors. 29 receivedsyndrome error pattern decoding result v = u + e compute the syndrome: s = Hv T s table of errors / syndromes..... e u

one-bit error Let n be a codeword, and let h i be the i-th column vector of H: 30 the syndrome of a one-bit error e = ( ) is... only one-bit error at the i-th symbol position ⇔ syndrome equals to the i-th vector of H (the table of errors / syndromes not needed)

example of error correction 2D code , , , , , , , , , , , , , , , codewords parity check matrix if is received... ⇒ the syndrome is H( ) T = ( ) T ⇒ this is the fifth column of H ⇒ the fifth-bit is in error, must be sent if is received... ⇒ the syndrome is H( ) T = ( ) T ⇒ this is the first column of H ⇒ the first-bit is in error, must be sent

parity check matrix and the ability of codes (1) one-bit error at the i-th symbol position ⇔ syndrome equals the i-th vector of H if several column vectors in H are the same, then different error patterns result in the same syndrome the error pattern is not uniquely determined 32 parity check codep = x 1 + x 2 p 1 = x 1 + x 2 p 2 = x 2 + x 3 the example code in p. 8 error correction NOT possible

parity check matrix and the ability of codes (2) one-bit error at the i-th symbol position ⇔ syndrome equals the i-th vector of H if all column vectors in H are different, then different error patterns result in different syndromes the error pattern is uniquely determined 33 error correction possible 2D code

summary definition of linear codes vector space, parity bits defined by linear equations generator matrix matrix of basis codewords contributes to the encoding parity check matrix represents constraints among symbols determines syndrome  error correction and error detection 34

exercise Consider an “odd” parity check code C whose codewords are (x 1, …, x k, p) with p = x 1 +…+x k +1. Is C a linear code? Construct a 2D code for 6-bit information (a 1,..., a 6 ) as follows. determine the generator and parity check matrices encode using the generator matrix correct an error in the sequence a1a1 a2a2 a3a3 a4a4 a5a5 a6a6 p1p1 p2p2 q1q1 q2q2 q3q3 r (a 1,..., a 6 ) → (a 1,..., a 6, p 1, p 2, q 1, q 2, q 3, r)