ECE 450S : Tutorial Week 3

Description of the problem.  This specification describes the controller for managing the traffic lights and turn at a particular intersection, depicted in Figure 1.  Traffic can move along this road going northbound (N), southbound (S),  and eastbound (E) (east to north or east to south).  In addition, northbound traffic can turn left, and southbound traffic can turn right.   There is a set of traffic light controlling all northbound, southbound, and eastbound lanes.  There are no special arrows for turns, and they can be made under the following condition:  southbound and eastbound traffic can turn right on regardless of the light, as long as there are no cars.   East to north and south to west traffic can make their left turn if the corresponding light (E, N) is green and there are no cars in the intersection.
   Figure 1.
Your goal is to architect the system that would ensure traffic safety.