Now, let's assume that the population of the planet exploded to 100 billion people, and that they each lived to be 100 years old, and that they each also generated 1 trillion bitcoin addresses to use each second of their lives. Let's further assume that all of these addresses are unique, and truly random.
Going by the important number, the size of a bitcoin address (160 bits), what is the chance of you generating an address that collides with that of someone else on the planet?
Best I can do right now is to turn this into an analogy (I'm sure the math will be corrected, but it's close enough to make the point.)
Imagine that I tell you that I've hidden a small treasure box, one inch cubed, that I've buried under a few inches deep somewhere in the 48 contiguous United States. You have a sewing needle. You have to guess where in the U.S. the box is, with NO data, and mark the location by sticking the needle into the ground on top of where you think the box is.
Your chance of finding that box with that needle in one try is millions of times better than your chance of creating an address collision with 100 billion other people, each generating 1 trillion unique, truly random addresses a second for 100 years straight.
So long as you're generating truly random bitcoin addresses, a collision should never be a problem.
Actually, with those (albeit unrealistic) numbers you'd have generated quite a few collisions. ~3.5×1016 to be more precise, and even more if RIPEMD is not reversible.
Assuming RIPEMD-160 is a reversible function, there are 2160 possible addresses. Therefore, the likelihood any pair of addresses is a collision is 1/2160.
Here, we are theoretically generating 1011 (# people) × 1012 (# addresses/s) × 60 × 60 × 24 × 365 × 100 (time) addresses. That's around (exactly, actually) 3.1536×1032.
The number of address pairs for n number of addresses is n(n-1)/2. With so many addresses, n(n-1) is virtually equal to n2. So there are approximately 4.97259648×1064, but this approximation is off by something very insignificant.
Dividing by 2160, we will have quite a few (i.e. too many to count) colliding pairs.
2160 is big, but not that big.