Macaulay2 » Documentation
Packages » CodingTheory > EvaluationCode > evaluationCode > orderCode
next | previous | forward | backward | up | index | toc

orderCode -- computes an order code for a given weight

Synopsis

Description

Let F be a finite field and F$[t_1,\ldots,t_m]$ a polynomial ring with a weight order defined by the list v of size $m$. For P$=\{P_1,\ldots,P_n\}\subset$F$^m$, the order code of degree $d$ is the F-vector space generated by the vectors $(f(P_1),\ldots,f(P_n))$, where $f$ is a monomial of weight at most $d$. We describe ways to obtain an order code below.

a list of points and the weight vector are given

The order code $C$ of degree d over the points of P using the weight vector v.

i1 : F = GF(4);
i2 : P = {{0, 0}, {a, a}, {a+1, a}, {1, a}, {a, a+1}, {a+1, a+1}, {1, a+1}, {0, 1}};
i3 : C = orderCode(F,P,{2,3},7);
i4 : peek C

o4 = EvaluationCode{cache => CacheTable{}                                                                                                                                                                                                                                                                                           }
                    Points => {{0, 0}, {a, a}, {a + 1, a}, {1, a}, {a, a + 1}, {a + 1, a + 1}, {1, a + 1}, {0, 1}}
                                                               8
                    LinearCode => LinearCode{AmbientModule => F                                                                                                                                                                                                                                                                    }
                                             BaseField => F
                                             cache => CacheTable{}
                                             Code => image | 1 0   0   0   0 0   0   0   |
                                                           | 1 a+1 1   a   1 a   a+1 a+1 |
                                                           | 1 a   a+1 a   1 a+1 a+1 1   |
                                                           | 1 1   a   a   1 1   a+1 a   |
                                                           | 1 a+1 a   a+1 1 a   a   1   |
                                                           | 1 a   1   a+1 1 a+1 a   a   |
                                                           | 1 1   a+1 a+1 1 1   a   a+1 |
                                                           | 1 0   0   1   0 0   1   0   |
                                             GeneratorMatrix => | 1 1   1   1   1   1   1   1 |
                                                                | 0 a+1 a   1   a+1 a   1   0 |
                                                                | 0 1   a+1 a   a   1   a+1 0 |
                                                                | 0 a   a   a   a+1 a+1 a+1 1 |
                                                                | 0 1   1   1   1   1   1   0 |
                                                                | 0 a   a+1 1   a   a+1 1   0 |
                                                                | 0 a+1 a+1 a+1 a   a   a   1 |
                                                                | 0 a+1 1   a   1   a   a+1 0 |
                                             Generators => {{1, 1, 1, 1, 1, 1, 1, 1}, {0, a + 1, a, 1, a + 1, a, 1, 0}, {0, 1, a + 1, a, a, 1, a + 1, 0}, {0, a, a, a, a + 1, a + 1, a + 1, 1}, {0, 1, 1, 1, 1, 1, 1, 0}, {0, a, a + 1, 1, a, a + 1, 1, 0}, {0, a + 1, a + 1, a + 1, a, a, a, 1}, {0, a + 1, 1, a, 1, a, a + 1, 0}}
                                             ParityCheckMatrix => | 1 1 1 1 1 1 1 1 |
                                             ParityCheckRows => {{1, 1, 1, 1, 1, 1, 1, 1}}
                                                2               3    2        4
                    VanishingIdeal => ideal (t t  + t t  + t , t  + t  + t , t  + t )
                                              0 1    0 1    0   0    1    1   1    1
                                          2   2         3       2
                    PolynomialSet => {1, t , t t , t , t , t , t , t t }
                                          0   0 1   1   0   0   1   0 1

given the ideal of the finite algebra associated to the order function and a list of points

If I is the ideal associated to the semigroup generated by v, this function allows us to improve by knowing a basis defined through I.

i5 : F = GF(4);
i6 : R = F[x,y];
i7 : I = ideal(x^3+y^2+y)

            3    2
o7 = ideal(x  + y  + y)

o7 : Ideal of R
i8 : P = {{0, 0}, {a, a}, {a+1, a}, {1, a}};
i9 : C = orderCode(I,P,{2,3},7);
i10 : peek C

o10 = EvaluationCode{cache => CacheTable{}                                                                                                                                     }
                     Points => {{0, 0}, {a, a}, {a + 1, a}, {1, a}}
                                                                4
                     LinearCode => LinearCode{AmbientModule => F                                                                                                              }
                                              BaseField => F
                                              cache => CacheTable{}
                                              Code => image | 0   0   1 0 0   0 0   |
                                                            | a+1 a   1 1 1   a a+1 |
                                                            | a   a+1 1 1 a+1 a 1   |
                                                            | 1   1   1 1 a   a a   |
                                              GeneratorMatrix => | 0 a+1 a   1 |
                                                                 | 0 a   a+1 1 |
                                                                 | 1 1   1   1 |
                                                                 | 0 1   1   1 |
                                                                 | 0 1   a+1 a |
                                                                 | 0 a   a   a |
                                                                 | 0 a+1 1   a |
                                              Generators => {{0, a + 1, a, 1}, {0, a, a + 1, 1}, {1, 1, 1, 1}, {0, 1, 1, 1}, {0, 1, a + 1, a}, {0, a, a, a}, {0, a + 1, 1, a}}
                                              ParityCheckMatrix => 0
                                              ParityCheckRows => {}
                                               2                       3
                     VanishingIdeal => ideal (t  + a*t , t t  + a*t , t  + (a + 1)t )
                                               1      1   0 1      0   0           1
                                        2          3   2
                     PolynomialSet => {t , t , 1, t , t t , t , t t }
                                        0   0      0   0 1   1   0 1

given just an ideal and the weight vector

The order code of degree d, using the order function defined by v and the set of points the zeroes of I.

i11 : F = GF(4);
i12 : R = F[x,y];
i13 : I = ideal(x^3+y^2+y);

o13 : Ideal of R
i14 : C = orderCode(I,{2,3},7);
i15 : peek C

o15 = EvaluationCode{cache => CacheTable{}                                                                                                                                                                                                                                                     }
                     Points => {{0, 0}, {a, a}, {a + 1, a}, {1, a}, {a, a + 1}, {a + 1, a + 1}, {1, a + 1}, {0, 1}}
                                                                8
                     LinearCode => LinearCode{AmbientModule => F                                                                                                                                                                                                                              }
                                              BaseField => F
                                              cache => CacheTable{}
                                              Code => image | 0   0   1 0 0   0   0   |
                                                            | a+1 a   1 1 1   a   a+1 |
                                                            | a   a+1 1 1 a+1 a   1   |
                                                            | 1   1   1 1 a   a   a   |
                                                            | a+1 a   1 1 a   a+1 1   |
                                                            | a   a+1 1 1 1   a+1 a   |
                                                            | 1   1   1 1 a+1 a+1 a+1 |
                                                            | 0   0   1 0 0   1   0   |
                                              GeneratorMatrix => | 0 a+1 a   1 a+1 a   1   0 |
                                                                 | 0 a   a+1 1 a   a+1 1   0 |
                                                                 | 1 1   1   1 1   1   1   1 |
                                                                 | 0 1   1   1 1   1   1   0 |
                                                                 | 0 1   a+1 a a   1   a+1 0 |
                                                                 | 0 a   a   a a+1 a+1 a+1 1 |
                                                                 | 0 a+1 1   a 1   a   a+1 0 |
                                              Generators => {{0, a + 1, a, 1, a + 1, a, 1, 0}, {0, a, a + 1, 1, a, a + 1, 1, 0}, {1, 1, 1, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1, 0}, {0, 1, a + 1, a, a, 1, a + 1, 0}, {0, a, a, a, a + 1, a + 1, a + 1, 1}, {0, a + 1, 1, a, 1, a, a + 1, 0}}
                                              ParityCheckMatrix => | 1 1 1 1 1 1 1 1 |
                                              ParityCheckRows => {{1, 1, 1, 1, 1, 1, 1, 1}}
                                                 2               3    2        4
                     VanishingIdeal => ideal (t t  + t t  + t , t  + t  + t , t  + t )
                                               0 1    0 1    0   0    1    1   1    1
                                        2          3   2
                     PolynomialSet => {t , t , 1, t , t t , t , t t }
                                        0   0      0   0 1   1   0 1

Caveat

While this function may work even when a ring is given, instead of a finite field, it is possible that the results are not the expected ones.

Ways to use orderCode :

For the programmer

The object orderCode is a method function with options.