Help needed Round #172 (Div. 1) C. Game on Tree

Revision en1, by peaceful_warrior, 2015-09-13 09:54:44

Problem link Hi i have solved above problem but i am trying a variant of the same problem.

From same problem our simplified but complicated version. Now lets assume from root ,all the vertices are directly connected to the root. But we the probability of selection of node i is p[i] such that any p[i]>0 and sum of p[i] is 1 We have to find the expected chances to delete the whole tree..same as the original problem

Now to deleted the root probability p[root] but now to delete the the children probability of direct removal is p[child]/p[root]+p[child]; But when i simulate i am getting wrong answer.. Can anybody help me where approach is going wrong

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English peaceful_warrior 2015-09-13 11:31:48 79
en1 English peaceful_warrior 2015-09-13 09:54:44 767 Initial revision (published)