Here is the problem in the movie Good Will Hunting that got me thinking about ideas for the actual TGA , tree generation algorithm:

"Draw all homeomorphically irreducible trees of size n = 10."

This means that you have to draw all series-reduced free trees with ten vertices and that any two trees can not be the same. To remind you readers: trees are collections of vertices and edges that connect the vertices to each other and there is exactly one path between any two vertices. Series-reduced free trees - on the other hand - are trees with no root vertex (the labeled point) and with the property that degrees (the number of vertices connected to the examined one) of two are forbidden.

Here is my equivalent problem and with also a solution:

Now you may be thinking: "What do these symbols mean?". I will explain my answer in the following post.