|
|
Let C be a code over a finite ring R of cardinality q, and suppose
that the elements of R are ordered in some way. Then for a codeword
v ∈C and the i-th element a ∈R, let
si(v) denote the number of components of v equal to a.
This function returns the complete weight enumerator
(W)C(X0, X1, ..., Xq - 1) of C,
which is defined by:
(W)C(X0, X1, ..., Xq - 1) =
∑v ∈C((X0)s0(v)(X1)s1(v) ... (Xq - 1)sq - 1(v)).
See [Wan97, p. 9] for more information.
The result will lie in a global multivariate polynomial ring over Z
with q variables. The angle-bracket notation may be used to assign
names to the indeterminates.
Suppose C is a Z4-code.
This function returns the symmetric weight enumerator
sweC(X0, X1, X2) of C,
which is defined by:
sweC(X0, X1, X2) = (W)C(X0, X1, X2, X1),
where (W)C is the complete weight enumerator, defined above.
See [Wan97, p. 14] for more information.
The result will lie in a global multivariate polynomial ring over Z
with three variables. The angle-bracket notation may be used to assign
names to the indeterminates.
HammingWeightEnumerator(C): Code -> RngMPolElt
Suppose C is a code over some finite ring R.
This function returns the Hamming weight enumerator
HamC(X, Y) of C,
which is defined by:
HamC(X, Y) = ∑v ∈C(Xn - wH(v)YwH(v)),
where wH(v) is the Hamming weight function.
The result will lie in a global multivariate polynomial ring over Z
with two variables. The angle-bracket notation may be used to assign
names to the indeterminates.
Suppose C is a Z4-code.
This function returns the Lee weight enumerator
LeeC(X, Y) of C,
which is defined by:
LeeC(X, Y) = ∑v ∈C(X2 * n - wL(v)YwL(v)),
where wL(v) is the Lee weight function, defined in
Section Lee Weight.
The result will lie in a global multivariate polynomial ring over Z
with two variables. The angle-bracket notation may be used to assign
names to the indeterminates.
Suppose C is a Z4-code.
This function returns the Euclidean weight enumerator
EuclideanC(X, Y) of C,
which is defined by:
EuclideanC(X, Y) = ∑v ∈C(X4 * n - wE(v)YwE(v)),
where wE(v) is the Euclidean weight function, defined in
Section Euclidean Weight.
The result will lie in a global multivariate polynomial ring over Z
with two variables. The angle-bracket notation may be used to assign
names to the indeterminates.
Several different weight enumerators are calculated for the octacode.
To ensure the polynomials print out nicely, names are assigned to the
polynomial ring indeterminates in each case. These names will persist
if further calls to these functions (over Z 4) are made.
> Z4 := IntegerRing(4);
> O8 := LinearCode<Z4, 8 |
> [1,0,0,0,3,1,2,1],
> [0,1,0,0,1,2,3,1],
> [0,0,1,0,3,3,3,2],
> [0,0,0,1,2,3,1,1]>;
> #O8;
256
> CWE<X0,X1,X2,X3> := CompleteWeightEnumerator(O8);
> CWE;
X0^8 + 14*X0^4*X2^4 + 56*X0^3*X1^3*X2*X3 + 56*X0^3*X1*X2*X3^3 +
56*X0*X1^3*X2^3*X3 + 56*X0*X1*X2^3*X3^3 + X1^8 + 14*X1^4*X3^4 +
X2^8 + X3^8
> SWE<X0,X1,X2> := SymmetricWeightEnumerator(O8);
> SWE;
X0^8 + 14*X0^4*X2^4 + 112*X0^3*X1^4*X2 + 112*X0*X1^4*X2^3 + 16*X1^8 +
X2^8
> HWE<X,Y> := HammingWeightEnumerator(O8);
> HWE;
X^8 + 14*X^4*Y^4 + 112*X^3*Y^5 + 112*X*Y^7 + 17*Y^8
> LeeWeightEnumerator(O8);
X^16 + 112*X^10*Y^6 + 30*X^8*Y^8 + 112*X^6*Y^10 + Y^16
> EuclideanWeightEnumerator(O8);
X^32 + 128*X^24*Y^8 + 126*X^16*Y^16 + Y^32
[Next][Prev] [Right] [Left] [Up] [Index] [Root]
|
|