Question: "Suppose a computer worm makes 2 copies of itself on another computer in one millisecond. Estimate the time that is needed to spread to a population of 1,000,000 computers" How would I calculate time?
I am using a textbook by Goodrich, "Introduction to Computer Security" and they glaze over this in no detail but they do show a logarithmic graph similar to this.
Picture is ONLY for show case what is occurring, it is not numerically tied to the question.

Consider the situation at time $t$ where there are $n_i(t)$ infected computers and $n_c(t)$ clean computers. We know that $n_c(t)+n_i(t)=N$, the total number of computers.
The infected computers send out two worms each.
The first worms could infect $n_i(t)$ computers.
But some of the computers that receive worms are already infected. The number of clean computers that receive the worms is approximately $n_i(t)\times \frac {n_c(t)} N$. Therefore the number of clean computers is now $n_c(t)-\frac {n_i(t) n_c(t)} N$.
The second worms could also infect $n_i(t)$ computers. But the number of clean computers has already decreased and the number of clean computers that receive these worms is $n_i(t) \times \frac {n_c-\frac {n_i(t) n_c(t)} N} N$
That leaves us with $n_c(t)-\frac {n_i(t) n_c(t)} N - n_i(t) \times \frac {n_c-\frac {n_i(t) n_c(t)} N} N$ clean computers.
And the number of infected computers is $N-n_c(t)+\frac {n_i(t) n_c(t)} N + n_i(t) \times \frac {n_c-\frac {n_i(t) n_c(t)} N} N$.
This is $n_i(t)+\frac {n_i(t) (N-n_i(t))} N + n_i(t) \times \frac {N-n_i-\frac {n_i(t) (N-n_i(t))} N} N$
$n_i(t+1)=n_i(t)+n_i(t)-\frac {n^2_i(t)} N + n_i(t)- \frac {n^2_i(t)} N - \frac {n^2_i(t)} N + \frac {n^3_i(t)} {N^2}$
$n_i(t+1)=3n_i(t)-3 \frac {n^2_i(t)} N + \frac {n^3_i(t)} {N^2}$
Putting this into Excel gave me these results:
So about 16 milliseconds...