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

Home > Logic
Traffic Calming (Posted on 2005-02-17) Difficulty: 3 of 5
You are travelling at a constant speed along a road. There are 5 sets of traffic lights along this road, and they all start their sequence at the same time as you pass the zero mile marker.

At what speed do you need to travel in order to remain at your constant speed?

    traffic light 1 at 3 miles is red for 36 secs and green for 22 secs.
    traffic light 2 at 4 miles is red for 28 secs and green for 40 secs.
    traffic light 3 at 6 miles is red for 41 secs and green for 17 secs.
    traffic light 4 at 7 miles is red for 62 secs and green for 15 secs.
    traffic light 5 at 9 miles is red for 46 secs and green for 25 secs.

Note, the speed is an integer, above 25 and below 100MPH.

See The Solution Submitted by Juggler    
Rating: 4.2500 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Answer (spoiler) | Comment 1 of 12

47 MPH

I made a spreadsheet with column labels:
Light#, Distance, Arrival time (assuming all lights green), red time, green time, cycle time, number of seconds into the current cycle, and finally IF(time into cycle > cycle time, "Green","Red")

Then I manually changed the speed until all 5 were Green.
47 was the only one between 25 and 100

edited to show formulae
Arrival time = 3600 * Dist / Speed
cycle time = red time + green time
number of seconds into the current cycle =
     Arrival time - Cycle time * int(Arrival time / Cycle time)

Edited on February 17, 2005, 2:10 pm
  Posted by Larry on 2005-02-17 14:04:26

Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (2)
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

Copyright © 2002 - 2020 by Animus Pactum Consulting. All rights reserved. Privacy Information