Ask Your Question

Revision history [back]

click to hide/show revision 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!