# Which switch is faulty?

How to solve this puzzle?

This puzzle is taken from the book The Ultimate IQ Test Book by Philip Carter and Ken Russell.

Well

If everything's working, all lights are toggled twice

So the switch that isn't working is

The switch that toggles only 3/4, leaving them with an odd number of toggles. This is Switch D.

• Hmmmm, I suppose the real challenge is finding the catch.... Cause there must be a catch but no matter how hard I think, I cannot find one.... It seems hard to believe that something that could be solved by a 8 year old would be considered a "ultimate IQ test" – stack reader Nov 17 '16 at 15:12
• It's only number 29. Maybe it ends up being that your IQ is the lowest number you don't get right. ;-) – Rubio Nov 17 '16 at 15:23

I'll use a Truth table to solve it: $0$ representing off, and $1$ representing on. Note that the switches are basically inverters.

Initial State:

$[1,1,1,1]$
Apply $D$ $[1,1,0,0]$
Apply $C$ $[0,1,1,0]$
Apply $A$ $[1,0,1,0]$
Apply $B$ $[1,1,1,1]$
Real output: $[1,1,0,0]$
Bulbs $1$ & $2$ are correct. This likely means the bulbs that worked on them are working. I.e $A,B,C$ are working. $D$ should be the faulty one. I can verify this, by rerunning the sequence omitting $D$
$[1,1,1,1]$
Apply $C$ $[0,1,0,1]$
Apply $A$ $[1,0,0,1]$
Apply $B$ $[1,1,0,0]$
This gives us the final value.
$\therefore D$ is the faulty switch.
$Q.E.D$