Questions   
Sort: 
 #5
avatar+33661 
+5

I interpreted it as "at least two red lights in a row".  

When I tackled the problem first I came up with some reasoning that produced a value of 0.309.  However, when I checked with a Monte-Carlo simulation I consistently got higher values close to 0.325.  When I repeated the problem with just 4 lights I got consistent answers for both methods!  However, I tend to believe my Monte-Carlo approach, because it was very simple (see my explanation below), so I modified my "reasoning" to give the result I came to above, matching the MC approach (there was no real "reasoning" involved, I just adjusted it to get 0.325).

 

Monte-Carlo approach.

1. I randomly selected 5 numbers between 0 and 1 to represent the signals of the five traffic lights.  If the value was less than 1/3 I designated this as a red light. 

2. I then went from traffic light to traffic light in order to see if there were two consecutive lights that were red.  If there were I incremented a counter (c, say) If there weren't I left the counter unchanged (the counter started at 0).

3. I only incremented the counter after the first two consecutive red lights and ignored any further consecutive red lights, because I was looking for "at least two".  (So, for example, sequences like "red, red, red, green, yellow" and "red, red, green, red, red" only counted once not twice.)

4. I repeated that process thousands of times, n times, say (a hundred thousand times, in fact).

5. I then divided the value of the counter by the number of times I did it to get the probability (= c/n).

 

Needless to say, I wrote a simple program in Mathcad to do this, and ran it several times, always getting a value close to 0.325.  

 

There is no guarantee my MC calculation is right though!

.

Apr 29, 2015

2 Online Users

avatar