Cruel Traffic Light
I have to drive past the same crossroad almost every single day. Obviously I stop at the longest-lasting traffic light of the crossroad. Within time I started loving these moments because it gave me a chance to think my life over. Though, it doesn’t take too long for me to start thinking about mathematics.
One of those days I found myself questioning the traffic lights and their relationship with mathematics. (After all mathematics is everywhere; isn’t it?) Soon after I realized that there was my beloved graph theory behind traffic lights.
Let’s assume a one-way street with two traffic lights: One for the vehicles (we’ll call it A), other for the pedestrians (we’ll call it B):
In such situation we have to avoid accidents. This means whenever A has green light, B must have red light and vice versa. We will not take account of the situation when both lights are red. Because even though there won’t be any accident, neither of the sides will be standing still (which is nonsense):
All these can be shown using graph theory: Lights will be represented by dots. Dots in a graph will be connected with lines if they are not in the same color:
Same thing can be shown with maps: If A and B are two neighboring countries, they should be colored in different colors to avoid confusion:
This time we will assume a two-way street with three traffic lights: Two for the vehicles from opposite sides (we’ll call them A and B), and one for the pedestrians (we’ll call that C):
In such a situation when C is red, either or both of A and B should be green. When C is green, then both A and B should be red:
We’ll skip the situation where all three of them are red as no one would move in such situation.
We can show these using graph theory and map coloring as follows:
Since we set all the rules graphs make it much easier and clearer to understand the situations.
Finally we have a two-way street (A and B), a right turn (C) and two pedestrian lights (D and E) as follows:
This time it is a much complex situation:
Although using graph theory makes it all easier for us to understand:
How Many Colors?
We will color the following graphs using the same rules we just established above: If two dots are connected with a line, then those dots must have different colors.
Chromatic Numbers: Whenever a graph is being colored, ambition is the use the least number of colors. This number is also known as the chromatic number of a graph.
Here we need 3 colors. Hence chromatic number of the graph is 3. Let’s add one more dot and line to the graph:
This time chromatic number of the graph becomes 2. We’ll add another dot and line:
Now chromatic number becomes 3 again. Let’s add a dot and a line for the last time:
Chromatic number is back to 2.
To be continued…
What did just happen? What did you notice? Why is it happening?
How can you increase the chromatic number?
M. Serkan Kalaycıoğlu