All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 One 1 to Six 6's (Posted on 2015-07-01)
A standard six-sided die is to be rolled repeatedly until a side appears a number of times equal to its number. In other words until the n-th n appears.

Let P(n)=the probability the game terminates with the n-th n.

Find the distribution of n.

Feel free to generalize for m sides.

Warning: I have not managed this past m=4.

 No Solution Yet Submitted by Jer No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 re(2): computer aided solution | Comment 5 of 14 |
(In reply to re: computer aided solution by Jer)

`With a 2-sided die, of course it's1  0.7500000000000  3/42  0.2500000000000  1/4which took VB 5 just 15 ms.With a 3-sided die:1  0.7037037037037  19/272  0.2222222222222  2/93  0.0740740740741  2/27and again just 15 ms.A 4-sided die:1  0.6921386718750  2835/40962  0.2150878906250  881/40963  0.0700683593750  287/40964  0.0227050781250  93/4096(16 ms)5-sided die:1  0.6890106880000  1345724/19531252  0.2130877440001  416187/19531253  0.0689024000000  5383/781254  0.0220866560000  43138/19531255  0.0069125120000  13501/1953125(47 ms)And again the 6-sided die:1  0.6881516453401  8987738063/130606940162  0.2125194475337  925217159/43535646723  0.0685578584217  895413211/130606940164  0.0218963008044  285980885/130606940165  0.0068166367662  9892223/14511882246  0.0020581121476  26880373/13060694016(explodes to 140 full seconds, 4 seconds faster than the original hard-coded 6)`

For a number of sides greater than 6, there are two problems:

1. The time will probably explode again.
2. The version of Visual Basic I use (5.0) has long integers that can go up to only 2 meg (just over 2 million) in value. I understand that later versions of VB have 8-byte long integers, but I don't have any later version. The current program gets around this, for the exact values, by using double precision floating point rounded to integer values; but a 7-sided die would require, for exact values, integers up to 7^22 (a 19-digit number) as the procedure could take up to 22 rolls to come up with a resolution, and double precision floating point has only about 16 decimal digits of accuracy. And running it in interpreted UBASIC would take "crazy long" time.

 Posted by Charlie on 2015-07-02 09:09:49
Please log in:
 Login: Password: Remember me: Sign up! | Forgot password

 Search: Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2019 by Animus Pactum Consulting. All rights reserved. Privacy Information