I'm not sure where I first saw this -- maybe even in this forum, long ago.

You are standing outside a room. The door to the room is closed. On the wall next to the door, outside the room, are two light switches. You are told that there are two light bulbs in the room, one controlled by each switch. But you are not told which switch controls which bulb. Nor are you told whether either switch is on when up and off when down, or vice versa.

The door is opaque, and weather-stripped at the bottom, so from outside the room with the door closed, you cannot tell whether any lights are on or off. There are no other doors, windows, trap doors, or any other openings through which you could enter the room or look inside.

The bulbs are ordinary old-fashioned incandescent bulbs, which light up and go dark instantly when they are turned on or off. It takes at least ten seconds for a bulb to become hot or cool when it is turned on or off.

The rules of the game are:

First, operate each switch as many times as you like. Then open the door and go into the room, observing whatever you see or feel, but do not break anything, unplug anything, unscrew any bulb, cut any wires, etc. Then leave the room and close the door.

Repeat this entire procedure as often as you need to.

What is the minimum number of switch operations, trips into the room, and bulb touchings necessary to determine which switch controls which bulb, and whether each switch is on-up off-down or vice versa?