TWO BORDERS TWO CIRCULANT MATRICES © Nickolay Balonin, 1.05.2015 Conference matrix catalogue and on-line algorithms

Two borders and two circulant A,B-matrices have: A is circulant and symmetry, block B based on the two flip-inversed sequences (to be the same quantity of invariants symmetric matrices have). Two circulant core is a shadow matrix .

N. A. Balonin, Jennifer Seberry A Review and New Symmetric Conference Matrices //Informatsionno-upravliaiushchie sistemy, 2014, № 4 (71), pp. 2–7.

THE FORK C62 – ... – C74 C66 has to be between given orders!

The work with symmetries of bicycles brings method to find conference matrices C62, C74 fast in 20 minuts ! It is a fork for famous order 66 . If during a night we see no C66 (for 46 we see a distantion), i'm afraid, this form does not exist the same as two circulant , four circulant or multicirculant matrices: they exist for cases 6, 26 (not for 46, 66, 86!). Let us note: 66 has to be a symmetric matrix with 33×33-block A, while 32 is the last two circulant symmetric Hadamard matrix (these circumstances can be connected by a structure bound).

{{C="C6B2AB.xml"}}
mesh(C); putm(C); // {{I=C'*C}} putm(I);

// n=50 !
a=[0,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1];
b=[-1,1,-1,-1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,-1,1,1,-1,-1,1];
a=[0,-1,-1,-1,1,1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,-1,-1]; //!
b=[-1,1,1,1,-1,1,-1,1,1,-1,1,-1,1,1,-1,-1,1,-1,-1,-1,-1,-1,1,1];
a=[0,1,-1,-1,1,-1,1,1,1,-1,-1,-1,1,-1,-1,-1,1,1,1,-1,1,-1,-1,1];
b=[1,-1,-1,1,1,-1,1,1,1,1,1,-1,-1,1,-1,1,-1,1,1,-1,-1,-1,-1,-1];
// n=54
a=[0,1,-1,-1,-1,1,-1,1,1,-1,1,1,-1,-1,-1,1,1,-1,1,1,-1,1,-1,-1,-1,1];
b=[-1,-1,1,-1,-1,-1,-1,-1,1,1,1,1,1,-1,1,1,1,-1,-1,1,-1,1,-1,1,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,6,8,10,11,12,14,15,17,23,24,28,29,31,32,35];
n=80; v=n/2; a=ds2a(v,a); a[0]=0; b=ds2a(v,b); {{ a=-a }}
putm("a=["+a+"];"); putm("b=["+b+"];");
H=twocircul(a,b); H=border(H,0,1,-1); H=border(H,0);
{{I=H'*H}} putm(I); plots(H);

CONFERENCE MATRICES Matrices C_{6} and C_{10} Matrices C_{14} and C_{18} Matrices C_{26} and C_{30} Matrices C_{38} and C_{42} Matrices С_{50} and С_{54} Matrices С_{62} and С_{74} Core of Dragomir's C_{80}

// PENDULUM MODEL
if (tick==0) {
// s=5; n=pow(2,s); n=n+0*4;
s=8; n=38; v=n; hf=1.03; hf2=4*hf;
hmin=100; sn=sqrt(n);
F2=true; // TWO CIRCULANT FORM
FB=true; // BORDER FLAG
FR=true; // REVERS FLAG
FS1=true; // SYMMETRY
FS2=false; // TWO SYMMETRY
if (F2) v=n/2; if (FB) v=v-1;
if (FR) { if (FB) { v2=v/2-1; }else{ v2=(v-1)/2; } }
}
// STADIUM 1: CHOOSE PRETENDENT H
// MATRIX ORDER 20, 32, 40, 68, 100, ...
H=initmatrix2(n,1000,8); // plots(H);
if (minx==0) { tick=-100 }else{
// STADIUM 2: DETERMINANT OPTIMISATION
H=norms(H); m=maxabs(H);
u=line(n); p=0.5; q=150; q2=5; // iterations
while(q>1) { q=q-1; p=0.995*p+0.005;
// SORT COLUMS
ix=maxabsix(H); u=sort(u,ix); H=sort(H,ix);
H=sat(H,m*p); H=orth(H); m=maxabs(H); h=m*sn;
if (h<hf) { q=0; tick=-tick; }else{
if (h<hmin) hmin=h; if (q>q2) if (h>hf2) q=0; }
}}
puts('n='+n+' s='+s+' h/hmin='+format(h,1000)+'/'+format(hmin,1000)+' max='+minx+' tick='+abs(tick));
// plots(H);
if (tick>=0) {
// HYSTOGRAM AND RESTART
// G=sort(absm(colline(H))); mesh(G);
restart(0);
}else{ // RESULT
if (minx>0) { H=resort(H,u);
H=divp(H,m); if (h<hf) H=roundm(H); }
analysis();
{{I=H'*H}} putm(I); putm(H);
// plots(H,"XR");
sound("../../music/5th.wav");
}
function getAB() {
function resp(y,x,q) {
var i,k,ks,s,p,z,a; s=rows(y);
{{a=x; a=(a+1)/2; y=(y+1)/2;}}
for (k=s;k<q;k++) { z=0; ks=k-s;
for (i=0;i<s;i++) z+=y[i]*a[ks+i]; a[k]=z%2;}
{{a=2*a-1}}
return a;
}
if (FR) {
y1=randseq(s); x1=randseq(s); a1=resp(y1,x1,v2);
if (FS1) { b1=flip(a1); }else{
b1=resp(randseq(s),randseq(s),v2); }
// a1=randseq(v2); // b1=randseq(v2); //
if (!FB) { // a=[0].concat(a1).concat(minp(b1));
a=[0].concat(a1).concat(b1);
}else{
a=[0].concat(a1).concat(randseq(1)).concat(b1);
}
}else{
y1=randseq(s); x1=randseq(s); a=resp(y1,x1,v); a[0]=0;
}
// a=ab2a(a);
A=circul(a);
if (F2) {
if (FR) {
y2=randseq(s); x2=randseq(s); a2=resp(y2,x2,v2);
if (FS2) { b2=flip(a2); }else{
y2=randseq(s); x2=randseq(s); b2=resp(y2,x2,v2); }
// y2=randseq(v2); // x2=randseq(v2); //
if (!FB) { // b=[-1].concat(b2).concat(minp(b2));
b=[-1].concat(a2).concat(b2);
}else{ b=[1].concat(a2).concat(randseq(1)).concat(b2);
// b=[1].concat(a2).concat(randseq(1)).concat(minp(b2));
// b=[-1].concat(a2).concat(minp(b2)).concat(randseq(1));
}
}else{
y2=randseq(s); x2=randseq(s); b=resp(y2,x2,v);
// x2=randseq(s); b=resp(y1,x2,v);
// b=resp(y1,x1,v);
}
B=circul(b);
}}
function initmatrix(n) {
// FOR TWO CIRCULAT MATRIX
minx=1000; getAB();
if (F2) { H=twocircul(A,B);
if (FB) { H=border(H,0,1,-1); H=border(H,0);}
}else{if (FB) { H=border(A,0,1); }else{ H=equal(A);}}
return H;
}
function initmatrix2(n,q,min) {
// FOR TWO CIRCULAT MATRIX
H=initmatrix(n);
while (q>0) { q=q-1; getAB();
if (F2) { H2=twocircul(A,B);
if (FB) { H2=border(H2,0,1,-1); H2=border(H2,0);}
}else{if (FB) { H2=border(A,0,1); }else{H2=equal(A);}}
maxx=maxabslsm(H2);
if (maxx<minx) { minx=maxx; H=equal(H2);
if (minx<=min) q=0;
}
}
return H;
}
function resort(A,ix) {
var i,j,n,Q;
n=rows(A); Q=matrix(n,n);
for (i=0;i<n;i++)
for (j=0;j<n;j++) Q[i][ix[j]]=A[i][j];
return Q;
}
function getis(a) {
// get index of symmetry
var i,v,F,IS; v=rows(a); F=true; IS=1;
for (i=1;i<=v/2;i++) if (F) { IS=i; F=a[i]==a[v-i]; }
return IS;
}
function setmaxis(x) {
// set maximal index of symmetry
var i,v,a,b,F,IS,ISM;
a=equal(x); b=equal(x); ISM=getis(a); v=rows(a);
for (i=1;i<v;i++) { a=circshift(a); IS=getis(a);
if (IS>ISM) { b=equal(a); ISM=IS;}}
return b;
}
function getish(a) {
// get index of hamming symmetry
var i,v,IS; v=rows(a); IS=1;
for (i=1;i<v/2;i++) if (a[i]==a[v-i]) IS++;
return IS;
}
function setmaxish(x) {
// set maximal index of hamming symmetry
var i,v,a,b,IS,ISM;
a=equal(x); b=equal(x); ISM=getish(a); v=rows(a);
for (i=1;i<v;i++) { a=circshift(a); IS=getish(a);
if (IS>ISM) { b=equal(a); ISM=IS;}}
return b;
}
function analysis() {
// MATRIX ANALYSIS
if (F2) {
if (FB) {
a=tr(rowcol(H,2,2,2,v+1)); b=tr(rowcol(H,2,2,2+v,n-1));
}else{
a=tr(rowcol(H,0,0,0,v-1)); b=tr(rowcol(H,0,0,v,n-1));
}}else{
if (FB) {
a=tr(rowcol(H,1,1,1,n-1)); }else{ a=tr(rowcol(H,0,0,0,n-1));
}}
if (1) {
// OPTIMISATION OF A,B
a=setmaxis(a); if (sum(a)>0) a=minp(a);
IS1=getis(a); putm("a=["+a+"];");
if (F2) {
b=setmaxis(b); if (sum(b)>0) b=minp(b);
IS2=getis(b); putm("b=["+b+"];");
puts('IS='+IS1+','+IS2); }else{ puts('IS='+IS1); }
// CONVERSION TO P
// P1=a2ds(a); P2=a2ds(b); puts("P=[["+P1+"],["+P2+"]];");
}else{
putm("a=["+a+"];"); if (F2) putm("b=["+b+"];");
}
if (F2) { H=twocircul(a,b);
if (FB) { H=border(H,0,1,-1); H=border(H,0);}
}else{ H=circ(a); if (FB) H=border(H,0,1); }
plots(H,"XR");
}

// SEARCH TO WEIGHING MATRICES PROCEDURE
// 10, 14, 18, 26, 30, 38, 42, [46], 50, 54, 58, 62
if (tick==0) {
n=42; n=n-2; v=n/2; m=(v-2)/2; N=0;
// SET INDEX OF SYMMETRY v1
v1=floor(v/2);
v11=v1; v1=v1-1; v21=v-2*v1; v2=v21-1;
q=1000; // number of iterations
}
while (q>0) { q=q-1;
// VERSIONS OF SEQUENCES
// a=signm(rand(v));
a1=signm(rand(v1)); a2=signm(rand(v2));
a=[0].concat(a1).concat(a2).concat(flip(a1));
// b=signm(rand(v));
b1=signm(rand(v11)); // b2=signm(rand(v21));
// b=[-1].concat(b1).concat(b2).concat(flip(b1));
// b=[-1].concat(b1).concat(b2).concat(flip(minp(b1)));
b=b1.concat(flip(minp(b1)));
// b=b1.concat(flip(b1));
// b=b1.concat(b2).concat(flip(minp(b1)));
// b=b1.concat(b2).concat(flip(b1));
// a=[0,1,-1,-1,-1,1]; b=[-1,1,1,-1,-1,1];
x=circshift(a); y=circshift(b);
{{x=2+a'*x+b'*y}}
if (abs(x)==0) {
A=circul(a); B=circul(b);
W=twocircul(A,B); H=border(W,0,1,-1);
H=border(H,0,1);
x=H[2]; x=mul(H,x); x[2]=0;
x=maxm(absm(x)); if (x==0) q=-100;
}
}
if (q!=-100) {
puts(N); N++; puts('index of symmetry: '+(v1+1));
q=5000; restart(100); }else{
puts('index of symmetry: '+(v1+1)); puts(a); puts(b);
{{X=H'*H}} putm(X); plots(H); // mesh(H);
}
With piece of code: grain

// SEARCH TO WEIGHING MATRICES PROCEDURE
// 10, 14, 18, 26, 30, 38, 42, [46], 50, 54, 58, 62
if (tick==0) {
n=74; n=n-2; v=n/2; m=(v-2)/2; N=0;
// SET INDEX OF SYMMETRY v1
v1=floor(v/2);
v11=v1; v1=v1-1; v21=v-2*v1; v2=v21-1;
q=1000; // number of iterations
sa=[1,-1,1,1]; vsa=v1-rows(sa); // grain a
sb=[1,-1]; vsb=v11-rows(sb); // grain b
}
while (q>0) { q=q-1;
// VERSIONS OF SEQUENCES
// a=signm(rand(v));
a1=sa.concat(signm(rand(vsa))); a2=signm(rand(v2));
a=[0].concat(a1).concat(a2).concat(flip(a1));
// b=signm(rand(v));
b1=sb.concat(signm(rand(vsb))); // b2=signm(rand(v21));
// b=[-1].concat(b1).concat(b2).concat(flip(b1));
// b=[-1].concat(b1).concat(b2).concat(flip(minp(b1)));
b=b1.concat(flip(minp(b1)));
// b=b1.concat(flip(b1));
// b=b1.concat(b2).concat(flip(minp(b1)));
// b=b1.concat(b2).concat(flip(b1));
// a=[0,1,-1,-1,-1,1]; b=[-1,1,1,-1,-1,1];
x=circshift(a); y=circshift(b);
{{x=2+a'*x+b'*y}}
if (abs(x)==0) {
A=circul(a); B=circul(b);
W=twocircul(A,B); H=border(W,0,1,-1);
H=border(H,0,1);
x=H[2]; x=mul(H,x); x[2]=0;
x=maxm(absm(x)); if (x==0) q=-100;
}
}
if (q!=-100) {
puts(N); N++; puts('index of symmetry: '+(v1+1));
q=5000; restart(100); }else{
puts('index of symmetry: '+(v1+1)); puts(a); puts(b);
{{X=H'*H}} putm(X); plots(H); // mesh(H);
}

// GALOIS FIELDS PROCEDURE
if (tick==0) { n=16; M=10000; R=true; F2=true;
F00=false; v=n; if (F2) v=n/2; v21=v/2-1;
v2=2*v; vd2=v/2; p=v-1; gfinit(p,2);
if (p==9) gfinit(3,4); if (p==25) gfinit(5,4);
if (p==27) gfinit(3,6); if (p==125) gfinit(5,6);
}
for (k=0;k<100;k++) if (R) {
P1=4; // P1=randint(v);
a=getseq(gfrand(),P1); a[0]=0;
if (F00) a[0]=0;
if (!F2) { H=circ(a); // H=a2ab(H);
}else{
P2=2; P2=randint(v);
b=getseq(gfrand(),P2); if (F00) b[0]=0;
// MULTIPLICATION
// a=mul2seq(a,b); b=a[1]; a=a[0];
// a=mul2seq(a,b); b=a[1]; a=a[0];
A=circ(a); B=circ(b);
H=twocircul(A,B); H=border(H,0,1,-1); H=border(H,0);
}
m=maxabslsm(H);
if (m<M) { M=m; mesh(H); if (M==0) R=false; }
}
// INFORMATION
puts("n="+rows(H)+" p="+p+" r="+GFr+" Lim="+M+"; tick="+tick);
puts("P1=["+P1+"]; P2=["+P2+"];");
// puts("x1=["+X1+"]; x2=["+X2+"];");
// {{I=H'*H}} putm(I); putm(H);
// RESTART
if (M>0) { restart(0) }else{ // FINISH
// puts("x1=["+x1+"];"+" x2=["+x2+"];");
puts("a=["+a+"];"); if (F2) puts("b=["+b+"];");
// williamson(a,b,true);
{{I=H'*H}} putm(I); putm(H); plots(H,"XR");
sound("5th.wav");
}
function getseq(x,phase) { var A,B;
A=gfexp(x,v,1,phase); A=gfadd(A,gfpow(A,v-1));
B=gfexp(x,v21,v2); // B=gfadd(B,gfpow(B,v-1));
return gfeq(A,B);
}

TWO CIRCULANT MATRICES