You are viewing a single comment's thread. Return to all comments →
this is really just math so sit down with pen and pencil and figure it out.
In case you need some hints, consider this relation:
expectedTime cntPoped cntUnpoped = (cntPoped / (cntPoped + cntUnpoped)) * (1 + expectedTime cntPoped cntUnpoped) + (cntUnpoped / (cntPoped + cntUnpoped)) * (1 + expectedTime (cntPoped + 1) (cntUnpoped - 1))
now of course this will not work as the recursion never stops - here comes the math (solve x = a*(1+x) + y for x and compare)
x = a*(1+x) + y
x
the rest should be really easy
Seems like cookies are disabled on this browser, please enable them to open this website
Kundu And Bubble Wrap
You are viewing a single comment's thread. Return to all comments →
this is really just math so sit down with pen and pencil and figure it out.
In case you need some hints, consider this relation:
now of course this will not work as the recursion never stops - here comes the math (solve
x = a*(1+x) + y
forx
and compare)the rest should be really easy