Last active
June 2, 2016 16:23
-
-
Save artemjackson/3f072f1e3955687ba7815cc20963c52e to your computer and use it in GitHub Desktop.
Hemming Matrix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Needs["FiniteFields`"]; | |
MultiplicativeGroupOfPolynomial[p_, g_, l_] := | |
Block[{polynomial = p, generating = g, limit = l}, | |
DeleteDuplicates@NestList[PolynomialMod[(generating*#), {polynomial, 2}] &, 1, limit] | |
]; | |
BinaryForm[p_, d_] := | |
Block[{polynomial = p, dimension = d}, | |
Reverse@CoefficientList[polynomial, \[Alpha], dimension] | |
]; | |
HemmingMatrix[n_, m_] := | |
Block[{irreducablePolynomial, generating}, | |
irreducablePolynomial = IrreduciblePolynomial[\[Alpha], 2, m]; | |
generating = PolynomialMod[\[Alpha]^((2^m - 1)/n), {irreducablePolynomial, 2}]; | |
Transpose[BinaryForm[#, m] & /@ MultiplicativeGroupOfPolynomial[irreducablePolynomial, generating, n]] | |
]; | |
HemmingMatrix[103, 51] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment