65.56 GreedyCode

GreedyCode( L, d, F )

GreedyCode returns a Greedy code with design distance d over F. The code is constructed using the Greedy algorithm on the list of vectors L. This algorithm checks each vector in L and adds it to the code if its distance to the current code is greater than or equal to d. It is obvious that the resulting code has a minimum distance of at least d.

Note that Greedy codes are often linear codes.

The function LexiCode creates a Greedy code from a basis instead of an enumerated list (see LexiCode).

    gap> C1 := GreedyCode( Tuples( Elements( GF(2) ), 5 ), 3, GF(2) );
    a (5,4,3..5)2 Greedy code, user defined basis over GF(2)
    gap> C2 := GreedyCode( Permuted( Tuples( Elements( GF(2) ), 5 ),
    >                         (1,4) ), 3, GF(2) );
    a (5,4,3..5)2 Greedy code, user defined basis over GF(2)
    gap> C1 = C2;
    false 

Previous Up Top Next
Index

GAP 3.4.4
April 1997