IMT.py
def ComputeL(G):
    """Compute the maximal number of leaves that can be obtained in a tree
     which is an induced subgraph of size m of G for each m between 0 and
     |G|.
    
    INPUT:
        G - a graph, in which the vertices are 0,1,2,...,n-1

    OUTPUT:
        A dictionnary L that associates to the number of vertices, the
        maximal number of leaves.
    """ 
    global L
    n=G.num_verts()
    L=dict([(i,0) for i in range(0,n+1)])
    ComputeLRecursive(G,0,n,set())
    return L
Compute the maximal number of leaves that can be obtained in a tree
     which is an induced subgraph of size m of G for each m between 0 and
     |G|.
    
    INPUT:
        G - a graph, in which the vertices are 0,1,2,...,n-1

    OUTPUT:
        A dictionnary L that associates to the number of vertices, the
        maximal number of leaves.
    
Compute the maximal number of leaves that can be obtained in a tree
which is an induced subgraph of size m of G for each m between 0 and
|G|.

a graph, in which the vertices are 0,1,2,...,n-1

A dictionnary L that associates to the number of vertices, the
maximal number of leaves.
Compute the maximal number of leaves that can be obtained in a tree which is an induced subgraph of size m of G for each m between 0 and |G| . a graph in which the vertices are 0 1 2 ... n - 1 A dictionnary L that associates to the number of vertices the maximal number of leaves .
def ComputeL(G):
    global L
    n=G.num_verts()
    L=dict([(i,0) for i in range(0,n+1)])
    ComputeLRecursive(G,0,n,set())
    return L
def ComputeL ( G ) : global L n = G . num_verts ( ) L = dict ( [ ( i , 0 ) for i in range ( 0 , n + 1 ) ] ) ComputeLRecursive ( G , 0 , n , set ( ) ) return L
Compute the maximal number of leaves that can be obtained in a tree
which is an induced subgraph of size m of G for each m between 0 and
|G|.
Compute the maximal number of leaves that can be obtained in a tree which is an induced subgraph of size m of G for each m between 0 and |G| .
"""Compute the maximal number of leaves that can be obtained in a tree
     which is an induced subgraph of size m of G for each m between 0 and
     |G|.
    
    INPUT:
        G - a graph, in which the vertices are 0,1,2,...,n-1

    OUTPUT:
        A dictionnary L that associates to the number of vertices, the
        maximal number of leaves.
    """
G