Rev 13587 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 13587 | Rev 18392 | ||
---|---|---|---|
Line -... | Line 1... | ||
- | 1 | !!deprecated |
|
1 | pari_header=est_connexe(a)=my(n=#a,b=(1.+a)^(n-1));for(x=1,n,if(b[1,x]==0,return(0)));1\ |
2 | pari_header=est_connexe(a)=my(n=#a,b=(1.+a)^(n-1));for(x=1,n,if(b[1,x]==0,return(0)));1\ |
2 | /* graphe_connexe */\ |
3 | /* graphe_connexe */\ |
3 | graphe_connexe(n)={\ |
4 | graphe_connexe(n)={\ |
4 | my(a=matrix(n,n),i,j);\ |
5 | my(a=matrix(n,n),i,j);\ |
5 | while(!est_connexe(a),i=1+random(n);j=1+random(n);if(i!=j,a[i,j]=a[j,i]=1));\ |
6 | while(!est_connexe(a),i=1+random(n);j=1+random(n);if(i!=j,a[i,j]=a[j,i]=1));\ |