Statistics for Succinct Representation of Trees and Graphs