Distance Laplacian digraph spectral radius checks

1236 days ago by reinh196

def distLapla(G): n=G.order() M=zero_matrix(QQ,n,n) for i in range(n): for j in range(n): if i!=j: x=G.distance(i,j) M[i,j]=-x M[i,i]=M[i,i]+x return M 
       
D3=[] for g in digraphs(3): if g.is_strongly_connected()==True: D3.append(g) 
       
rhos=[] for x in D3: lambdamax=0 y=x.copy(immutable=True) lambdas=distLapla(y).eigenvalues() lambdamax=max(lambdas) rhos.append([lambdamax,y]) for i in range(len(rhos)): for j in range(len(rhos)): if i!=j: if rhos[j][0]>rhos[i][0]: if rhos[i][1].is_subgraph(rhos[j][1]): print rhos[i], rhos[j] print 'done!' 
       
done!
done!
D4=[] for g in digraphs(4): if g.is_strongly_connected()==True: D4.append(g) 
       
rhos=[] for x in D4: lambdamax=0 y=x.copy(immutable=True) lambdas=distLapla(y).eigenvalues() lambdamax=max(lambdas) rhos.append([lambdamax,y]) for i in range(len(rhos)): for j in range(len(rhos)): if i!=j: if rhos[j][0]>rhos[i][0]: if rhos[i][1].is_subgraph(rhos[j][1]): print rhos[i], rhos[j] print 'done!' 
       
done!
done!
D5=[] for g in digraphs(5): if g.is_strongly_connected()==True: D5.append(g) 
       
rhos=[] for x in D5: lambdamax=0 y=x.copy(immutable=True) lambdas=distLapla(y).eigenvalues() lambdamax=max(lambdas) rhos.append([lambdamax,y]) for i in range(len(rhos)): for j in range(len(rhos)): if i!=j: if rhos[j][0]>rhos[i][0]: if rhos[i][1].is_subgraph(rhos[j][1]): print rhos[i], rhos[j] print 'done!' 
       
done!
done!