## May 10 Sidisi + Embalmer's Tools

This is the second time I've made an article about mathematics coming from Magic The Gathering. This one looks at two cards in one of my decks that have an interaction which was mathematically interesting. The first is this card from the most recent set:

The first ability isn't relevant, but the second is. Any Zombies that you have untapped can start putting cards from on top of your library (your deck) into your graveyard.

The second card is this one:

Once again it is the second ability that we are looking at. Any time a creature card is put into the graveyard from your library you can put a 2/2 Zombie creature onto the field. This means that you will have even more zombies which you can tap to put more more cards from your library into your graveyard, which may generate more zombies. This process can continue until you hit a none creature card. Then you may tap another zombie and start the whole process again.

The question is: how long is this process likely to go on? So for Z zombies at the start of your turn, how many zombies are you expected to end up with at the end of the turn?

My deck is played in a format called Commander where one card is your Commander (that would be Sidisi) that can be played at any point, while the other 99 cards form your library. Out of those 99, 30 cards are creatures in my deck. Let's begin by thinking about a situation with one zombie, Sidisi and the Embalmer's Tools on the field. We know nothing about which other cards have been played, so on average there will 30 creatures left out of 98 cards (because Embalmer's Tools is out of the deck at this point). There is a 30/98 chance of hitting a creature which nets you a zombie which you can then use to do the process again. This time there is a probability of 29/97 and so on. The expected value would be 30/98(1+29/97(2+28/96(3+...))) which has nested terms going on until the numerator hits 0. This is a job for a computer.

Here's a sheet that you can edit which will tell you the expected number of zombies gained when you have 1 zombie out in a deck with any number of creature cards. You can change the number from 30 in the top left to witness its effect on the number of zombies gained. On average you will gain about 0.615 zombies if you start with 1.

With multiple zombies on your turn this problem becomes much more problematic to solve explicitly and so we have to turn to simulation which I'm still working on. I'll post an update if I find get a result. For now, we can approximate the solution by just multiplying the result from 1 zombie (0.615) by however many zombies we start with. This isn't quite the actual answer because by the time you have removed some cards on your first run, the ratios of creatures to non-creatures has changed.

Update. Talking it through with one of my friends, he suggested that the overall answer would probably not be too different from if we had an infinitely large deck so that removing a card from it wouldn't change the ratios. This makes the probability always 30/98 and is much easier to work out. For 1 starting zombie and 30 creatures in the deck the new proximity worked out at 0.634 which is within 3% of the actual answer of 0.615. Changing the number of creatures to 50 was still within 5% so the approximation seems robust enough. The advantage to this is for multiple starting zombies we literally can just multiply by however many there are so it becomes trivial.