Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Output of RootedTrees()

Dear all,

I’m currently working on rooted trees and I wanted to ask if there is an alternative output for rooted trees by using HashTables.

For example, if I run the following code:

n = 5
trees = RootedTrees(n)

for T in trees:
    print(T)

The output I get is:

[[[[[]]]]]
[[[[], []]]]
[[[], [[]]]]
[[[], [], []]]
[[], [[[]]]]
[[], [[], []]]
[[[]], [[]]]
[[], [], [[]]]
[[], [], [], []]

Is there a different way to represent or obtain this output using HashTables? For instance, I guess [[], [], [], []] means the tree G having E(G)={{1,2},{1,3},{1,4},{1,5}}

Output of RootedTrees()

Dear all,

I’m currently working on rooted trees and I wanted to ask if there is an alternative output for rooted trees by using HashTables.HashTables or edge sets.

For example, if I run the following code:

n = 5
trees = RootedTrees(n)

for T in trees:
    print(T)

The output I get is:

[[[[[]]]]]
[[[[], []]]]
[[[], [[]]]]
[[[], [], []]]
[[], [[[]]]]
[[], [[], []]]
[[[]], [[]]]
[[], [], [[]]]
[[], [], [], []]

Is there a different way to represent or obtain this output using HashTables?HashTables or edge sets? For instance, I guess [[], [], [], []] means the tree G having E(G)={{1,2},{1,3},{1,4},{1,5}}

click to hide/show revision 3
retagged

updated 27 hours ago

FrédéricC gravatar image

Output of RootedTrees()

Dear all,

I’m currently working on rooted trees and I wanted to ask if there is an alternative output for rooted trees by using HashTables or edge sets.

For example, if I run the following code:

n = 5
trees = RootedTrees(n)

for T in trees:
    print(T)

The output I get is:

[[[[[]]]]]
[[[[], []]]]
[[[], [[]]]]
[[[], [], []]]
[[], [[[]]]]
[[], [[], []]]
[[[]], [[]]]
[[], [], [[]]]
[[], [], [], []]

Is there a different way to represent or obtain this output using HashTables or edge sets? For instance, I guess [[], [], [], []] means the tree G having E(G)={{1,2},{1,3},{1,4},{1,5}}