views:

181

answers:

0

Hi all,

I am trying to develop a java algorithm for the enumeration of n-depth and m-width trees:

Each node can have at maximum 7 children. Nodes are of different type: a first kind of node can have children but can not be a leaf. The second can have no child (so it must be a leaf).

The root is at depth 0 and the width is the maximum number of leaves allowed.

As written in the title, I try to enumerate all trees with all possible combinations for depth and width given.

Do you know any algorithm in Java that can do that ?

Thank you!