Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
gmcninch-tufts
GitHub Repository: gmcninch-tufts/2024-Sp-Math190
Path: blob/main/course-assignments/PS04--ECC--solutions.md
906 views
---
title: | ProblemSet 4 -- Finite field projective spaces **Solutions** author: George McNinch date: 2024-02-23
---

\newcommand{\F}{\mathbb{F}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\NN}{\mathbb{N}} \newcommand{\CC}{\mathbb{C}} \newcommand{\ee}{\mathbf{e}} \newcommand{\h}{\mathbf{h}} \newcommand{\bb}{\mathbf{b}} \newcommand{\vv}{\mathbf{v}} \newcommand{\xx}{\mathbf{x}}

\newcommand{\uu}{\mathbf{u}} \newcommand{\ww}{\mathbf{w}}

\newcommand{\Null}{\operatorname{Null}} \newcommand{\Hom}{\operatorname{Hom}}

\newcommand{\weight}{\operatorname{weight}}

\newcommand{\PP}{\mathbb{P}} \newcommand{\dist}{\operatorname{dist}} \newcommand{\floor}[1]{\lfloor #1 \rfloor}

\newcommand{\tr}{\operatorname{tr}}

\newcommand{\trivial}{\mathbf{1}}

\newcommand{\GL}{\operatorname{GL}}

  1. Find the irreducible factors of the polynomial T91T^9 - 1 in ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_7[T].

    (You should include proofs that the factors you describe are irreducible).

    ::: {.solution}

    Note that the multiplicative group ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_7^\times has order 6 and hence contains an element of order 3; in fact, 22 has order 3 since 23=81(mod7)2^3 = 8 \equiv 1 \pmod{7}.

    Now, ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_{7^2}^\times has order 491=4849 - 1 = 48 which is not divisible by 9. And ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_{7^3}^\times has order 731(2)3190(mod9)7^3 - 1 \equiv (-2)^3 - 1 \equiv -9 \equiv 0 \pmod{9}. So ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_{7^3}^\times has an element of order 99.

    Consider the polynomial T32T^3 - 2. Any root α\alpha of this polynomial satisfies α3=2\alpha^3 = 2 and α9=1\alpha^9 = 1; this shows that the multiplicative order of α\alpha is 9.

    In particular, ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_7 contains no roots of f(T)=T32f(T) = T^3 -2; since f(T)f(T) has degree 3, it is irreducible over ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_7.

    If α\alpha is a root of f(T)f(T), then α7\alpha^7 and α72=α4\alpha^{7^2} = \alpha^4 are also roots (note that 72(2)2=4(mod9)7^2 \equiv (-2)^2 = 4 \pmod{9}). Thus f(T)=(Tα)(Tα7)(Tα4)f(T) = (T-\alpha)(T-\alpha^7)(T-\alpha^4) and f(T)T91.f(T) \mid T^9 -1.

    Notice that ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_{7^3} is a splitting field for f(T)f(T) over ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_7.

    Note that 22=42^2 = 4 is also an element of ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_7^\times of order 33. Arguing as before, any root of T34T^3 - 4 is an element of multiplicative order 99.

    On the other hand, since gcd(2,9)=1\gcd(2,9)=1, ParseError: KaTeX parse error: Undefined control sequence: \F at position 14: \alpha^2 \in \̲F̲_{7^3} is also an element of order 9.

    Moreover, the roots of its minimal polynomial g(T)g(T) have the form α2\alpha^2, α27=α5\alpha^{2 \cdot 7} = \alpha^5 (since 145(mod9)14 \equiv 5 \pmod 9), and α272=α57=α3\alpha^{2 \cdot 7^2} = \alpha^{5 \cdot 7} = \alpha^3 (since 2728(mod9)2 \cdot 7^2 \equiv 8 \pmod{9}.

    Thus g(T)=(Tα2)(Tα5)(Tα8).g(T) = (T - \alpha^2)(T-\alpha^5)(T-\alpha^8).

    Now, notice that ParseError: KaTeX parse error: Undefined control sequence: \F at position 43: … = 2^2 = 4 \in \̲F̲_7. Thus the minimal polynomial g(T)g(T) of α2\alpha^2 divides T34T^3 - 4. It follows that g(T)=T34=(Tα2)(Tα5)(Tα8).g(T) = T^3 - 4 = (T - \alpha^2)(T-\alpha^5)(T-\alpha^8).

    Now, g(T)T91g(T) \mid T^9 - 1 and since gcd(f(T),g(T))=1\gcd(f(T),g(T)) =1 we see that f(T)g(T)T91f(T) g(T) \mid T^9 -1. Thus T91=f(T)g(T)(T1)(T2)(T4).T^9 -1 = f(T) \cdot g(T) \cdot (T-1) \cdot (T-2) \cdot (T-4). :::

  2. Let 0<k,mN0 < k,m \in \mathbb{N}, put n=mkn =mk, and consider the subspace ParseError: KaTeX parse error: Undefined control sequence: \F at position 11: C \subset \̲F̲_q^n defined by ParseError: KaTeX parse error: Undefined control sequence: \F at position 35: …v ) \mid v \in \̲F̲_q^k\} \subset … Find the minimal distance dd of this code.

    For example, if n=6n = 6, k=3k=3 and m=2m = 2 then ParseError: KaTeX parse error: Undefined control sequence: \F at position 46: …) \mid a_i \in \̲F̲_q\} \subset \F…

    (Corrected)

    ::: {.solution}

    If ParseError: KaTeX parse error: Undefined control sequence: \vv at position 1: \̲v̲v̲ ̲= (v,v,\cdots,v… for ParseError: KaTeX parse error: Undefined control sequence: \F at position 7: v \in \̲F̲_q^n, note that ParseError: KaTeX parse error: Undefined control sequence: \weight at position 1: \̲w̲e̲i̲g̲h̲t̲(\vv) = m \cdot….

    In particular, for a non-zero vector we see that ParseError: KaTeX parse error: Undefined control sequence: \weight at position 1: \̲w̲e̲i̲g̲h̲t̲(\vv) \ge m.

    On the other hand, a standard basis vector ParseError: KaTeX parse error: Undefined control sequence: \ee at position 5: v = \̲e̲e̲_i \in \F_q^n has weight 1, so if ParseError: KaTeX parse error: Undefined control sequence: \ww at position 1: \̲w̲w̲ ̲= (\ee_i,\ee_i,…, then ParseError: KaTeX parse error: Undefined control sequence: \weight at position 1: \̲w̲e̲i̲g̲h̲t̲(\ww) = m.

    Thus ParseError: KaTeX parse error: Undefined control sequence: \weight at position 9: \min \{ \̲w̲e̲i̲g̲h̲t̲(\vv) \mid 0 \…

    For a linear code, the minimal distance is simply the minimal weight of a non-zero vector; thus the minimal distance of CC is mm. :::

  3. By an [n,k,d]q[n,k,d]_q-system we mean a pair (V,P)(V,\mathcal{P}), where VV is a finite dimensional vector space over ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_q and P\mathcal{P} is an ordered finite family P=(P1,P2,,Pn)\mathcal{P} = (P_1,P_2,\cdots,P_n) of points in VV (in general, points of P\mathcal{P} need not be distinct -- you should view P\mathcal{P} as a list of points which may contain repetitions) such that P\mathcal{P} spans VV as a vector space. Evidently PdimV|\mathcal{P}| \ge \dim V.

    The parameters [n,k,d][n,k,d] are defined by n=P,k=dimV,d=nmaxHPH.n = |\mathcal{P}|, \quad k = \dim V, \quad d = n - \max_H |\mathcal{P} \cap H|. where the maximum defining dd is taken over all linear hyperplanes HVH \subset V and where points are counted with their multiplicity -- i.e. PH={iPiH}|\mathcal{P} \cap H| = |\{i \mid P_i \in H \}|.

    Gjven a [n,k,d]q[n,k,d]_q-system (V,P)(V,\mathcal{P}), let VV^* denote the dual space to VV and consider the linear mapping ParseError: KaTeX parse error: Undefined control sequence: \F at position 14: \Phi:V^* \to \̲F̲_q^n defined by Φ(ψ)=(ψ(P1),,ψ(Pn)).\Phi(\psi) = (\psi(P_1),\cdots,\psi(P_n)).

    a. Show that Φ\Phi is injective.

    ::: {.solution}

    Φ\Phi is a linear mapping, so we just need to show that kerΦ={0}\ker \Phi = \{0\}.

    Suppose that ψV\psi \in V^* and Φ(ψ)=0\Phi(\psi) = 0. This means that ψ(Pj)=0\psi(P_j) = 0 for 1jn1 \le j \le n. Since ψ\psi is linear, it follows that ψ\psi vanishes at any linear combination of the vectors {Pj}\{P_j\}.

    Since P\mathcal{P} spans VV by assumption, it follows that ψ=0\psi = 0. This proves that Φ\Phi is injective.

    :::

    b. Write C=Φ(V)C = \Phi(V^*) for the image of Φ\Phi, so that CC is an [n,k]q[n,k]_q-code. Show that the minimal distance of the code CC is given by dd.

    ::: {.solution}

    Write dd' for the minimal weight of CC; we must argue that d=d=nmaxHPH.d'=d = n - \max_H |\mathcal{P} \cap H|.

    Let ParseError: KaTeX parse error: Undefined control sequence: \vv at position 1: \̲v̲v̲ ̲= \Phi(\psi) \i… be a non-zero vector. We have ParseError: KaTeX parse error: Undefined control sequence: \weight at position 1: \̲w̲e̲i̲g̲h̲t̲(\vv) = |\{j \m…

    Write H=kerψH = \ker \psi and note that PH={jψ(Pj)=0}.|\mathcal{P} \cap H| = |\{j \mid \psi(P_j) = 0\}|.

    Thus ParseError: KaTeX parse error: Undefined control sequence: \weight at position 11: (*) \quad \̲w̲e̲i̲g̲h̲t̲(\vv) = n - |\m…

    In maxHPH\max_H |\mathcal{P} \cap H| the hyperplanes HH are precisely the kernels H=kerψH = \ker \psi of functionals 0ψV0 \ne \psi \in V^*. Thus ()(*) shows that ParseError: KaTeX parse error: Undefined control sequence: \vv at position 7: \min_{\̲v̲v̲ ̲= \Phi(\psi) \n… it follows that d=dd' =d. :::

    c. Conversely, let ParseError: KaTeX parse error: Undefined control sequence: \F at position 11: C \subset \̲F̲_q^n be an [n,k,d]q[n,k,d]_q-code, and put V=CV = C^*. Let ParseError: KaTeX parse error: Undefined control sequence: \F at position 21: …cdots,e^n \in (\̲F̲_q^n)^* be the dual basis to the standard basis. The restriction of eie^i to the subspace CC determines an element PiP_i of C=VC^* = V. Write P=(P1,P2,,Pn)\mathcal{P} = (P_1,P_2,\cdots,P_n) for the resulting list of vectors in VV..

    Prove that the minimum distance dd of the code CC satisfies d=nmaxHPH.d = n - \max_H | \mathcal{P} \cap H |.

    ::: {.solution}

    We have V=(C)=CV^* = (C^*)^* = C; the mapping ParseError: KaTeX parse error: Undefined control sequence: \F at position 23: …V^* = C \to \̲F̲_q^n is just the given inclusion. Indeed, let ParseError: KaTeX parse error: Undefined control sequence: \F at position 43: … \in C \subset \̲F̲_q^n. The mapping ParseError: KaTeX parse error: Undefined control sequence: \F at position 14: \Phi:V^* \to \̲F̲_q^n is given by Φ(x)=(e1(x),,en(x))=(x1,,xn).\Phi(x) = (e^1(x),\cdots,e^n(x)) = (x_1,\dots,x_n).

    Now the equality d=nmaxHPHd = n - \max_H | \mathcal{P} \cap H | follows from the result of part (b). :::

  4. Let CC be the linear code over ParseError: KaTeX parse error: Undefined control sequence: \F at position 1: \̲F̲_5 generated by the matrix G=(100112010121001211).G = \begin{pmatrix} 1 & 0 & 0 & 1 & 1 & 2 \\ 0 & 1 & 0 & 1 & 2 & 1 \\ 0 & 0 & 1 & 2 & 1 & 1 \end{pmatrix}.

    a. Find a check matrix HH for CC.

    ::: {.solution}

    k = GF(5) V = VectorSpace(k,6) C =V.subspace([ V([1,0,0,1,1,2]), V([0,1,0,1,2,1]), V([0,0,1,2,1,1])]) # generator matrix, in standard form G = MatrixSpace(k,3,6).matrix(C.basis()) G => [1 0 0 1 1 2] [0 1 0 1 2 1] [0 0 1 2 1 1] A = MatrixSpace(k,3,3).matrix([b[3:6] for b in G]) # construct the check matrix, as a block matrix H = block_matrix([[-A.transpose(), MatrixSpace(k,3,3).one()]], subdivide=False) H => [4 4 3 1 0 0] [4 3 4 0 1 0] [3 4 4 0 0 1] ## verification: H * G.T => [0 0 0] [0 0 0] [0 0 0]

    :::

    b. Find the minimum distance of CC.

    ::: {.solution}

    The minimal distance of CC is 4.

    We check the weight of a vector using the following function:

    def weight(v): r = [x for x in v if x != 0] return len(r)

    Now, we can just find the minimal weight of the non-zero vectors of VV, as follows:

    min([ weight(v) for v in C if v != 0]) => 4

    Alternatively, you can investigate the columns of the check matrix HH.

    W = VectorSpace(k,3) # column space # return the ith column of the 3xm matrix M def col(M,i): return W([ b[i] for b in M ]) # check whether the columns of the 3xm matrix M # specified by the list ll of indices are lin indep def cols_lin_indep(M,ll): vecs = [ col(M,i) for i in ll ] # the method `linear_dependence` returns a list # of *linear relations* # so we return True if `W.linear_dependence(vecs)` is # the empty list return W.linear_dependence(vecs) == [] # check whether all collections of r columns of the # 3xm matrix M are linearly independent def check(M,r): # get the number of columns of M. l = len(list(M.T)) # get all lists of r-element subses of the numbers 0,...,l-1 al = map(list,Subsets(range(l),r)) # return True iff `cols_lin_indep(M,ll)` is true for every # r-element subset ll of range(l) return all([ cols_lin_indep(M,ll) for ll in al]) check(H,3) => True check(H,4) => False

    This shows that every collection of 3 columns of H is linearly independent, while there is some collection of 4 columns of H that is linearly dependent; thus d=4d = 4.

    :::

    c. Decode the received vectors (0,2,3,4,3,2)(0,2,3,4,3,2) and (0,1,2,0,4,0)(0,1,2,0,4,0) using syndrome decoding.

    ::: {.solution}

    The minimal distance of the code CC is 44, so we should expect to correct ParseError: KaTeX parse error: Undefined control sequence: \floor at position 1: \̲f̲l̲o̲o̲r̲{(4-1)/2} = \fl… error.

    We first make the lookup table

    lookup = { tuple(H*v):v for v in V if weight(v) <= 1 } lookup => {(0, 0, 0): (0, 0, 0, 0, 0, 0), (4, 4, 3): (1, 0, 0, 0, 0, 0), (3, 3, 1): (2, 0, 0, 0, 0, 0), (2, 2, 4): (3, 0, 0, 0, 0, 0), (1, 1, 2): (4, 0, 0, 0, 0, 0), (4, 3, 4): (0, 1, 0, 0, 0, 0), (3, 1, 3): (0, 2, 0, 0, 0, 0), (2, 4, 2): (0, 3, 0, 0, 0, 0), (1, 2, 1): (0, 4, 0, 0, 0, 0), (3, 4, 4): (0, 0, 1, 0, 0, 0), (1, 3, 3): (0, 0, 2, 0, 0, 0), (4, 2, 2): (0, 0, 3, 0, 0, 0), (2, 1, 1): (0, 0, 4, 0, 0, 0), (1, 0, 0): (0, 0, 0, 1, 0, 0), (2, 0, 0): (0, 0, 0, 2, 0, 0), (3, 0, 0): (0, 0, 0, 3, 0, 0), (4, 0, 0): (0, 0, 0, 4, 0, 0), (0, 1, 0): (0, 0, 0, 0, 1, 0), (0, 2, 0): (0, 0, 0, 0, 2, 0), (0, 3, 0): (0, 0, 0, 0, 3, 0), (0, 4, 0): (0, 0, 0, 0, 4, 0), (0, 0, 1): (0, 0, 0, 0, 0, 1), (0, 0, 2): (0, 0, 0, 0, 0, 2), (0, 0, 3): (0, 0, 0, 0, 0, 3), (0, 0, 4): (0, 0, 0, 0, 0, 4)}

    Now we can decode using the lookup table

    def decode(v): return v-lookup[tuple(H*v)] [ (decode(v), decode(v) in C) for v in [ V([0,2,3,4,3,2]), V([0,1,2,0,4,0])]] => [((1, 2, 3, 4, 3, 2), True), ((0, 1, 2, 0, 4, 3), True)]

    :::