MTAT.05.082: Introduction to Coding Theory University of Tartu Homework 4 Solution It is possible to collect up to 110 points in this homework. 1. Show that the linear [n, k, d] code C over F is MDS if and only if every set of k columns in its generator matrix is linearly independent. Reminder. Maximum distance separable code is a code that achieves the Singleton bound with equality. Solution. Consider dual code C ⊥ [n, n − k, d⊥ ]. We know already that a code is MDS if and only if its dual is MDS. Therefore C ⊥ is MDS. In other words, d⊥ = n − (n − k) + 1 = k + 1. We know that code C ⊥ has a minimum distance d⊥ if and only if any set of up to d⊥ − 1 columns in its parity-check matrix are linearly independent1 . But its parity-check matrix is exactly a generator matrix of original code C. The last point to note is that “every set of k columns is linearly independent” and “every set of up to k columns is linearly independent” are equivalent. Indeed, if we take k linearly independent columns and remove some of them, the rest will be still linearly independent. 2. Show that the minimum distance of a perfect code must be odd. Reminder. Perfect code is a code that achieves the sphere-packing bound with equality. Solution. Assume the opposite, i.e. that there exists a perfect [n, k, d] code over F with even minimum distance d = 2t for some t ∈ N. Since the code is perfect, the whole space F is perfectly split into spheres of radius b d−1 2 c = b 2t−1 c = t−1 with centres in codewords of the code. Consider some codeword c. Let us make 2 changes at some t coordinates in c and call the obtained vector u. Obviously d(u, c) = t. On the one hand, u is not a codeword, because every two codewords in the code are at the distance of at least d and d = 2t > t. On the other hand, u is far enough from c so that it does not belong anymore to a sphere of radius t − 1 with a centre at c, i.e. u ∈ / St−1 (c). But again, since the code is perfect, u should belong to some sphere, say, with a center at c0 , i.e. u ∈ St−1 (c0 ) and therefore d(u, c0 ) ≤ t − 1. But using triangle inequality we obtain: d(c, c0 ) ≤ d(c, u) + d(u, c0 ) = t + d(u, c0 ) ≤ t + (t − 1) = 2t − 1 = d − 1 < d. 1 And d⊥ − 1 = k. So we get the contradiction, that two codewords are at the distance less then minimum distance. This contradiction proves the statement of the problem. 3. The soccer betting form contains a list of 13 games. There are three possible outcomes for each game: “the first team won”, “the second team won” and “draw”. Each betting form allows to chose one outcome for each game. In order to win a big prize, it is required to guess correctly the results of at least 12 games. What is the minimum number of forms Alex has to fill in to ensure that he wins a big prize? Justify your answer. Hint. There exists a perfect Hamming code with parameters [13, 10, 3] over F3 . Solution. Every filled in betting form could be viewed as a vector in F13 3 (say, 1 denotes “the first team won”, 2 denotes “the second team won” and 0 denotes “draw”). The outcome of all games is also a vector in F13 3 with the same notation. In these terms winning a big prize means that the filled in form is at a distance not more than 1 from the outcome of all games. Assume that optimal set of filled in forms is c1 , c2 , . . . , cM . We can see this set of vectors as a code (not linear in general case). Then the requirement is that spheres of radius 1 with 13 the centres at codewords should cover the whole space: ∪M i=1 S1 (ci ) = F3 . Every such sphere contains exactly 1 X 13 i 3 = 27 i i=0 vectors. Therefore the size of the code is lower-bounded: M≥ |F13 313 3 | = = 310 . |S1 (ci )| 27 Existing of perfect [13, 10, 3] code means that there exists a code which achieves this bound with equality, i.e. M = 310 is a minimum possible number of forms to fill in. 4. Let HGRS be a parity-check matrix of the [5, 3, 3] GRS code C over F7 given by 1 1 1 1 1 HGRS = 1 2 3 4 5 Find a generator matrix GGRS of C in the canonical form, i.e. v1 v2 ... vn v1 α1 v2 α2 . . . vn αn GGRS = .. .. .. .. . . . . . k−1 k−1 v1 α1 v2 α2 . . . vn αnk−1 Conclude that dual code C ⊥ is also GRS. Hint. It can be helpful to note that dual code of GRS code can be described with the same code locators as the original code but perhaps different column multipliers. 2 Solution. A generator matrix GGRS should have a size 3 × 5. Also we use same code locators, which are α1 = 1, α2 = 2, α3 = 3, α4 = 4 and α5 = 5 looking for a matrix of the following form: v1 v2 v3 v4 v5 v1 v2 v3 v4 F7 GGRS = 1v1 2v2 3v3 4v4 5v5 = v1 2v2 3v3 4v4 12 v1 22 v2 32 v3 42 v4 52 v5 v1 4v2 2v3 2v4 To find values of v1 , v2 , . . . , v5 we need in the following matrix equation: v1 + v2 + v3 + v4 + v5 v1 + 2v2 + 3v3 + 4v4 + 5v5 v1 + 4v2 + 2v3 + 2v4 + 4v5 the hint, i.e. the Therefore we are v5 5v5 . 4v5 | to solve the system GGRS HGRS = O3×2 . This results v1 + 2v2 + 3v3 + 4v4 + 5v5 0 0 v1 + 4v2 + 2v3 + 2v4 + 4v5 = 0 0 . v1 + v2 + 6v3 + 1v4 + 6v5 0 0 In other words, we need to solve the following system of linear equations over F7 : v1 + v2 + v3 + v4 + v5 = 0 , v 1 + 2v2 + 3v3 + 4v4 + 5v5 = 0 , v1 + 2v2 + 3v3 + 4v4 + 5v5 = 0 , v 1 + 4v2 + 2v3 + 2v4 + 4v5 = 0 , v1 + 4v2 + 2v3 + 2v4 + 4v5 = 0 , v1 + v2 + 6v3 + 1v4 + 6v5 = 0 . General solution of this system has a form v1 = a, v2 = 3a, v3 = 6a, v4 = 3a, v5 = a, where a is any constant in F7 . To obtain particular solution we need to choose any particular value of a. Note also, that we need that none of v1 , v2 , . . . , v5 should equal 0 (requirement for column multipliers). For example, we can set a = 1 and then the solution is v1 = 1, v2 = 3, v3 = 6, v4 = 3, v5 = 1. Also note that we don’t need to check that the resulting matrix has a full rank. Different code locators and non-zero column multipliers guarantees that. Therefore one of the possible generator matrices 1 3 GGRS = 1 6 1 5 is as follows: 6 3 1 4 5 5 . 5 6 4 This matrix is in turn a parity-check matrix of dual code C ⊥ which proves that C ⊥ is indeed GRS. 5. Let CGRS be a [n, k] GRS code2 over F with code locators α1 , α2 , . . . , αn and column multipliers v1 , v2 , . . . , vn . 2 Since the minimum distance is not important in this problem, we omit it here. 3 (a) Fix µ, ν and η to be elements of F where µ, η 6= 0. Show that CGRS is identical to the 0 [n, k] GRS code CGRS over F defined by the code locators αj0 = µαj + ν , j = 1, 2, . . . , n, and column multipliers vj0 = ηvj , j = 1, 2, . . . , n. 0 Hint. Show that each row in a canonical parity-check matrix of CGRS can be written as a linear combination of some rows in a canonical parity-check matrix of CGRS . Solution. Denote by G = (gij ) a canonical generator matrix of original code CGRS and 0 ) a canonical generator matrix of C 0 by G0 = (gij GRS . Then we have 0 gij = vj0 (a0j )i−1 = ηvj (µαj + ν)i−1 . gij = vj ai−1 , j 0 : Let us expand the expression for gij 0 gij = vj0 (a0j )i−1 i−1 = ηvj (µαj + ν) = ηvj i−1 X i−1 (µαj )l ν i−1−l l ! l=0 k i i−1 X X X i−1 i−1 l l i−1−l ail glj , (µl−1 ην i−l )(vj αjl−1 ) = µ αj ηvj ν = = l−1 l l=1 l=1 l=0 where ( ail = i−1 l−1 0, (µl−1 ην i−l ) , 1 ≤ l ≤ i , i+1 ≤ l ≤ k. Therefore in matrix form we have G0 = AG, where A = (aij ) is k × k square matrix in lower-triangular form and its determinant equals to product of elements on main diagonal. More precise, k k Y Y det A = aii = µi−1 η 6= 0 . i=1 i=1 Hence A has full rank, i.e. k. This means that rows of G0 form a basis which is equivalent to the basis formed by rows of G. In other words, both G and G0 generate the same subspace, i.e. the same linear code. (b) Show that CGRS is identical to an [n, k] GRS code over F with code locators α1−1 , α2−1 , . . . , αn−1 (and with properly selected column multipliers). Solution. So we have αj0 = αj−1 . will be v1 α1k−1 v2 α2k−1 v αk−1 α−1 v2 α2k−1 α2−1 1 1 1 v2 α2k−1 α2−2 v1 α1k−1 α1−2 .. .. . . v1 α1k−1 α1−k+2 v2 α2k−1 α2−k+2 v1 α1k−1 α1−k+1 v2 α2k−1 α2−k+1 Let us set vj0 = vj αjk−1 . Then the new generator matrix vn αnk−1 vn αnk−1 αn−1 vn αnk−1 αn−2 .. . v1 α1k−1 v2 α2k−1 v1 α1k−2 v2 α2k−2 v1 α1k−3 v2 α2k−3 = . .. . . . . . . vn αnk−1 αn−k+2 v1 α1 v2 α2 v1 v2 . . . vn αnk−1 αn−k+1 ... ... ... .. . 4 . . . vn αnk−1 . . . vn αnk−2 . . . vn αnk−3 . .. .. . . . . . vn αn ... vn This matrix is just the same as the original one, but with rows in reverse order. This obviously does not change the code. (c) Let µ, ν, σ, and τ be elements of F such that µτ 6= σν. Based on parts (a) and (b), show that CGRS is identical to an [n, k] GRS code over F with code locators αj0 = µαj + ν , σαj + τ j = 1, 2, . . . , n , and with properly selected column multipliers. Solution. First, we note that (σαj + τ )σ −1 µ + ν − µσ −1 τ µαj + ν = σαj + τ σαj + τ 1 = (ν − µσ −1 τ ) · + σ −1 µ = A(σαj + τ )−1 + B , σαj + τ αj0 = where A = ν − µσ −1 τ 6= 0 and B = σ −1 µ are constants. Then we can do the following sequence of transformations of code locators which preserve the code: (1) = σαj + τ (according to 5(a)). (2) αj = (αj )−1 (according to 5(b)). • αj • (1) (2) • αj0 = Aαj + B (according to 5(a)). So we get αj0 which is the same as in the problem description and we did it by using only code-preserving transformations of code locators. Therefore final code is identical to the original one. 5
© Copyright 2024