Definition
Coding Theory
Coding Theory refers to the theory of error-correcting and -detecting codes.
Goals
- Data Compression: Reduction of data volume
- Coding Theory: Protection against transmission errors (through increased redundancy)
- Cryptography: Protection against unwanted receivers and transmitters
Redundancy
Redundancy
Redundancy means including information that can be removed without losing the original data.
Multilevel Coding
- Source Coding: Original data is encoded using binary numbers (e.g. compression or encryption)
- Channel Coding: Re-coding of the binary data (e.g. compression or encryption)
- Line Coding: Re-coding of data to optimise it for the transmission medium
Error Detection and Correction
Errors always occur when information is transmitted, e.g. when calling someone on the phone. To reduce errors, redundancies are introduced.
Types of Transmission Errors
There are two major types of transmission errors:
- Single Bit Errors: A single bit or multiple unrelated bits are disturbed.
- Bursts: Multiple consecutive bits are disturbed.
Shannon Information
Relative Frequency
The relative frequency of a symbol is given by:
where is the number of occurrences that a symbol occurs in a word .
Information Content
The information content is given by:
where is the relative frequency of a symbol.
Entropy (Average Information Content)
Let be the set of symbols, then the entropy is given by:
Example: Compute the entropy of the following alphabet:
Then is:
Average Word Length
Let be the length of the th code, then the average word length is given by:
Redundancy
The redundancy is the difference between average word length and entropy (average information content):
To get the dimensionless relative redundancy , compute:
Types of Codes
Block Codes
Block code means that all codes have equal length, e.g.:
0101010
1000101
1101111
0000000
Linear Codes
Linear code means that you can choose a pair of two codes and their XOR result is again a valid code, e.g.:
0101010
1000101
1101111
0000000
Cyclical Codes
Cyclical code means that you can choose one possible code and shift it by 1 (to left or right) and the result is again a valid code, e.g.:
0101010
1010100
0010101