This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
 Algebra Packages Mathematica provides many functions for working with polynomials, and the standard add-on Algebra packages extend that capability. There are functions for solving polynomial inequalities, counting and isolating roots of polynomials, and representing polynomials in terms of symmetric and remainder parts. The Algebra packages define PolynomialExtendedGCD and PolynomialPowerMod, adjuncts to the built-in functions PolynomialGCD and PolynomialMod. This group of packages also provides functions for manipulating quaternions and elements of Galois fields. This initializes the Algebra packages. In[1]:= <True, ScaleFactor->.5] The FiniteFields package can be used to explore error-correcting codes for digital transmission and storage, and other applications of Galois sequences. For example, the Simplex Code based on , a finite field of order , has efficiency and detects errors per codeword of length . This gives the Galois sequence for . In[8]:= sequence = First[Transpose[PowerList[GF[2, 4]]]] Out[8]= This depicts the 15 codewords, each composed of four information bits and 11 check bits. Binary ones appear as white squares and binary zeros appear as black squares. In[9]:= (codewords = Table[RotateRight[sequence, n], {n, 0, 14}];ListDensityPlot[codewords, FrameTicks -> {{4, 15}, Range[15]}]) Here are the codewords after transmission through a channel that "flips" each bit with a probability of 0.25. Bits that differ from the original codewords are shaded gray. In[10]:= (received = Map[If[Random[] < .25, Mod[#+1, 2], #]&, codewords, {2}];delta = Abs[received-codewords];ListDensityPlot[Table[If[delta[[i, j]] == 1, .5, codewords[[i, j]] ], {i, 15}, {j, 15}], FrameTicks -> {{4, 15}, Range[15]}]) Decoding is accomplished by correlating each received word with the original sequence and finding the position of the peak. In[11]:= decode[x_] := Module[{corr}, corr = Table[Apply[Plus, (1-2 sequence) * RotateLeft[1-2 x, n]], {n, 0, 14}]; codewords[[ Position[corr, Max[corr]][[1, 1]] ]] ] Three received words were incorrectly decoded. Two words had four bits in error and one had six bits in error. In[12]:= (corrected = Map[decode, received];delta = Abs[corrected-codewords];ListDensityPlot[Table[If[delta[[i, j]] == 1, .5, codewords[[i, j]] ], {i, 15}, {j, 15}], FrameTicks -> {{4, 15}, Range[15]}])