65.80 QRCode

QRCode( n, F )

QRCode returns a quadratic residue code. If F is a field GF(q), then q must be a quadratic residue modulo n. That is, an x exists with x^2=<q> (mod <n>). Both n and q must be primes. Its generator polynomial is the product of the polynomials x-a^i. a is a primitive <n>^{th} root of unity, and i is an integer in the set of quadratic residues modulo n.

    gap> C1 := QRCode( 7, GF(2) );
    a cyclic [7,4,3]1 quadratic residue code over GF(2)
    gap> IsEquivalent( C1, HammingCode( 3, GF(2) ) );
    true
    gap> C2 := QRCode( 11, GF(3) );
    a cyclic [11,6,4..5]2 quadratic residue code over GF(3)
    gap> C2 = TernaryGolayCode();
    true 

Previous Up Top Next
Index

GAP 3.4.4
April 1997