[Nauty] ?
Lluís Alemany Puig
lluis.alemany.puig at upc.edu
Sat Jul 15 17:58:46 AEST 2023
Hello all,
I thought this may be of your interest, now that we know Nauty does not
have such algorithms.
The Linear Arrangement Library (which is free software -- free as in
freedom) contains algorithms to generate all rooted trees with n nodes
(labelled and unlabelled).
* Link to github:
https://github.com/LAL-project/linear-arrangement-library
* Official webpage: https://cqllab.upc.edu/lal/
Links to C++ documentation to generate trees:
* all /labelled/ rooted trees (of n vertices):
https://cqllab.upc.edu/lal/cppdocs/latest/html/classlal_1_1generate_1_1all__lab__rooted__trees.html#details
* all /unlabelled/ rooted trees (of n vertices):
https://cqllab.upc.edu/lal/cppdocs/latest/html/classlal_1_1generate_1_1all__ulab__rooted__trees.html#details
Links to C++ documentation to select trees uniformly at random:
* uniformly random /labelled/ rooted trees (of n vertices):
https://cqllab.upc.edu/lal/cppdocs/latest/html/classlal_1_1generate_1_1rand__lab__rooted__trees.html#details
* uniformly random /unlabelled/ rooted trees (of n vertices):
https://cqllab.upc.edu/lal/cppdocs/latest/html/classlal_1_1generate_1_1rand__ulab__rooted__trees.html#details
There are also the "free" variants of these algorithms, i.e., algorithms
to generate labelled/unlabelled free trees, and select
labelled/unlabelled free trees uniformly at random.
You can use the Linear Arrangement Library with C++ and/or python.
Hope you find this useful,
Lluís
On 15/07/2023 09:31, Brendan McKay wrote:
> Hi Keith, No I don't have one of those at the moment. Brendan.
>
> On 15/7/2023 4:52 pm, Keith Paton wrote:
>> hello,
>>
>> I am writing an algorithm to generate all the rooted trees with n
>> nodes. Does nauty have one?
>>
>> Many thanks,
>>
>> Keith
>>
>> _______________________________________________
>> Nauty mailing list
>> Nauty at anu.edu.au
>> https://mailman.anu.edu.au/mailman/listinfo/nauty
>
> _______________________________________________
> Nauty mailing list
> Nauty at anu.edu.au
> https://mailman.anu.edu.au/mailman/listinfo/nauty
More information about the Nauty
mailing list