mathmth2002practical


Problem P1

Prove that there are an unlimited number of codes.

Part A

We can recall the definition of a code as follows…

Definition-of-a-Code-in-Coding-Theory

Part B

Given a natural number , we can define the following alphabet…

Since there are infinitely many natural numbers, there are infinitely many distinct sets that could be a potential alphabet for a code.

Part C

We can recall the definition of a Cartesian product as follows…

Definition-of-a-Cartesian-Product-in-Coding-Theory

Based on this, we can determine the number of elements of the Cartesian product as , where is the number of elements in the set and is the number of sets in the Cartesian product. This is because for each of the positions in the ordered pair, there are choices, leading to the aforementioned total.

Part D

Again recalling the definition of a code…

Definition-of-a-Code-in-Coding-Theory

We can explain that for any value of , we can always define at least one code that has at least elements (codewords), as we can always define an alphabet with any number symbols as previously proven.

Problem P2

Designing a code

Encode single instructions in English, e.g. “skip”, whose length is at most 10. It suffices that it detects and corrects 1 error.

Part A

The alphabet should include all English letters, so…

Part B

A code could simply repeat each element once per transmission, where it can fill the word to ten characters with empty space . Thus, every message will be and when encoded, e.g. skip sskkiipp .

Part C

Checking this code, if there is a single error in sskkiipp , e.g. ssckiipp , then we can detect where the error is, but not what the correct symbol most be. Hence, we must repeat it three times and whichever symbol shows 2 or more times out of the 3 is the correct symbol:

skip ssskkkiiippp .

Thus the final code can be defined as:

Given a word with symbols, , complete to have symbols be completing it with symbol for empty space, hence will have empty space symbols before encoding. After encoding, It’ll have empty space symbols and total symbols, as the encoding process repeats each symbols twice, so .

Problem P3

Finding the chance of errors.

Given that the error probability for transmission, we can calculate the chance of an arbitrary message being sent without errors, given that is the length of the message, as , as an error could happen in each symbol. Hence, the probability of success is which is still roughly after even symbols. This is very high.

Problem P4

Finding Hamming distances.

Recall the set when is prime number.

Part A

Given the word there are the following words with an exact Hamming distance of two:

The total words with a Hamming distance of two, given an alphabet and word length , are .

Part B

Given the alphabet , the Hamming distance between:

is .

Problem H1

ISBN-10 is an -ary code of length defined as

where the symbol is typically denoted by the capital letter . Note that the last symbol is should equal .

Part A

has a missing digit , which can be recovered by creating an equation based on that can be solved to find the unknown digit:

Given that this value should equal the last symbol, .

A similar process can be used with :

Then we can determine that .

Part B

An example of when the last symbol is could be:

This is probably the simplest example.