Блог пользователя anh1l1ator

Автор anh1l1ator, история, 8 лет назад, По-английски

There exists 4 bacteria in your shoes at time t=0 seconds.

A bacteria replicate into 2 with a probability p and otherwise die every second.
What is the expected number of bacteria's at the end of 70 seconds.

Constraints:
(0<=p<=1)
And you have to report the floor of the answer.

I saw this question on a test which allowed usage of computer but I think it can be done using total maths too.
I thought of doing a dp with state { time , number of bacteria's } which is exponential in nature.
Either way I don't have a solution.
Obviously, if we can solve it for 1 bacteria we can solve it for 4 too but this isn't a significant improvement either .

  • Проголосовать: нравится
  • +9
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

Let's say we have 1 bacteria. After 1 second the expected number of bacteria will be p·2 + (1 - p)·0 = 2p. So, in 1 second the expected number is increased 2p times (you must use the linearity of EV to prove it). After 70 seconds it will be (2p)70.