# Thanoseses

I saw this tweet:

and my first thought was, “Let’s see, so if each destroys half of all life…”

Or am I getting my pop culture mixed up? Well. Suppose we did have a line of, say, 63 Thanoses. Thani? Thanoxen? Something. One by one they snap their fingers and each time, half of all life is destroyed. You end up with $1/2^{63}$ of all life surviving. About 1.1E-19. Good luck surviving that.

But wait, that’s wrong. The first Thanos snaps and half of all life is destroyed… including half of all Thanoses. Of the 62 who haven’t snapped yet, now there are only 31 of them. After two snaps there are 15 who haven’t snapped. After three there are 7, after four there are 3, after five there is 1. That one snaps and we’re done. The surviving fraction is $1/2^{6} \approx 1.6\%$. Your odds still aren’t good but they’re enormously better.

6 is $\log_2(63+1)$; the surviving fraction is $1/2^{\log_2(64)} = 1/64$, or $1/2^{\log_2(n+1)} = 1/(n+1)$ for $n$ initial Thanoses.

Well, but not exactly. Presumably this is a random, probabilistic thing. On average half of all Thanoses die on each snap, but there’s some probability they all survive, and some probability they all die. If they all die on the first snap, $1/2$ of us survive; if they all survive every snap, $1/2^n$ of us die. The former is a lot more likely than the latter, though.

I wrote a little Python script and got this distribution of survival fractions with 64 initial Thanoses: [edited after bug fix]

FractionNumber of times
1/4 or more0
1/8671
1/1654,214
1/32343,104
1/64430,491
1/128152,643
1/25618,035
1/512832
1/102410

So, good news, in the worst case there still are several million people alive. Just probably not you.