I have a complete 19-ary tree on n nodes. I mark all the nodes that have the property that all of their non-root ancestors are either oldest or youngest children (including root). I have to give an asymptotic bound for the number of marked nodes.
I noticed that the
- first level has one marked node (root(
- second: 19
- third: 2 * 19
- fourth: 2^2 * 19
- fifth: 2^3 * 19
- ...
- k-th : 2^(k-2) * 19
My method was to find the number of marked nodes on the last level and then use recursion to find the number of marked nodes on a complete 19-ary of one level less.
But that does not quite work. Am I going the right path?