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

Home > Probability
Dice Roll Resolution (Posted on 2016-09-08) Difficulty: 3 of 5
Consider an eight-sided die numbered 1 to 8 which is loaded in such a way that the probability of each face turning up is proportional to the number of dots on that face. For example, a six is three times as probable as a two.

The die is rolled until a run of 8 different faces appears. For example, one might roll the sequence 6565742726486467483472516 with only the last eight rolls all distinct.

(i) What is the expected number of rolls for the above event?

(ii) How will the answer change if the last 8 rolls was required to produce 12345432 (strictly in this order?

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Actual part i simulation | Comment 2 of 4 |
A simulation of the problem presented (part i) finds an average of about 2000 rolls to be necessary, using the non-uniform distribution:


DefDbl A-Z
Dim crlf$, denom(36)


Private Sub Command1_Click()
  Form_Load
End Sub

Private Sub Form_Load()
 Form1.Visible = True
 
' Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 digs$ = "12345678"
 For i = 1 To 8
  For j = 1 To i
   subs = subs + 1
   denom(subs) = i
  ' Text1.Text = Text1.Text & subs & Str(denom(subs)) & crlf
  Next
 Next
 Randomize Timer
 tCt = 0: tTr = 0
 For trial = 1 To 1000
    had$ = "": good = 0
    Do
     DoEvents
      r = denom(Int(Rnd(1) * 36 + 1))
      had = had + LTrim(Str(r))
      If Len(had) >= 8 Then
         good = 1
         rt$ = Right(had, 8)
         For i = 1 To 8
           If InStr(rt$, Mid(digs, i, 1)) = 0 Then good = 0: Exit For
         Next
      End If
    Loop Until good
    tCt = tCt + Len(had): tTr = tTr + 1
 Next
 
 
 Text1.Text = Text1.Text & crlf & tCt / tTr & " done"
  
End Sub


Averages of 1000 trials each:

1936.804 done
2131.657 done
2016.968 done
2138.565 done
1988.753 done
2007.053 done
1965.55 done
1980.193 done
1996.846 done
2051.373 done

The average of these, representing 10,000 trials, is 2021.3762.


  Posted by Charlie on 2016-09-08 13:11:57
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

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