The design specifications of the traffic light controller are:
The controller is for an intersection of a highway and a
farm-road.
A priority is given to the highway, i.e. the light for the
highway is normally green.
All changes from green to red go through a 5 second
yellow interval.
If a car is sensed on the farm-road during highway's green
period, it changes the highway to red (through yellow period).
However this happens after 30 seconds have past on highway's
green period.
The green light on the farm-road is limited to 30 seconds.
Even before the limit, no car sensed on the farm-road finishes the
green period on the farm-road.
Specifications above were converted into the state transition diagram
(Figure 0.1), with the description of each state in
Table 0.1. t30 and t5 mean expiration of 30 and
5-seconds time periods, respectively. Also fr stands for
a car is sensed on the farm-road.
Figure: State Transition Diagram of the Traffic Controller