channel of communication noise Each codeword has length 2, and all digits are either 0 or 1. Such codes are called Binary Codes.

Similar documents
9 THEORY OF CODES. 9.0 Introduction. 9.1 Noise

Error Detection and Correction: Hamming Code; Reed-Muller Code

Modular numbers and Error Correcting Codes. Introduction. Modular Arithmetic.

EE 229B ERROR CONTROL CODING Spring 2005

Digital Communications III (ECE 154C) Introduction to Coding and Information Theory

U Logo Use Guidelines

Cyclic Redundancy Check Codes

Can You Hear Me Now?

exercise in the previous class (1)

Multimedia Systems WS 2010/2011

MATH 433 Applied Algebra Lecture 21: Linear codes (continued). Classification of groups.

Exercise 1. = P(y a 1)P(a 1 )

MATH 291T CODING THEORY

The Liar Game. Mark Wildon

CSE 123: Computer Networks

16.36 Communication Systems Engineering

Answers and Solutions to (Even Numbered) Suggested Exercises in Sections of Grimaldi s Discrete and Combinatorial Mathematics

MATH 291T CODING THEORY

Linear Algebra. F n = {all vectors of dimension n over field F} Linear algebra is about vectors. Concretely, vectors look like this:

Hadamard Codes. A Hadamard matrix of order n is a matrix H n with elements 1 or 1 such that H n H t n = n I n. For example,

Example: sending one bit of information across noisy channel. Effects of the noise: flip the bit with probability p.

MATH3302. Coding and Cryptography. Coding Theory

1.6: Solutions 17. Solution to exercise 1.6 (p.13).

Coset Decomposition Method for Decoding Linear Codes

MATH Examination for the Module MATH-3152 (May 2009) Coding Theory. Time allowed: 2 hours. S = q

Ma/CS 6b Class 24: Error Correcting Codes

Chapter 7. Error Control Coding. 7.1 Historical background. Mikael Olofsson 2005

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 11. Error Correcting Codes Erasure Errors

MATH3302 Coding Theory Problem Set The following ISBN was received with a smudge. What is the missing digit? x9139 9

1. How many errors may be detected (not necessarily corrected) if a code has a Hamming Distance of 6?


Shannon s noisy-channel theorem

Practical Polar Code Construction Using Generalised Generator Matrices

Physical Layer and Coding

Coding Theory and Applications. Linear Codes. Enes Pasalic University of Primorska Koper, 2013

Assume that the follow string of bits constitutes one of the segments we which to transmit.

Linear Codes and Syndrome Decoding

Information redundancy

Ma/CS 6b Class 25: Error Correcting Codes 2

( c ) E p s t e i n, C a r t e r a n d B o l l i n g e r C h a p t e r 1 7 : I n f o r m a t i o n S c i e n c e P a g e 1

ELEC 519A Selected Topics in Digital Communications: Information Theory. Hamming Codes and Bounds on Codes

Solutions to problems from Chapter 3

BINARY CODES. Binary Codes. Computer Mathematics I. Jiraporn Pooksook Department of Electrical and Computer Engineering Naresuan University

Fault Tolerant Computing CS 530 Information redundancy: Coding theory. Yashwant K. Malaiya Colorado State University

Convolutional Coding LECTURE Overview

Channel Coding and Interleaving

Math 512 Syllabus Spring 2017, LIU Post

CSCI 2570 Introduction to Nanocomputing

MT5821 Advanced Combinatorics

Discrete Mathematics and Probability Theory Fall 2013 Vazirani Note 6

Coding theory: Applications

1 Ex. 1 Verify that the function H(p 1,..., p n ) = k p k log 2 p k satisfies all 8 axioms on H.

ERROR-CORRECTING CODES AND LATIN SQUARES

Mathematics Department

6.3 Bernoulli Trials Example Consider the following random experiments

Communications II Lecture 9: Error Correction Coding. Professor Kin K. Leung EEE and Computing Departments Imperial College London Copyright reserved

And for polynomials with coefficients in F 2 = Z/2 Euclidean algorithm for gcd s Concept of equality mod M(x) Extended Euclid for inverses mod M(x)

2. Polynomials. 19 points. 3/3/3/3/3/4 Clearly indicate your correctly formatted answer: this is what is to be graded. No need to justify!

Lecture 12: November 6, 2017

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Discussion 6A Solution

Lecture 8: Shannon s Noise Models

Low-Density Parity-Check Codes

Polynomial Codes over Certain Finite Fields

Top Ten Algorithms Class 6

IOSR Journal of Mathematics (IOSR-JM) e-issn: , p-issn: x. Volume 9, Issue 2 (Nov. Dec. 2013), PP

4 An Introduction to Channel Coding and Decoding over BSC

A Brief Encounter with Linear Codes

LMS Popular Lectures. Codes. Peter J. Cameron

Binary Linear Codes G = = [ I 3 B ] , G 4 = None of these matrices are in standard form. Note that the matrix 1 0 0

Information Theory (Information Theory by J. V. Stone, 2015)

TC08 / 6. Hadamard codes SX

Lecture 4: Proof of Shannon s theorem and an explicit code

National University of Singapore Department of Electrical & Computer Engineering. Examination for

Communication Engineering Prof. Surendra Prasad Department of Electrical Engineering Indian Institute of Technology, Delhi

MATH 433 Applied Algebra Lecture 22: Review for Exam 2.

An introduction to basic information theory. Hampus Wessman

19 Lorenz Cipher Machine

(Classical) Information Theory III: Noisy channel coding

ECE 4450:427/527 - Computer Networks Spring 2017

Shannon's Theory of Communication

Linear Block Codes. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

Combinatorics in Space. The Mariner 9 Telemetry System

Capacity of a channel Shannon s second theorem. Information Theory 1/33

XOR - XNOR Gates. The graphic symbol and truth table of XOR gate is shown in the figure.

Chapter 3 Linear Block Codes

Coding Theory: Linear-Error Correcting Codes Anna Dovzhik Math 420: Advanced Linear Algebra Spring 2014

Combinatorics in Space. The Mariner 9 Telemetry System

VHDL Implementation of Reed Solomon Improved Encoding Algorithm

Coding Theory. Golay Codes

Lecture 7. Union bound for reducing M-ary to binary hypothesis testing

Error Correcting Codes Prof. Dr. P. Vijay Kumar Department of Electrical Communication Engineering Indian Institute of Science, Bangalore

An Introduction to (Network) Coding Theory

17.1 Binary Codes Normal numbers we use are in base 10, which are called decimal numbers. Each digit can be 10 possible numbers: 0, 1, 2, 9.

Exam 1. Problem 1: True or false

EE512: Error Control Coding

Know the meaning of the basic concepts: ring, field, characteristic of a ring, the ring of polynomials R[x].

Lecture 1: Shannon s Theorem

REED-SOLOMON CODE SYMBOL AVOIDANCE

Reed Muller Error Correcting Codes

Lecture 12. Block Diagram

Transcription:

5 Binary Codes You have already seen how check digits for bar codes (in Unit 3) and ISBN numbers (Unit 4) are used to detect errors. Here you will look at codes relevant for data transmission, for example, for transmission of pictures from Mars to the Earth, and see how such codes are designed. 5. Noise: Error Detection To take an example, in TV broadcasting the message for transmission is a picture in the studio. The camera converts this into a 65-row array of packages of information, each package denoting a particular colour. This array, in the form of an electrical signal, is broadcast via antennae and the atmosphere, and is finally interpreted by the receiving set in the living room. The picture seen there differs somewhat from the original, errors having corrupted the information at various stages in the channel of communication. These errors may result in effects varying from subtle changes of colour tone to what looks like a violent snowstorm. Technically, the errors are all classified as noise. What form does 'noise' take in telephone calls? A model of data transmission is shown below. channel of communication message Encoder transmitted signal noise received signal Decoder received message Normally, the message is encoded, the signal transmitted to the receiver, and then decoded with a received message. It is in the transmission that noise can affect the signal. The Mariner 9 spacecraft in 97 sent television pictures of the planet Mars across a distance of 84 million miles. Despite a very low power transmitter, the space-probe managed to send data which eventually resulted in very high quality pictures being shown on our screens. This was in part largely due to the sophisticated coding system used. As a very simple example, consider a code which has just four codewords: { } C = ( 00), ( 0), ( 0), ( ) Each codeword has length, and all digits are either 0 or. Such codes are called Binary Codes. Activity Could you detect an error in the transmission of any of these codewords?

One way to detect an error, would be to repeat each codeword, giving a new code { } C 0000, 00, 00, = ( ) ( ) ( ) ( ) Here each pair of digits is repeated. Example Can Code C detect a single error? For example, if the codeword (0 0 ) was corrupted to ( 0 ) it is clear that an error can be detected, as ( 0 ) is not one of the codewords. So, yes, C can detect a single error. Example Can a single error in a codeword be corrected? This is not so straightforward to answer since, for example, ( 0 ) could have also been ( ) with one error, as well as (0 0 ). So this code can detect a single error but cannot correct it. It should also be added that the efficiency (or rate) of this code is given by number of original message bits length of codeword = = 4 since each codeword in the original message had only two digits (called bits). Activity Consider a code designed to specify one of four possible directions: up down left right (0 0 0) ( 0) (0 ) ( 0 ) Can this code detect any single error made during the transmission of a codeword? Can it correct the error? Often codes include a parity check so that, for example, the code C is transformed to C as shown below. C C 0 0 0 0 0 0 0 0 0 0

The extra last digit in C is 0 if the sum of the digits modulo is zero or even, or if odd. (Modulo means 0+ 0= 0, 0+ =, but + = 0, etc.) Example 3 Can Code C detect errors now? Yes it can, as any single error in a codeword is no longer a codeword. For example, if 0 0 is received instead of 0 0 0, then there is clearly an error. Using the previous definition, the efficiency of Code C is 3. None of the codes considered so far can correct errors. Activity 3 Design a code containing 4 codewords, each of length 5, which can detect and correct a single error. 5. Error Correction It is clear that codes which can not only detect, but also correct errors are of far greater use than those that can only detect but the efficiency will decrease, since extra essentially redundant information will have to be transmitted. For example, here is a code that can be used to identify four directions: up down left right (0 0 0 0 0 0) ( 0 0 0) (0 0 0) ( 0 0 ) The length of each codeword is 6, but since the number of message bits is essentially, i.e. the code could consist of (0 0), ( ), (0 ), ( 0) its efficiency is 6 =. But, as you see, it can now correct single errors. 3 Activity 4 The following codewords have been received using the code above. Assuming that only one error has been made in the transmission of each codeword, determine, if possible, the actual codeword transmitted: (a) ( 0 0 0 0 0) (b) ( 0 0 0 0) (c) (0 0 0 ) 3

Example 4 Can the code above detect if errors have been made in the transmission of a codeword? If two errors are made, for example 0 0 0 0 is transmitted instead of 0 0 0 0 0 0, this is not identifiable. Indeed, you would assume that only one error had been made and that the actual codeword was 0 0 0. Activity 5 Codes Consider Code 5 given in the Appendix. Find out how many errors this code can detect and correct by considering, for example, codewords such as (a) ( 0 0 0 0 0) (b) (0 ) (c) ( 0 0 0 0 0) which are in error. By now you should be beginning to get a feel for what is the important characteristic of a code for the determination of the number of errors that can be detected and corrected. The crucial concept is that of distance between codewords. The distance (d) between any two codewords in a code is defined as the sum of the number of actual differences between the digits in the codewords; for example (( ) ( )) (( ) ( )) d, 00 = whilst d 00, 0 =3 The Hamming distance is defined for a BINARY CODE (in which the digits are either 0 or ) as the minimum distance between any two codewords in the code and is usually denoted by δ (the letter 'delta' from the Greek alphabet). Example 5 Determine the Hamming distance for the code with codewords ( 0 0 0), (0 0 0 ), ( 0 0 ), ( ) You must first find distances between all the codewords. (( ) ( )) = d 000, 000 4 (( ) ( )) = d 000, 00 3 ( ( ) ( ) ) = d 0 0 0, 4 ( ( ) ( ) ) = d 000, 00 Hamming distance δ = (minimum of,, 3 and 4) d 0 00, 3 ( ( ) ( ) ) = ( ( ) ( ) ) = d 00, 4

Why is the Hamming distance crucial for error detection and correction? Activity 6 Hamming distance Determine the Hamming distance for Codes,, 3, 4 and 5 given in the Appendix. To try to see the connection between the Hamming distance, δ, and the number of errors that can be detected or corrected, in the next Activity you will consider Codes to 5 from the Appendix. Activity 7 Copy and complete this table. Errors Code Hamming distance corrected detected 0 3 3......... 4......... 5......... Also add on to the table any other codes considered so far. Can you see a pattern? The first thing that you probably noticed about the data in the table is that the results are different depending on whether n is even or odd. It looks as if, for δ =, you can detect error but correct 0 errors, δ = 3, you can detect error and correct error. Example 6 How do you think the pattern continues for δ = 4 and δ = 5? For δ = 4, you can detect errors but are only able to correct error; for δ = 5, you can both detect and correct errors. 5

Activity 8 Construct a code for which δ = 4. How many errors can it detect or correct? Similarly, construct a code for which δ = 5 and again determine how many errors it can detect or correct. Can you suggest a generalisation of the results? As can be seen from Activities 6 and 7, there is a distinct pattern emerging. For δ odd, the code can correct and detect up to ( ) errors. δ δ even, the code can correct up to δ ( ) errors, and detect up to δ errors. Activity 9 Validating the results Check that the above result holds for Code 9 in the Appendix. Exercise. The ' out of 5' code consists of all possible words of length 5 which have exactly two s; for example, ( 0 0 0) belongs to the code but ( 0 0) does not. List all possible codewords and explain why this code is particularly useful for the transmission of numeric data. What is the Hamming distance for this code?. Analyse the '3 out of 7' code, defined in a similar way to the ' out of 5' code in question. Determine its Hamming distance and hence find out how many words it can detect and correct. 3. Determine the Hamming distance for Code 7 in the Appendix. Hence find out how many errors this code can detect and correct. 6

Appendix Codes Code Code 6 Code 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Code 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Code 7 Code 9 0 0 0 0 0 0 0 0 0 0 0 0 Code 3 0 0 0 0 0 0 0 0 Code 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Code 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7