Go through this article http://www.cs.tau.ac.il/~nachumd/papers/Enumerations.pdf. Link by @ruskinmanku in EXPTREE Editorial Section. answered 17 Jul '17, 22:34

This question is all about searching(According to me ). The link above takes you to some papers which has precalculated formulas. The no. of vertices which have d(for this d=1) childeren is (2n1d)!/((n1)!(nd)!). The no. of total possible trees is (2n)!/((n!n!)*(n+1)).Where 'n' is no. of edges . Apply the formula and get the answer. For the modulo inverse http://www.geeksforgeeks.org/multiplicativeinverseundermodulom/ .Hope this help. answered 17 Jul '17, 23:15

Well getting a formal proof is something really hard, you will find yourself ending in reading papers. My solution was the easiest thing that came up to my mind. Anyway, this solution is kind of intuitive :) answered 18 Jul '17, 08:07

I have added small extra explanation in the editorial and also a note which tells the purpose of the editorial answered 18 Jul '17, 09:30
