The program will ask for the number of leaves and it will construct a binary tree with the given number of leaves. The method of construction can be of four different types according to your selection.
  • The tree constructed can be rooted or rootless.
  • Vertices of degree one are leaves, other vertices are internal vertices. The vertex of degree two is the root.
  • Given the number of leaves, the program can construct a (rooted or rootless) binary tree in two different ways:
  • Both algorithms can construct all tree, but the Yule-Harding algorithm tends to generate bushier trees than the Uniform algorithm.
     
     
    ©1999  All Rights Reserved
    e-mail the Pagemaster
     
     
    GoBack
    GoBack