I am trying to understand how to write a general equation for a math problem that came up during a recent game of Warhammer 40k.
The question is: Assume you start with a set of 10 regular 6-sided dice. The entire set of dice will be rolled simultaneously. Any of the dice that roll to a 6 will be removed from the set, and the remaining dice will be re-rolled. This will repeat until there are no dice remaining. How many rolls, mathematically, should this process take?
At first thought I was under the assumption that this would be similar to a binary search algorithm, but rather than decreasing the initial set size by $\frac 12$ per iteration, it would decrease only by $\frac 16$, though I keep coming up with answers that are clearly incorrect (huge numbers, negative numbers.)
What would be the most appropriate way to generalize an equation for this problem for a set of $N$ regular 6-sided dice?
Your intuition is reasonable. The expected number of dice is reduce by a factor $\frac 56$ each roll, so you could ask the number of rolls to get the expected number of dice below $1$. That gives $$10\left(\frac 56\right)^n \lt 1\\n\approx 12.6$$ so you should expect to average $13$ rolls but that is very rough.
A more careful approach is to work upwards. You expect $6$ rolls if you start with one die. If you start with two dice you have $\frac 1{36}$ chance of getting two sixes and being done. You have $\frac {10}{36}$ chance of getting one six and being at one die. You have $\frac {25}{36}$ chance of getting no sixes and being back where you started. If $x$ is the expected number of rolls starting with two dice you then have $$x=\frac 1{36} \cdot 1 + \frac {10}{36} \cdot 7 +\frac {25}{36}(1+x)\\ x=\frac {96}{11}\approx 8.73$$ You can keep going with this to get the expected value for ten dice, but the calculations get long.