Skip to main content

Section 4.1 Example: Error Correcting Codes

Subsection 4.1.1 Illustrated

In order to transfer data, that data must first be encoded in some fashion. For example letters are coded as numbers (Unicode). Every code is designed starting with the data and then assigning a code for each piece.

Additionally a code can address errors in transmission. Any time data is transmitted there is the chance that noise is introduced changing some of the values. To ensure that the correct data can be read despite the introduction of noise, codes are constructed that can either detect error or correct some errors. To do this each piece of data is encoded with sufficient duplicate information so that limited noise cannot change one piece of data into another one. For these examples the data will be considered to be binary strings. Errors will be counted as the numbers of bits that change.

Distance can be formally defined, but for these examples we will use the specific distance defined by the distance between two binary strings is the number of digits that are different. For example \(d(001,011)=1\) and \(d(000,110)=2.\) This is known as the taxi cab metric, because it it the distance in blocks that must be traveled by a taxi. Figure FigureĀ 4.1.1 is a diagram showing all 3 digit binary strings with lines connecting those that are distance 1.

Figure 4.1.1. 3 digit binary strings with distance one

Subsection 4.1.2 Practice

The goal is to design a code such that we can be certain two binary strings are different.

Checkpoint 4.1.2.
Checkpoint 4.1.3.

If a single bit of 00 or 11 were changed (0 to 1 or 1 to 0) could you be certain whether a 00 or 11 had been sent?

Checkpoint 4.1.4.
Checkpoint 4.1.5.
Checkpoint 4.1.6.
Checkpoint 4.1.7.

If a single bit of 000 or 111 were changed (0 to 1 or 1 to 0) could you be certain whether a 000 or 111 had been sent?

Checkpoint 4.1.8.

For the sake of reading data, two strings are considered equivalent if we are sure that they represent the same initial data. If anything distance one away is considered equivalent, what are the other representations for 000 in the code above? What are the other representations of 111 in the code above?

Checkpoint 4.1.9.

If two bits of 000 or 111 were changed (0 to 1 or 1 to 0) could you be certain whether a 000 or 111 had been sent?

Checkpoint 4.1.10.

Build a code for the data 00, 01, 10, 11 that will correct one bit errors. What is the fewest number of bits that can be used for each piece of data providing single bit error correction?