This Is a Certified Answer

Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
See the diagram.  It shows the 4 possible positions of the two electric switches and the transition from one state to the next. 

The two ends of the switches are interconnected permanently.  The neutral is connected permanently to one switch S2 and the live hot line is connected to one switch S1.  On toggling any switch the bulb changes its state of off or on.

One switch is installed on one floor and the other on another floor for the bulb in the middle. Same is done for a long corridor or a hall.