How can three three-way switches (single-pole, double-throw) be wired so that each of them can switch a...
physics/three.way.switches New
New entry, edited from material collected for the archive and not yet in a released version.
Problem
How can three three-way switches (single-pole, double-throw) be wired so that each of them can switch a lamp on or off? There is an old puzzle that asks how to wire three three-way switches in such a way that each of them can switch on or off a lamp. I read about it at least 30 years ago. This is NOT the puzzle about the three switches that you find everywhere. In fact, the wiring is not trivial - it is not an easy puzzle. I saw the solution once, but cannot find it anywhere. The puzzle is to find a 3 x "3-way switch" solution; the easy 2 x "3-way" plus 1 x "four-way" switch wiring is not what I am looking for. (And no electrical regulations should be followed; if I remember correctly, both ends of the lamp are switched.) -- Heinz <heinrich_neuma...@yahoo.com>
Show solution
[ Editor: the collected copy of this thread (Google Groups, about 2006) has lost its line spacing and most of its attributions; the contributions are given in their original order, separated by blank lines, with names where the copy gives them. ] Keith Lewis: > I'm not sure I understand exactly what you mean by "3-way switch". This is a common usage where I live: it means a single-pole, double-throw switch. That's the kind used in pairs in household wiring when you want a light that can be turned on or off from each of two positions. In a triumph of idiom over logic, the same device is also commonly called a "two-way switch". (To be fair, it does have two positions and three terminals.) A "four-way switch" in the same terminology is a double-pole, double-throw switch with two pairs of its six real terminals permanently connected, giving the effect that in one position it connects terminals A to B and C to D, and in the others, A to C and B to D. These can be used together with a pair of three-way switches to give additional positions where a single light can be turned on or off: 3-way 4-way 3-way ------ ------ ------< X >------ light power ------ ------ | supply | ------------------------------' [ Editor: the diagram is as collected; its spacing was lost. ] Heinrich's reference to a "4-way switch" shows that this is indeed the terminology he's using. He's asking for a way to achieve the same effect using three 3-way (single-pole double-throw) switches only. Well, I've been dealing with toggle switches for <mumble> years, and the only classifications I ever heard of were 1/2/3 Pole single/double throw, with double throw possibly modified by center-off. Some throws could be momentary. Make before break is unusual, but make after break is usual (and generally safer). SPST, SPDT, DPST, DPDT, 3PST, 3PDT ... all can have momentary action. DT can have optional center off. Another rarity is triple throw, ie. DP3T. P counts common connections, T output connections per pole. Rotaries are another story. The terms "three way" and "four way" are used in the home electrical wiring industry only. My father learned electricity through apprenticeship and in turn I started out as a kid learning the common terms that electricians used. Back when he started most all electrical work was what we now call residential and industrial electricity was just beginning to use a different set of terms. For 99 out of a 100 "electricians" those terms were unheard. Most of the terms that have become standard now come from the industrial side where the guys making the drawings were those that learned terminology from going to college. In turn, those that taught the courses often were recruited from the current workforce and blended in some of the old terms with the more proper ones. [...] I stated earlier in this thread that I had seen the solution to this puzzle somewhere in the past but could not remember exactly what it was. I have been trying to jog my memory and doodle on paper a bit to see what that might show. In trying to make a circuit, I see again what keeps it from being possible and do now remember more about the solution. You can't do it with just three SPDT switches. There was something more and it might have had to do with terminology. I did come up with one configuration that works but you have to reset the breaker in one switch position. I don't think that counts. <grin> [ Editor: the "[...]" above replaces an off-topic paragraph about the words "condenser" and "three conductor" wire. ] [ Editor: the next contribution begins mid-sentence in the collected copy. ] haven't yet managed to achieve the clarity of thought to formulate a formal proof, but I think that it's self-evidently impossible. For every switch to be effective each node must connect one switch terminal to one and only one other (including the connections via the lamp and supply). It's obvious that every switch must be fully connected and multiple connections are not allowed, since this would lead to more than one switch controlling the same element of the current path. Hence, because terminals must be connected in pairs, the total number of terminals must be an even number. Thus 2xSPDT switches are allowed (6 terminals) and 2xSPDT plus any number (n) of DPDT changeover switches (4n+6 terminals) but 3xSPDT switches cannot work (9 terminals), since there will always be one terminal that remains unconnected however the switches are arranged. Clearly, whilst this is a necessary condition, it is not sufficient to define a multiple switching network, since every possible current path must also pass through every switch. I believe that this additional condition will forbid networks containing more than one pair of SPDT switches, but I cannot prove that assertion. Again, not rigorous, but to continue your train of thought, an SPDT switch permits two possible current paths. To permit either of these two paths to be usable, both paths must pass through all other switches. For "three way" read "single pole, double throw." A part of a larger proof that there is no solution. The missing parts are mumbled about in <these>. <need proof that putting switches on both sides of light does not help> Consider putting all the switches on one side. So you need to connect or break the connection between two wires. (rest)----1 (switches go here) 2----(rest) Let the three connections on a SPDT switch be A, B, and X. A and B are the sides, X the centre. The switch connects A to X, or it connects B to X, but not both. And you can connect wires to A, B, and X. Consider the case that no X is connected to 1. Something has to connect to 1, or there is no circuit. Say S1 has its A connected. When S1 connects X1 to B1, there still has to be a circuit, so with no X connected to 1 we must have A1, A2, and A3 all connected. (Insert the phrase "without loss of generality" here as required.) Note that we can't have both A1 and B1 connected to 1, because then the switch S1 would not do anything, and could never turn the light off. Consider now the subcase that no X is connected to 2. By the same reasoning, we must have B1, B2, and B3 all connected to 2. Now we can easily see this cannot work. We cannot connect any of the X's to 1 or 2, so they can only be connected to each other. But, if we connect X1 to X2, say, then when S1 connects X1 to A1, and S2 connects X2 to B2, the light is on regardless of the position of S3. So with no X connected to 1 or 2 there is no possible solution. So we must have at least one X. Say X1 to 1. If no X to 2, then we must have B1, B2, and B3 all connected to 2. But then when S1 connects X1 to B1, the light is on regardless of the other two switches. So we can't have exactly one X connected to 1 and 2. Consider two. A A ---1-X1-< >-X2-2--- B B [ Editor: diagram as collected, spacing lost. ] This is familiar from the two SPDT switch case. Just connect A to A and B to B and you've got the two switch problem solved. But if you do that you find that the third switch can't turn things off in some cases. So you can't just connect A to A and B to B. Indeed, you can't connect either, as then the light could be on regardless of S3 in some cases. Nor can A1 be connected to B2. Nor can A1 be connected to B1, as then S1 would be shorted, and so not be able to do anything. <I get tired here> -- Socks I wrote a program to exhaustively search for solutions of this type (no switching on the neutral wire). It comes up with no solutions. [ Editor: the Java program (classes SwitchPuzzle and BitwiseMatrix: an exhaustive search over all ways of joining the nine switch terminals with wires, testing each wiring with Boolean adjacency matrices) is omitted here and below. ] -- Jim Black Heinz wrote: > Just for checking: if you reduce the number of switches to 2, does it > come up with the handful of solutions that are known? If so, I'll > admit defeat on the puzzle. I modified the program so that it printed all solutions (previously, it stopped at the first solution found), and I also got it to print out the data as an ASCII diagram. Here's the output for the 2-switch case: [ Editor: the program's diagrams are given as collected; their spacing was lost, so they no longer line up. ] +-----------+---IN | | +-----------+-------OUT | | | | +-----------+ | | | | | | | | | | | | | | | o | | o | | / | | / | +-o | +-o | | | o---+ o---+ +-------+-------IN | | +---------------+---OUT | | | | +-----------+ | | | | | | | | | | | | | | | o | | o | | / | | / | +-o | +-o | | | o---+ o---+ +-----------IN | +-----------+ | | | +-----------+ | | | | | | +-----------------------OUT | | | | | | | | | | | | | o | | o | | / | | / | +-o | +-o | | | o---+ o---+ +-----------IN | +-------+ | | | +---------------+ | | | | | +-----------------------OUT | | | | | | | | | | | | | o | | o | | / | | / | +-o | +-o | | | o---+ o---+ Solution exists. So it gets the two solutions with no switching on the neutral wire, and it prints an XOR and NOT XOR variant for each case. To switch it over to the 2-switch problem, the settings need to be modified [...] Putting the settings for the 3-switch problem back in still yields no solution. -- Jim Black Jim Black wrote: > I modified the program so that it printed all solutions [...] This is really impressive! The program is great; you should publish it. I am almost convinced. I say "almost" because I'd like to ask a final question. I believe straight away that there is no way to wire three SPDT switches so that IN versus OUT is switched the way we want it. But: If I remember correctly, the third switch connected the second end of the lamp with the two switches at the first end. A program would also have to check for those options. Does your program do that? Or did it assume that all three switches are on one side of the lamp, and the other side of the lamp is connected to ground/neutral? -- Heinz If I understood the argument correctly from <1162674339.988182.65...@m73g2000cwd.googlegroups.com> then Jim Black has already shown that any solution could be converted to a solution with the lamp connected directly to neutral. This is a good puzzle. First, it involves pure combinatorics, meaning no real pre-reqs, second, it is just on the border between easy, and so complicated (connect 12 switches so that any group of 3 can switch on each of 6 lamps individually for any value of the remaining switches) that no sane person would attempt it for a minute, unless they felt inclined to develop a general algorithm. How hard can it be? We only have 3 switches to futz around with... [ Editor: the next contribution, apparently Jim Black's, also begins mid-sentence. ] said a few times that it didn't. As I pointed out: > We want current flowing from hot to neutral if and only if the lamp is > on. Otherwise we would have a short circuit. So for any solution > that has both ends of the lamp switched, replacing the lamp with a > wire, cutting the wire going to neutral, and putting the lamp there > yields a solution that has only one end of the lamp switched. For > example, this would change > http://home.san.rr.com/garywachs/pages/electricpuzzles/circuit3.gif > to > http://home.san.rr.com/garywachs/pages/electricpuzzles_solution2.htm, > minus the outlet, and with only one lamp. But it's simple to modify the program to search for those cases anyway. For the two-switch problem, I get: +-----------+-----HOT | | +-----------+---------LAMP | | | | +-----------+ | | | | | | | | | | | | | | | o | | o | | / | | / | +-o | +-o | | | o---+ o---+ +-------+---------HOT | | +---------------+-----LAMP | | | | +-----------+ | | | | | | | | | | | | | | | o | | o | | / | | / | +-o | +-o | | | o---+ o---+ +-------------LAMP | +-----------+-----HOT | | | +-----------+---------NEUTRAL | | | | | +-------------------------LAMP | | | | | | | | | | | | | o | | o | | / | | / | +-o | +-o | | | o---+ o---+ +-------------HOT | +-----------+ | | | +-----------+ | | | | | | +-------------------------LAMP | | | | | | | | | | | | | o | | o | | / | | / | +-o | +-o | | | o---+ o---+ +-------------LAMP | +-------+---------HOT | | | +---------------+-----NEUTRAL | | | | | +-------------------------LAMP | | | | | | | | | | | | | o | | o | | / | | / | +-o | +-o | | | o---+ o---+ +-------------HOT | +-------+ | | | +---------------+ | | | | | +-------------------------LAMP | | | | | | | | | | | | | o | | o | | / | | / | +-o | +-o | | | o---+ o---+ Solution exists. For the three-switch problem, it still says no solution. Even if I comment out the part that assumes there is never a short circuit, it still can't find one. -- Jim Black Jim, all this is great. Thank you for all the work. I think you have convinced us all that there is no way to switch on and off a lamp from 3 SPDT switches. My memory must have failed me. -- Heinz