"Source: Text/Code/CodeZ4.text";
"Line: 2426";
"Date: Thu Sep 25 14:47:47 2025";
"Main: Fri Sep 26 14:29:19 2025";
// original file: Text/Code/CodeZ4.text, line: 2426
// Example: H169E24 ()
print "Example: H169E24";
ei := GetEchoInput();
SetEchoInput(true);
C := HadamardCodeZ4(3, 5);
I, S, Ibin, Sbin := PDSetHadamardCodeZ4(3, 5);
s := #Sbin-1; s;
s eq Floor((2^(2*3-2)-3)/3);
IsPermutationDecodeSet(C, I, S, s);
IsPermutationDecodeSet(C, Ibin, Sbin, s);
c := C ! [3,2,1,0,1,0,3,2,3,2,1,0,1,0,3,2];
R := UniverseCode(Integers(4), Length(C));
u := R ! [2,3,2,0,1,0,3,2,3,2,1,0,1,0,3,3];
u in C;
LeeDistance(u, c);
grayMap := GrayMap(R);
cbin := grayMap(c);
isDecoded, uDecoded, ubinDecoded := PermutationDecode(C, I, S, 4, u);
isDecoded;
uDecoded eq c;
ubinDecoded eq cbin;
C := HadamardCodeZ4(3, 6);
I, S, Ibin, Sbin := PDSetHadamardCodeZ4(3, 6);
s := #Sbin-1; s;
IsPermutationDecodeSet(C, I, S, s);
I, S, Ibin, Sbin := PDSetHadamardCodeZ4(3, 6 : AlgMethod := "Nondeterministic");
s := #Sbin-1; s;
IsPermutationDecodeSet(C, I, S, s);
C := KerdockCode(4);
I, S, Ibin, Sbin := PDSetKerdockCodeZ4(4);
IsPermutationDecodeSet(C, I, S, 2);
IsPermutationDecodeSet(C, Ibin, Sbin, 2);
SetEchoInput(ei);
