2011-08-16, 05:39 AM
Say you have a 6 sided die and you want to generate a string of 6 non-repeating numbers. To do this, for each of the the six numbers you roll the dice, if the number it rolls hasn't appeared yet in the string you keep it, otherwise you reroll it.
So say, you roll for the first time and you get 4, it hasn't come out yet (because it's the first roll anyway) so you keep it.
Next roll, if the number 4 comes up you reroll, otherwise you keep the number and it's the second number, say 2.
For the 3rd roll, you reroll if the numbers {2;4} come up, and so on.
My question is, how many times would you need to roll the dice on average to get that string of numbers?
So far I've come that the number would be the quintuple sum:
(sum i=1 to infinity)(sum j=1 to infinity)(sum k=1 to infinity)(sum l=1 to infinity)(sum m=1 to infinity)[(5/6^i)*(4/6^j)*(3/6^k)*(2/6^l)*(1/6^m)*(1+i+j+k+l+m)] corrected
But I have no idea how to solve those, seems like I would need to break them up into 5 separate sums and then analyze the product of sums in each of them. But I'm kind lost on how to evaluate the infinite sum of i*(a^i), where |a|>1
Found the reduced form of that kind of sum: a/((a-1)^2)
Now it's just handwork and I'll get this done, brb.
Does anyone have any light for me?
This is just some random fun problem I came up myself.
Basically it breaks down to:
sum [(1/6+Z/(1-Z))*(1/((1-5/6)(1-4/6)*(1-3/6)*(1-2/6)*(1-1/6))] for Z={1/6;2/6;3/6;4/6;5/6}
So my math says it should be on average 628.56 rolls, seems a little too many rolls to see all 6 sides of the dice.
So say, you roll for the first time and you get 4, it hasn't come out yet (because it's the first roll anyway) so you keep it.
Next roll, if the number 4 comes up you reroll, otherwise you keep the number and it's the second number, say 2.
For the 3rd roll, you reroll if the numbers {2;4} come up, and so on.
My question is, how many times would you need to roll the dice on average to get that string of numbers?
So far I've come that the number would be the quintuple sum:
(sum i=1 to infinity)(sum j=1 to infinity)(sum k=1 to infinity)(sum l=1 to infinity)(sum m=1 to infinity)[(5/6^i)*(4/6^j)*(3/6^k)*(2/6^l)*(1/6^m)*(1+i+j+k+l+m)] corrected
But I have no idea how to solve those, seems like I would need to break them up into 5 separate sums and then analyze the product of sums in each of them. But I'm kind lost on how to evaluate the infinite sum of i*(a^i), where |a|>1
Found the reduced form of that kind of sum: a/((a-1)^2)
Now it's just handwork and I'll get this done, brb.
This is just some random fun problem I came up myself.
Basically it breaks down to:
sum [(1/6+Z/(1-Z))*(1/((1-5/6)(1-4/6)*(1-3/6)*(1-2/6)*(1-1/6))] for Z={1/6;2/6;3/6;4/6;5/6}
So my math says it should be on average 628.56 rolls, seems a little too many rolls to see all 6 sides of the dice.

