65.54 RandomCode

RandomCode( n, M, F )

RandomCode returns a random unrestricted code of size M with word length n over F. M must be less than or equal to the number of elements in the space GF(q)^n.

The function RandomLinearCode returns a random linear code (see RandomLinearCode).

    gap> C1 := RandomCode( 6, 10, GF(8) );
    a (6,10,1..6)4..6 random unrestricted code over GF(8)
    gap> MinimumDistance(C1);
    3
    gap> C2 := RandomCode( 6, 10, GF(8) );
    a (6,10,1..6)4..6 random unrestricted code over GF(8)
    gap> C1 = C2;
    false 

Previous Up Top Next
Index

GAP 3.4.4
April 1997