Q. about {0,1}-matrices.

Artur grafix at csl.pl
Sat Jan 6 23:39:16 CET 2007


I can confirm 5008 is good number for 4 x 4. 5 x 5 is running
ARTUR

Dnia 06-01-2007 o 22:35:47 Ferenc Adorjan <fadorjan at freemail.hu>  
napisał(a):

> Hello Neil and Seqfans,
>
> I have composed a Pari program to determine the number of nxn robust
> 0,1 matrices.
> Certainly, the program below is neither optimal nor verfied. It
> provides properly the value of 4 and 68, but as the fourth term it
> gives 5440 instead of the value in your sequence (5008).
> Somebody should verify the program (or the term #4) before anybody
> tries to calculate the fifth term.
> Ferenc
>
> {nrobust(n)= /* # or robust nxn 0,1 matrices */
> local(m,l,k,c=0);
> l=2^(n^2-1);k=l-1;for(i=1,k,l++;
> b=binary(l);m=matrix(n,n,x,y,b[(x-1)*n+y]);
> if(robust(m),c++));return(c)
> }
> {sing01(m)=
> local(r=1,v,k,j,s);
> k=matsize(m)[1];v=vector(k);
> j=1;while((r>0)&&(j<=k),v[j]=0;for(i=1,k,v[j]+=m[i,j]*2^(i-1));r=v[j];j++);
> if(r==0,return(r),for(i=1,k-1,for(j=i+1,k,r=v[i]<>v[j];if(r==0,return(r)))));
> j=1;while((r>0)&&(j<=k),v[j]=0;for(i=1,k,v[j]+=m[j,i]*2^(i-1));r=v[j];j++);
> if(r==0,return(r),for(i=1,k-1,for(j=i+1,k,r=v[i]<>v[j];if(r==0,return(r))));return(r))
> }
> {robust(m)= /* it assumes that m[1,1]=1 */
> local(s,j,k,n,r=1); n=matsize(m)[1];
> for(i=2,n,s=matrix(i,i,x,y,m[x,y]);if(r=sing01(s),,return(r)));return(r)}







More information about the SeqFan mailing list