Teaser 3033

by Susan Bricket

Published Sunday November 08 2020

Goldilocks and the Bear Commune

In the bears’ villa there are three floors, each with 14 rooms. The one switch in each room bizarrely toggles (on <—> off) not only the single light in the room but also precisely two other lights on the same floor; moreover, whenever A toggles B, then B toggles A.

As Goldilocks moved from room to room testing various combinations of switches, she discovered that on each floor there were at least two separate circuits and no two circuits on a floor had the same number of lights [1]. Furthermore, she found a combination of 30 switches that turned all 42 lights from “off” to “on”, and on one floor she was able turn each light on by itself.

(a) How many circuits are there?

(b) How many lights are in the longest circuit?

[1] and no two floors have the same combination of circuits.  

18 Replies to “Teaser 3033”

  1. Am I the only one to find a solution? First problem is understanding what Sue Briquet’s words mean – I was worried we might have to draw circuit diagrams! But it does actually make sense, she’s just defining the interaction between the various groups of lights & switches on each floor. Once you get your brain round that, the solution isn’t actually very difficult, but it does need a little bit of lateral thinking. Hope I’ve got it right, seems straightforward.

  2. I read the teaser yesterday but are still struggling to establish a clear picture. Some tentative statements: Minimum length of one circuit is three, so maximum number of circuits on each floor is in principle 3 + 3 + 3 + 5, which modified by the uniqueness request, does not leave many possibilities.

    And about the switch-system: Given that switch Y toggles switch X and switch Z and that the state of the switches is, say (X, Y, Z) = (0, 1, 1). Then toggle Y (tY) results in
    (tY): (0, 1, 1) -> (1, 0, 0) affects X, Y and Z and no other switches.
    (tX): (1, 0, 0) -> (0, 1, 0) affects X and Y and one switch in a fourth room in same circuit.
    (tZ): (0, 1, 0) -> (0, 0, 1) affects Z and Y and one switch in a fourth room in same circuit.

    1. Hi Erling

      It doesn’t say that one switch affects the other switches, it simply affects the lights in two other rooms. So when one switch is ‘toggled’ it changes the state of three different lights (each of them turns on or turns off).

      It also says that no two circuits on a floor had the same number of lights, so your 3+3+3+5 is not allowed in principle. I had to go back & check that there is just one switch and one light in each of 42 rooms.

      But it seems there was an omission in the text, which Brian has just corrected (see his red text above). Without that extra comment there were apparently three different solutions, discovered by the programmers. Working by hand, I only found one of them!

      1. Hi Robert
        I expressed myself clumsy about the maximum number of circuits on each floor. What I meant was that the number of lights “as first approximation” would be 3 + 3 + 3 + 5 but that must be modified because no two circuits on can have the same number of lights. It was an indirect way to say it must be 3 + 4 + 7.
        I am not sure about the significance of distinguishing between the state of a switch and the state of its corresponding light. I imagined that a switch somehow reveals its state as “on” or “off” either by position “up-down”, “left-right” or different coloured diodes etc.. That may well be a disturbing and unnecessary aspect.
        I need another night’s sleep on this one.

        1. The switches are just like ordinary light switches. They only move if somebody presses them. The circuits are somehow connected so that pressing one switch changes 3 lights. The text is a bit confusing, where it says ‘Whenever A toggles B, then B toggles A.’ This means that if operating the switch in room A changes the light in room B, the reverse will be true – i.e. if you subsequently operate the switch in room B, it will change the light in room A. But the switches never move by remote control! (At least that’s how I interpreted it. I’ve now altered my solution to match Brian’s added red text, and my solution matches his ‘hidden’ solution)

  3. I’ve got 3 possible answers for part (a) but am ok with part (b). From where it says each floor has at least two circuits I inferred circuits don’t cross floors as was later added in the red text. If I assume there can’t be the same set of circuit sizes on more than one floor, I can get part (a) ok, though the question doesn’t state this.

    Each floor has 14 lights in at least two circuits, of different sizes. This gives 6 possible sets of circuits. I then looked at the circuits and had to sketch what would happen with lights switched in topologically different sequences. I started with the smaller ones and by the time I had done 3,4,5,6 light circuits I could extrapolate how it would go for the larger circuits and knew which circuits were capable of having one light only on and which weren’t and how many switches (minimum) it would take to turn all the lights on in the circuit. I hope it doesn’t give too much away at this stage to say there is only one circuit combination for the floor where each light can be turned on separately. Then I know for that floor the number of switches to turn on all the lights and so the remaining number of switches needed to turn on all the lights for the other two floors. Two of the 6 possible sets of circuits give half this number each, the other 4 would need too many switches.

    Part (b) is then clear. For part (a) I need to assume both the two sets of circuits are used, rather than each of them twice. Quite a fun and different type of teaser.

    1. Hi NIcky,

      You have shown how difficult it is to find appropriate ways of wording teaser constraints! What I meant with the red text was that ‘no specific circuit arrangement appears on more than one floor’ or ‘the floors do not have any circuits that are the same’. I thought I had done that but you found another, perfectly reasonable, interpretation of the word ‘share’!

      So I have just changed the word ‘share’ to ‘have’, which should, I hope, reduce your three solutions for (a) to one!

  4. Three days on from finding my original simple solution, there seems to be a dearth of respondents on this one (apart from Nicky, who spotted how to do it). I wonder if that’s due to use of the term circuits, which I originally thought might require circuit diagrams! The answer is of course circuits as in race tracks. So a circuit of n rooms can be diagrammatically placed around a circle, with links from each room to the next. The links are bidirectional, so operating the switch at one end of the link changes the light at the other end. That’s as well as the light in the room with the switch, so each switch changes 3 lights. A few simple sketches reveal the characteristics of each circuit size. The various circuits on each floor must add to 14, and it’s quite easy to find the sets that meet the other requirements.

    1. Hi Robert
      I posted my recent comment without noticing yours. You are right about difficulties with imagining the arrangement. Myself I turned to my GeoGebra and tried to model it there. Of my gradually growing circuits only the ‘ten-room-circuit’ is suitable for publishing (with its limited scope). Anyway, it can be viewed here: https://www.geogebra.org/m/gt3cqrsk

  5. I have struggled with this one. While I think I understood the notion of circuits well enough, I could not get a clear picture of what was meant by counting ‘combinations of switches’. After reading Nicky’s rapport over and over again it gradually came to me that it meant Goldilocks practical skill to turn all lights off, i.e. what rooms/switches to visit (her word topologically helped a lot). My own model supported that picture by demonstrating that the order of togglings is irrelevant.
    To ‘turn each light on by itself’ still remained a mystery. But knowing what was meant by the switch-combinations, I could establish 20 legal three-floor-combinations of circuits. Of these, only four met the “30 combinations” request. Then deadlock again.
    In the end, a visit on Jim’s page an hour ago made it clear to me that the “each light on by itself” meant “only one light (on) in each circuit”. From my modelling I knew exactly when that does not occur as a possibility. And that eliminated three of my four candidates. So, I think I have a solution, but I do not know where or how to look for a masked solution anymore, so I am not sure.

  6. Hi Erling,
    in my opinion “each light by itself” means that activating a switch turns on the light in the room of that switch, excluding cases where a single light goes on in another room. Of course one needs first to go and push switches in certain other rooms in an appropriate sequence.

    I found rather quickly a floor satisfying this restriction and hence a valid answer. But I needed some time to check all other circuits.

    1. When it says ‘On one floor she was able to turn each light on by itself’ I don’t think we have work out the 14 different switch sequences to make that happen. I was simply happy to demonstrate that it could be done. For example, if that floor includes a 4 room circuit, then starting with all lights off you can operate 3 of those 4 switches (in any order) and one light will be on. It won’t necessarily correspond to the last switch operated. But you can obviously omit any one of the 4 to leave any one of those 4 lights on. Similar rules apply for other circuit lengths. Since it talks about a combination of 30 switches that turned all the light from off to on, It’s reasonable to assume a starting condition of all lights off for the single light case.

      Hopefully Brian will send Erling an email so that he has the ‘secret’ password, allowing him to verify that his solution matches the ‘masked’ one.

    2. Thanks Peter
      I went from four possible solutions to one by discarding those where all floors had circuits of length multiple of three. It may be that “each light by itself” is conflicting with those combinations, even if it does not mean what I thought. Not satisfying, of course.

      1. Erling

        I think turning each light on by itself implies that the other 41 lights are off. For the 30 switch combinations that turns them all on, Goldilocks starts with them all off, so I think that’s a reasonable place to start before doing whatever is required to get her selected single light to turn on. Obviously she would only operate switches within the circuit that contains her selected light. We’re not required to devise all the separate sequences, just to establish that it’s possible for Goldilocks to find a way to turn on any one of the 14 lights on that floor.

        For example, if you set your GeoGebra model to an initial ‘all lights off’ state, you’ll find that if you then operate every 3rd switch in sequence, you will eventually get a single light on. You can change which light this is by altering your start point. You might like to try operating the same set of switches, but in a different order . . .

        I’m sorry if you don’t find this satisfying – I don’t have any problems with it!

      2. Erling,
        I should have realised from the beginning that all circuits with lengths >3 permit switching on only a single light and that lengths 6 and 9 do not permit turning on the light in the room of the actuated switch.

        1. Erling,
          my previous comment is wrong! Circuits with lengths = multiple of three can not leave only one light on as emphasised By John.

  7. If you turn just one light one, then toggling all of the remaining switches will bring all of the lights on on that circuit. And so turning all except one light on is the opposite of turning one light on.
    In an infinitely long line, the only way to turn all of the lights on is to toggle the 2nd and then every third switch, ie 5th, 8th etc. Consider the ring as joining one end of the line to the other. To turn all except one light on:
    either the ring can be N = 1 mod 3 long, and the light which is not turned on is never turned on.
    or the ring can be N = 2 mod 3 long, and the light which is not finally turned on is turned on and then turned off again.
    If the ring is N = 0 mod 3 long, then one can never turn on all except one light.

Leave a comment

Design a site like this with WordPress.com
Get started