4 ms·
How did you come to 48 years later? When I calculated it came to about 21 years. In [2]: def reduce_pop(pop, prob): ...: if pop <= 1: ...
by Something1234 8y ago
How did you come to 48 years later? When I calculated it came to about 21 years.
In [2]: def reduce_pop(pop, prob):
...: if pop <= 1:
...: return 1
...: return 1 + reduce_pop(pop * prob, prob)
...:
In [3]: reduce_pop(1000000, 0.5)
Out[3]: 21
Where pop is the initial starting group, and prob is how many die off(with 50:50 I expected half of them die off each year).
Please correct me if my math is wrong or if I'm miss interpreting how to calculate this.
- kbenson 8y ago48 is for the 75:25 probability. I did have the wrong number of years for 50:50 though, it's not the 10 I stated. This problem is the reverse of binary doubling, and I knew 10 bits are a needed to get to 1024, and my brain just sealed out thousand and million. It takes 20 bits to get to over 1 million, so 20 halvings from exactly 1 million should get you to less than 1.