%% Program for solving the linear equations of SHI1
basis = []
for n = 1:11
% Bit n must be 1
A = [zeros(1,80)];
b = [ zeros(75,1)];
A(1,n) = 1;
b(1,1) = 1;
% Must be an expansion of m
for i = 12:80
u = zeros(1,80);
u(i) = 1; u(i-3) = 1; u(i-8) = 1;
if (i - 14) > 0
u(i-14) = 1;
end
if (i - 16) > 0
u(i-16) = 1;
end
A = [A ; u];
end
% Last five bits must be zero
A = [A; zeros(5,75) eye(5)];
basis = [basis gflineq(A,b)];
end
% independent basis
gfrank(basis')
% check if match
for i = 17:80
if not (basis(i,1) == mod(basis(i-3,1) + basis(i-8,1) + basis(i-14,1) + basis(i-16,1), 2))
echo 'No match'
i
%break
end
end
No comments:
Post a Comment