#OKtoPost #1: Read CH 5 #2: Human Exercises 5.1, 5.2, 5.3, 5.5 #5.1: This is not a binary linear code, because there is no k such #that 2^k=24. #5.2:Take the matrix composed of all the standard basis vectors of #length n-1 and add a column of 1s to the right side of the matrix. #This is a generator matrix and is also conveniently in standard form. #5.3:We simply need to show that C is a subspace of V(n,q). That is, #we show closure under vector addition and scalar multiplication. If #x,y are in C, then xH^T=0 and yH^T=0, so (x+y)H^T=xH^T+y^T=0+0=0. If #x is in C and a is a scalar, then axH^T=a(0)=0. We thus achieve the #desired result. #5.5: Suppose C is a binary linear code. Call E the set of even-weight #elements and O the set of odd-weight elements. Let v be a particular #odd-weight element. Then E+v is a set of odd-weight elements, so O is #at least as big as E. Likewise, O+v is a set of even-weight elements, #so E is at least as big as O. We conclude that if there are any odd-#weight elements in C, there are equally as many odd-weight elements #as even-weight elements. #3: SearchLC(q,n,k,K): inputs q and n for GF(q)^n and k (for the #dimension of the linear code, a certain subspace of GF(q)^n) and a #very large positive integer K (say 1000) and keeps generationg, K #times, random lists, M, of k members of GF(q)^n, for each determines #MinW(q,M) and outputs the one with the largest minimum weight. #Run it, with K=1000 for q=2,3,5 ; 4 ≤ n ≤ 10 ; ; and 3 ≤ k ≤ 5 RV:=proc(q,n) local ra,i: ra:=rand(0..q-1): [seq( ra(), i=1..n)]: end: HD:=proc(u,v) local i,co: co:=0: for i from 1 to nops(u) do if u[i]<>v[i] then co:=co+1: fi: od: co: end: LtoC:=proc(q,M) local n,k,C,c,i,M1: option remember: k:=nops(M): n:=nops(M[1]): if k=1 then RETURN({seq(i*M[1] mod q,i=0..q-1) }): fi: M1:=M[1..k-1]: C:=LtoC(q,M1): {seq(seq(c+i*M[k] mod q,i=0..q-1),c in C)}: end: #MinW(q,M): The minimal weight of the Linear code generated by M over GF(q) MinW:=proc(q,M) local n,C,c: n:=nops(M[1]): C:=LtoC(q,M): min( seq(HD(c,[0$n]), c in C minus {[0$n]} )): end: #-- SearchLC:=proc(q,n,k,K) local minn, largestmin, bigMinM, i, M, j: largestmin:=0; for i from 1 to K do: M := {seq(RV(q,n), j = 1..k)}; minn:=MinW(q,M); if minn>largestmin then largestmin:=minn; bigMinM:=M; fi: od: print(bigMinM); end: for n from 4 to 10 do: for k from 3 to 5 do: SearchLC(2,n,k,1000); SearchLC(3,n,k,1000); SearchLC(5,n,k,1000); od: od: