We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Kundu And Bubble Wrap
Kundu And Bubble Wrap
Sort by
recency
|
6 Discussions
|
Please Login in order to post a comment
Haskell
If we have 2 bubbles, why expected number of steps = 3? Minimum is 4:
Seems I don't understand the problem. Can somebody explain, please?
The fun part about this problem is realizing you HAVE to do it mathematically. I tried about 3 other standard methods before I realized I'd have to research the problem more.
It's actually very fun and rather easy. I recommend pencil and paper, try to get as far as possible and then go read about the Coupon Collectors problem. After that it's trivial.
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
This is known as the Coupon collector problem.