Problem 1. Determine the length, the size, andthe minimal distance for each q-ary code C below. How many errorscan each code correct? detect?
(a) C = { (0, 0, 0, 0, 0, 0), (0, 1, 1, 1, 1, 0), (1, 0, 0, 0,0, 1), (1, 1, 1, 1, 1, 1) }. Here q = 2.
(b) C = { (0, 0, 0, 0, 0, 0, 0), (2, 1, 0, 2, 1, 0, 1), (2, 2,2, 2, 2, 2, 2) }. Here q = 3.
(c) C = { (0, 1, 2, 3, 4), (1, 2, 3, 4, 0), (2, 3, 4, 0, 1), (3,4, 0, 1, 2), (4, 0, 1, 2, 3) }. Here q = 5.
Problem 2. Assume the code from Problem 1(a)was used in transmission, and the following words were received.Decode each of these words using the nearest neighbour decodingalgorithm. (The incomplete decoding version: if there is more thanone nearest neighbour, declare an error.)
(a) (0, 1, 0, 0, 0, 0),
(b) (1, 1, 0, 0, 1, 1),
(c) (0, 1, 0, 1, 0, 1),
(d) (1, 1, 0, 0, 0, 0).