Figure 2.

Coloring when visiting a node. Coloring of a sub-tree rooted in node v lets us count all triplets rooted in v.

Sand et al. BMC Bioinformatics 2013 14(Suppl 2):S18   doi:10.1186/1471-2105-14-S2-S18