Chapter 8: Problem 49
Find the expected waiting time in traffic lights. A driver must pass 10 traffic lights on a certain route. Each light has a period red-yellow-green-yellow of two minutes, of which the green and yellow lights last for 70 seconds. Suppose the driver arrives at a traffic light at some uniformly distributed random point of time during the period of two minutes. Compute the corresponding waiting time. Repeat this for 10 traffic lights. Run a large number of routes (i.e., repetitions of passing 10 traffic lights) and let the program write out the average waiting time. Does the computed time coincide with what you would expect? Name of program file: waiting_time.py.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.