a) One person had a basement illuminated by three electric bulbs. Switches of these bulbs are located outside the basement, so that having switched on any of the switches, the owner has to go down to the basement to see which lamp switches on. One day he came up with a way to determine for each switch which bulb it switched on, descending into the basement exactly once. What is the method?
b) If he goes down to the basement exactly twice, how many bulbs can he identify the switches for?