<s>[INST] Expected rolls to roll every number on a dice an odd number of times Our family has recently learned how to play a simple game called 'Oh Dear'. Each player has six playing cards (Ace,2,3,4,5,6) turned face-up, and take turns to roll the dice. Whatever number the dice rolls, the corresponding card is turned over. The winner is the player to turn all their cards face down first, but if you roll the number of a card that has been turned face-down, then that card is turned face-up again (and you say 'Oh Dear!').
I want to work out the expected length of a game (in rolls of the dice). I'm interested first in working this out in the case of a single-player playing alone, and then also in the question of how the answer changes with multiple players. This is equivalent to working out the expected number of times a player must roll the dice to have rolled every number on the dice an odd number of times. (I assume a fair six-sided dice, but again would be interested in a more general solution too).
It is simple to work out the odds of winning as quickly as possible from any position, but I'm not sure how to go about calculating the expected number of rolls before a player would win...
 [/INST] I think I've found the answer for the single player case:
If we write $e_{i}$ for the expected remaining length of the game if $i$ cards are facedown, then we can work out that:
(i). $e_{5} = \frac{1}{6}(1) + \frac{5}{6}(e_{4} + 1)$
(ii). $e_{4} = \frac{2}{6}(e_{5} + 1) + \frac{4}{6}(e_{3} + 1)$
(iii). $e_{3} = \frac{3}{6}(e_{4} + 1) + \frac{3}{6}(e_{2} + 1)$
(iv). $e_{2} = \frac{4}{6}(e_{3} + 1) + \frac{2}{6}(e_{1} + 1)$
(v). $e_{1} = \frac{5}{6}(e_{2} + 1) + \frac{1}{6}(e_{0} + 1)$
(vi). $e_{0} = \frac{6}{6}(e_{1} + 1)$
(vi) and (v) then give us (vii). $e_{1} = e_{2} + \frac{7}{5}$;
(vii) and (iv) then give us (viii). $e_{2} = e_{3} + \frac{11}{5}$;
(viii) and (iii) then give us (ix). $e_{3} = e_{4} + \frac{21}{5}$;
(ix) and (ii) then give us (x). $e_{4} = e_{5} + \frac{57}{5}$;
(x) and (i) then give us $e_{5} = 63 $
We can then add up to get $e_{0} = 63 + \frac{57}{5} + \frac{21}{5} + \frac{11}{5} + \frac{7}{5} + 1 = 83.2$.
Now, how would one generalize this to find the expected length of game with $n$ players?
</s>