Average branching factor of an undirected graph
Just to make it clear, the problem of finding a spanning tree with a maximum number of leaves is NP-hard. There's a simple 2-approximation algorithm due to Solis-Oba [1] which looks implementable with reasonable effort. In fact, I don't think anything better is known. There are other algorithmic approaches as well (e.g., FPT algorithms), but I'm not sure if these are that practical.

For a good overview of spanning trees in general, you can have a look at the survey of Ozeki and Yamashita [2]. Particularly, Section 6.1 is on spanning trees with many leaves and gives some combinatorial results.



[1] Solis-Oba, Roberto. "2-approximation algorithm for finding a spanning tree with maximum number of leaves." European Symposium on Algorithms. Springer, Berlin, Heidelberg, 1998.

[2] Ozeki, Kenta, and Tomoki Yamashita. "Spanning trees: A survey." Graphs and Combinatorics 27.1 (2011): 1-26.