Ok, you nerdy kids, here is a math problem

Real world problem we encountered during our road trip.

In the forest with two lane road, one for each direction, there is a road work. So they shutdown one lane and setup lights on both ends to allow only traffic of one direction at a time.

Assuming we can not use advanced technologies such as cameras, sensors etc, but with only fixed timers.

How would you design the time control?

1 Like

What exactly should we try to optimise here? Should we aim to minimise the expected time to pass the bottleneck for all drivers?


You are overthinking it, genius. :joy:

You can interpret the question however you want. Write your assumptions.

The simplest scenario would be to allow traffic to safely flow.

Construction worker strike. :woman_shrugging:


Without information on the distribution of the number of cars in each direction, I believe we have to use a schema along the lines of “Let first direction drive through for time t, then switch to the other direction for the same time frame and repeat”. No idea what would be a good value for t, maybe like 2 - 3 minutes?

If we do have more information, maybe there is something better. Assume there is a city nearby in one direction and countryside in the other. Then we should consider commuting people. Maybe around 5 pm there are many drivers that come from the direction of the city and only few in the other. If this is the case every weekday, we should slightly change the timers during this time such that more traffic can flow in the direction away from the city.

So I’d start with the first option and order one of my subordinates to collect data on the number of drivers in each direction, depending on the time of day :stuck_out_tongue_winking_eye:


Please write down ur time spent solving the problem

Ur either a prof or politician, lol

I guess I’m a nerdy kid :man_shrugging:


Assume the traffic flow under normal conditions is the same in both directions: N cars per second.

The roadwork is between points A and B. Let τ be the interval of time needed to go from point A to point B.

For T seconds the traffic light is green at A and red at B.
Then for about τ seconds all traffic lights are red.
Then for T seconds the traffic light is green at B and red at A.

When cars move from A to B, the flow is N’ cars per second. Hopefully N’>2N.

During the interval of time T, the number of cars which pass traffic light A is N’T.

On the other hand the period is 2(T+τ), during which 2N(T+τ) cars reach traffic light A.

So I think N’T = 2N(T+τ) is optimum, i.e. T = (2N τ) / (N’-2N).


If this is the real world we are talking about then it is practically impossible to predict traffic congestion and flow and, at the minimum, at least very challenging to predict how changes in these factors need to be taken into consideration. There is too much variation.

In my opinion, the smartest option here is good old-fashioned traffic people, not sensors, lights, timer’s etc. This way is the safest because only people can safely observe these factors real time and make the safest possible choice. Thus, the timing for each side of traffic would not be equal, but it would be the safest choice for planning and making changes. Really bad things happen when equipment and timers malfunction in these scenarios, no matter how seemingly reliable the system is.

Of course, this is a person that would need to be paid well and it would be a dangerous position for them (as is for all roadwork people). But it is the only way I have ever seen this job done and I can see why.


It’s in a FOREST without wireless signal

Oh no the workers won’t be able to watch the super bowl live on their mobile phones! :scream:


I’ve spent a minute or so and have concluded this is an ill-posed problem and the person asking the question isn’t really interested in the answer :slight_smile:


Oh no the workers won’t be able to play games on OGS!


Have you considered the fact that two-way radios exist, and are heavily used in construction all the time already? These don’t rely on external service, and is exactly how this sort of thing is handled currently.


What about at night when construction workers are gone?

Humans may not be the best to solve such problems. Better ask an AI.


“First, we posit a frictionless car moving along a frictionless plane…”


The simplest answer would be: red light time = green light time + 2 times the driving time between the two lights

1 Like

Your answer is incomplete…