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 .