• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Tricky math problem

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
Originally posted by: Bigsm00th
Mark R does not need help with this. It is not a homework problem. You can give your answer if you know it.

I can't figure out how to determine how many permutations have one of each possibility after N rolls 🙁

After 6 rolls it's 6! I believe.
 
Originally posted by: Bigsm00th
Mark R does not need help with this. It is not a homework problem. You can give your answer if you know it.
Well in that case, the answer is 2 and 13. Afer 2 coin tosses it is exactly 50%. After 13 dice rolls it is 6711344640/13060694016, or 51.39%

 
Originally posted by: Kyteland
Originally posted by: Bigsm00th
Mark R does not need help with this. It is not a homework problem. You can give your answer if you know it.
Well in that case, the answer is 2 and 13. Afer 2 coin tosses it is exactly 50%. After 13 dice rolls it is 6711344640/13060694016, or 51.39%

Thank you, now explain it. 🙂 (the dice one that is)
 
Originally posted by: mugs
Thank you, now explain it. 🙂 (the dice one that is)
I set up an excel file for the calculations. Assume an N sided dice. After 1 roll, the probability of having 1 thing is 100%. The probability of having more than 1 thing is 0%.

After x rolls, the probability of having y things is
p(x,y) = p(x-1,y)*y/N + p(x-1,y-1)(N-y)/N

Think of it as a state machine. If you end up with y things, the previous roll either had y or y-1 things. p(1,1) is where the recursion bottoms out.

I didn't try to find a closed form solution.
 
2 and 13.

Congrats Kyteland. You get the congratulatory :cookie:

A slightly more mathematical description of the solution below; I thought this solution so elegant that I posted the problem because of it.

Part a) I hope this needs no explanation

b) A series of independent events in sequence can be represented by a Markov Chain model.

(1 value ---- 5/6 ----> 2 values ---- 4/6 ----> 3 values, etc.)

Represent this chain as a matrix.

M represents the state of the chain after 1 throw.

Let 6M =
{
0, 6, 0, 0, 0, 0, 0,
0, 1, 5, 0, 0, 0, 0,
0, 0, 2, 4, 0, 0, 0,
0, 0, 0, 3, 3, 0, 0,
0, 0, 0, 0, 4, 2, 0,
0, 0, 0, 0, 0, 5, 1,
0, 0, 0, 0, 0, 0, 6 }

The probability of obtaining at least one of each value is given by M[1,7] (top right cell).

The state of the chain after later throws can be obtained by exponentiating M.

Thus, we must find n for M^n [1,7] >= 0.5.

This must be solved numerically.
 
Originally posted by: mugs
Originally posted by: DrPizza
Wow, I'm tempted to, but I *really* hate these types of problems. (and probability in general)
I hate probability problems.

(in case this is a homework assignment, I'm not giving away the answer, just a suggested path.)
Obviously, it has to be at least 6 rolls of the die.
After 6 rolls, what's the probability that at least 2 of the rolls came up the same?
After 7 rolls, what's the probability that at least 2 of the rolls came up the same?
-once you get 50% (or the closest number less than 50%) you have your answer.

I can see why you hate these problems. 😉 After 7 rolls, the probability that at least 2 of the rolls came up the same is always 100%.

The situation you described is the opposite of the situation the OP describes only for the case where the number of rolls is 6.

ughhhh, that was a stupid mistake I made! 🙂
(I got to thinking that it was the opposite situation of the birthday problem, but the birthday problem would show the method which could be adapted to solve this one; then I stopped thinking)
 
Originally posted by: Mark R
a) How many times must you flip a coin so that you have at least a 50% chance of tossing at least 1 head and 1 tail?

Answer is infinite for this one.

b)How many times must you throw a normal gaming die (six sided) so that you have at least a 50% chance of throwing at least one of each value?

Answer is infinite for this one.
 
Back
Top