system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: what kind of math, if any, is behind traffic lights especially in major cities? Is it a difficult process to time them in sync with surrounding lights to make sure there are no huge back ups?
gpt
Traffic engineers have models that incorporate any new lights into the existing network of traffic lights. Traffic light timing is done both to synchronize the lights with the surrounding network, but also to ensure that people don't have to wait too long at the lights.

So there's lots of math behind it, but it's mostly done with computer programs.