Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,28 @@
function New=PerfectShuffle(Nitems,Nturns)
if modulo(Nitems,2)==0 then
X=1:Nitems;
for c=1:Nturns
X=matrix(X,Nitems/2,2)';
X=X(:);
end
New=X';
end
endfunction
Result=[];
Q=[8, 24, 52, 100, 1020, 1024, 10000];
for n=Q
Same=0;
T=0;
Compare=[];
while ~Same
T=T+1;
R=PerfectShuffle(n,T);
Compare = find(R-(1:n));
if Compare == [] then
Same = 1;
end
end
Result=[Result;T];
end
disp([Q', Result])