In the classic Star Trek episode "The Trouble with Tribbles," the Enterprise and a space station become infested with adorable, trilling balls of fluff called tribbles. Tribbles are cute, so you may be inclined to keep one as a pet. But be warned: tribbles reproduce rapidly, so they will soon eat all of your food.
In this scene from that episode, Spock says that there are 1,771,561 tribbles onboard the Enterprise. How does he come up with that figure? Kyle Hill, a science journalist, derived Spock's mathematical calculations.
Hill sketched the above figures and wrote:
Above, I started with what I knew. For P (population) at time 0 (when the tribbles first came aboard), there was 1 tribble. Easy enough. We also knew, thanks to Spock, that after 72 hours, P was equal to 1,771,561. Now it gets a little more complicated.
To write a useful equation, what we really want to know is what the population of tribbles will be at any one time. Therefore, I wrote Population=P(t). But we know that tribbles grow exponentially (or we are checking that assumption), so we have to include that information. To find the rate of tribble growth, we take the mathematical derivative of Population=P(t) to get P’(t). Putting those two together we get P’(t)=kP(t). (This equation says that the rate of growth is equal to some constant k times the population at some time. K pops out of the normal process of taking the derivative of a function.)
The episode ended with Scotty beaming the surviving tribbles onto a nearby Klingon warship. Hill anticipates catastrophic results:
There was serious tribble trouble at 72 hours. At around 100 hours of growth, there would be a tribble occupying every cubic inch of volume on the Enterprise. Kirk and his crew would drown in pregnant, fuzzy aliens. And because the growth is exponential, it would get much worse very quickly. Less than 8 hours later, our equation tells us that Spock and Kirk would have to deal with a thousand times more tribbles — well over two billion. That’s enough to fill 1,200 Borg Cubes completely. Conclusions like that are worth all the math.
Left unchecked, the tribble birth rate equation shows an unstoppable expansion of exponential growth towards domination. That’s something the Klingons know all too well.