| 1 | initial version |
A compact version of the mentioned related question is:
def f( myList ):
return myList[1] * myList[-1]
len( [ T
for T in graphs.trees( 18 )
if T.diameter() == 5
and f( sorted( T.laplacian_matrix().eigenvalues() ) ) == 1 ] )
Enjoy!
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.