Budding tree (code for ICPR22 2014 paper)