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

Home > Probability
Lighthouse Kerfuffle (Posted on 2023-12-02) Difficulty: 3 of 5
Some time has passed since Lighthouse Crossed Three Lights Muse and each lighthouse has developed a glitch. Now, instead of switching off when it should, the light will (50% of the time) stay on for an extra time period.
The extra time is exactly 1 second for the 1st lighthouse, exactly 2 seconds for the 2nd, and exactly 3 seconds for the 3rd.

In summary:
- The first light shines for 3 or 4 seconds, then is off for 3 seconds.
- The second light shines for 4 or 6 seconds, and then is off for 4 seconds.
- The third light shines for 5 or 8 seconds, then is off for 5 seconds.

What is the expected value of the first time all the lights will be off at the same time?

No Solution Yet Submitted by Larry    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts this is what I get Comment 2 of 2 |
totTime=0;
for trial=1:10000000
  LOn= true(1,3);
  LTime=zeros(1,3);
  t=0;
  while sum(LOn)
    t=t+1;
    for wh=1:3
      LTime(wh)=LTime(wh)+1;
      if LOn(wh)
        if LTime(wh)==wh*2+2
          LOn(wh)=false; LTime(wh)=0;
          continue
        end
        if LTime(wh)==wh+2 && randi(2)==1
          LOn(wh)=false; LTime(wh)=0;
          continue
        end
      else
        if LTime(wh)==wh+2
          LOn(wh)=true;
          LTime(wh)=0;
        end
      end
    end
  end
  totTime=totTime+t;
end
totTime 
totTime/trial

produces

>> lighthouseKerfuffle
totTime =
   151704035
ans =
                15.1704035
>> 

indicating an expected timeof 15.17 seconds.

  Posted by Charlie on 2023-12-03 08:51:53
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 (3)
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