What is the number of leaf nodes in a rooted tree of 100 nodes with each node having 0 or 3 children?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
We start with the root node. It will definitely have 3 children. In fact, each node(except the root node) will exist as a sibling to 2 other nodes or as a "triplet". There will be 3 1 0 0 − 1 = 3 3 such triplets. Each of these 3 3 triplets will have a unique parent, thus the number of nodes(including root node) with 3 children will be 3 3 . The rest will be leaf nodes and there will be 6 7 of them.