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

Home > Probability
Hexagonal Spider Web (Posted on 2019-09-12) Difficulty: 4 of 5
A spider has its web in the shape of a regular hexagon. A fly is stuck to the web at a vertex that is diametrically opposite from the vertex at which the spider is. The spider can walk freely along the edges of the hexagon. At each vertex, it randomly chooses between walking on one of the two adjacent edges or staying at the vertex, all three choices with equal probability. If the time it takes to travel an edge is 5 seconds, while the waiting time at a vertex is 2 seconds, find the expected time it will take the spider to get to the fly?

Note: At the end of a waiting period at a vertex, a new random decision to stay at the vertex, or move along one of the two edges is made, with equal probability for the three choices.

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re: my solution | Comment 5 of 7 |
(In reply to my solution by Charlie)

I wrote my own simulation in VB, and it disconfirms my answer, and confirms the 54 seconds found by others:

DefDbl A-Z
Dim crlf$
 

Private Sub Command1_Click()
  Randomize Timer
  t = 0
  For trial = 1 To 10000
     psn = 3
     Do
      r = Int(3 * Rnd())
      Select Case r
       Case 0
         t = t + 2
       Case 1
         t = t + 5
         psn = psn + 1: If psn = 6 Then psn = 0
       Case 2
         t = t + 5
         psn = psn - 1: If psn = 6 Then psn = 0
      End Select
     Loop Until psn = 0
  Next
  Text1.Text = Text1.Text & t / 10000 & crlf
End Sub

Private Sub Form_Load()
 Text1.Text = ""
 crlf$ = Chr(13) + Chr(10)
 Form1.Visible = True
   
  Text1.Text = Text1.Text & ct & " done"
  DoEvents

End Sub

Some results of pressing the command button:

53.6584
54.6874
53.9702
54.4232
53.952
53.8928
53.7086
54.1006
53.8418
54.3884
53.6232
54.4604
53.8686
52.8786
54.296
54.2954
53.7354
53.8378
53.4062
53.666
53.574


  Posted by Charlie on 2019-09-12 19:03:28
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 (17)
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